JPA 2 Enhancements Every Java Developer Should Know
Group items matching
in title, tags, annotations or url
7More
The JPA 2 Enhancements Every Java Developer Should Know - Developer.com - 0 views
-
JPA 2 also introduced a second layer of cache, which is shared across various persistence contexts and can be accessed using the EntityManagerFactory
- ...4 more annotations...
2More
Auditing Entities With JPA Events | Andy Gibson - 0 views
6More
Migrating from Spring to Java EE 6 - Part 4 | How to JBoss - 0 views
-
discuss the rationale for migrating your applications from Spring to Java EE 6 and show you real examples of upgrading the web UI, replacing the data access layer, migrating AOP to CDI interceptors, migrating JMX, how to deal with JDBC templates, and as an added bonus will demonstrate how to perform integration tests of you Java EE 6 application using Arquillian
-
There is also an interesting Arquillian Persistence extension that integrates DBUnit in Arquillian where you can define your test data externally
- ...3 more annotations...
-
JDBC Templates hardly give any abstraction on top of the database and you’re on your own for Object Relational Mapping. We strongly advise to use JPA wherever possible; it gives portability by abstracting most of the database specific SQL that you would need, and it does all the hard and painful work of object mapping
11More
Drivers and Downloads | Dell [United States] - 0 views
- ...8 more annotations...
-
- Fixed issue where system LCD defaults to Max brightness on Standby/resume, Hibernate/resume or reboot
1More
DomainPermission (Apache Shiro 1.2.1 API) - 0 views
34More
UML Class Diagrams - structure diagrams which show architecture of the designed system ... - 0 views
- ...31 more annotations...
-
Control is a stereotyped class or object that is used to model flow of control or some coordination in behavior
-
Entity is a stereotyped class or object that represents some information or data, usually but not necessarily persistent.
-
An enumeration is a data type whose values are enumerated in the model as user-defined enumeration literals.
Pro JPA 2: Mastering the Java™ Persistence API: InformIT: Safari Books Online - 0 views
2More
Lean service architectures with Java EE 6 - JavaWorld - 0 views
-
key ingredients of a service-oriented component: Facade: Provides simplified, centralized access to the component and decouples the client from the concrete services. It is the network and transaction boundary. Service: The actual implementation of business logic. Domain structure: This is a structure rather than an object. It implements the component's persistence and exposes all of its state to the services, without encapsulation.
-
This convention not only standardizes the structure and improves maintainability, but also allows automatic dependency validation with frameworks like JDepend, Checkstyle, Dependometer, SonarJ, or XRadar. You can even perform the validation at build time. If you do, the continuous build would break on violation of defined dependencies. The rules are clearly defined with strict layering: a facade may access a service, and the service a domain object, but not vice versa
9More
Java Persistence/Auditing and Security - Wikibooks, open books for an open world - 0 views
-
adding a AUDIT_USER and AUDIT_TIMESTAMP column to all of the audited tables and auditUser and auditTimestamp field to all of the audited objects
- ...5 more annotations...
-
When the application inserts or updates an object, it will set these fields and they will be stored in the database. JPA events could also be used to record the audit information, or to write to a separate audit table.
-
@Column("AUDIT_USER"); protected String auditUser; @Column("AUDIT_TIMESTAMP"); protected Calendar auditTimestamp;
-
@PrePersist @PreUpdate public void updateAuditInfo() { setAuditUser((String)AuditedObject.currentUser.get()); setAuditTimestamp(Calendar.getInstance()); }
6More
Java Persistence/Runtime - Wikibooks, open books for an open world - 0 views
7More
How To Deal With Interfaces In Java EE 6 (or no more Impl) : Adam Bien's Weblog - 0 views
-
In Java EE 6 interfaces became absolutely optional. Neither in EJB 3.1, nor CDI / JSR-330 you need interfaces. You can inject classes directly. They will be still proxied, so all aspects like persistence, transactions, interceptors, decorators are still available. So you are no more forced to implement interfaces by the container
-
used for: Strategy Pattern: there are already several implementations of an algorithm or concept Layering: there is a clear need to hide e.g. an ugly implementation of a legacy framework API (not very common): you have to expose a API, which gets implemented by SPI (e.g. JDBC)
- ...4 more annotations...
-
If you introduce interfaces intentionally - and not as a general rule, you will considerably reduce the number of files. Your code becomes easier to understand and so maintain
41More
Security Module Drafts - Apache DeltaSpike - Apache Software Foundation - 0 views
-
Impersonalization
-
authenticates “as a user” or access application imitating his identity - without knowing his password
- ...36 more annotations...
-
assign permissions to individual objects within the application’s business domain
-
Events LoggedInEvent LoginFailedEvent AlreadyLoggedInEvent PreLoggedOutEvent PostLoggedOutEvent PreAuthenticateEvent PostAuthenticateEvent
-
control which elements of the user interface are displayed to the user based on their assigned permissions
8More
Comparison - 0 views
- ...5 more annotations...
-
Java API for XML Web Services (JAX-WS) Java API for RESTful Web Services (JAX-RS) Java EE Connector Architecture Java Messaging Service (JMS)
-
Java Persistence API (JPA) Java Contexts and Dependency Injection (CDI) Java Authentication and Authorization Service (JAAS) Java Authorization Contract for Containers (JACC) JavaMail API Bean Validation Enterprise JavaBeans
37More
Selling Weld and EE6 | Weld | JBoss Community - 0 views
- ...32 more annotations...
-
Their template pattern is a solution in search of a problem
-
Because, of course, there are no other well-known patterns for dealing with boiler-plate cleanup code and connection leaks.
-
brain-damage that Spring does to people!
-
It's a very impressive magic trick, and I wish I knew how to do it myself. But then, I'm just not like that. I'm always trying to poke holes in things - whether they were Invented Here or Not.
-
exception handling, this is one area where Spring does a good job: "The Spring Framework's handling of SQLException is one of its most useful features in terms of enabling easier JDBC development and maintenance. The Spring Framework provides JDBC support that abstracts SQLException and provides a DAO-friendly, unchecked exception hierarchy."
-
Automatic connection closing (and other boiler-plate code) is obviously a hard requirement to be handled by the fwk.
-
Pffffff. It's a trivial requirement which I can solve in my framework with two lines of code in a @Disposes method. Did you see any connection handling in the code above?
-
I mean, seriously guys. The Spring stuff is trivial and not even very elegant. I guess it's easier for me to see that, since I spent half my career thinking about data access and designing data access APIs. But even so...
-
They don't understand, or see the value of, using managed objects to represent their persistent data.
-
Um. Why? Why would that be a bad thing? I imagine that any app with 1000 queries has tens of thousands of classes already. What's the problem? Why is defining a class worse than writing a method?
-
Are you working from some totally bizarre metric where you measure code quality by number of classes?