Here is another bunch of JPA articles.
Refactoring the EJB APIs "Annotations are very useful for things that are semantically part of the application. As an example, consider dependencies that your application has on an environment resource. That's intrinsic to your application: If that dependency is not satisfied, then your application isn't going to run. So that's a declaration of a dependency. Dependency on another EJB with a particular interface type is another such dependency. Those dependencies will have to be satisfied in the deployment environment, but are also intrinsic to the semantics of the application."
An Introduction to Java Persistence for Client-Side Developers "Since it was also designed to be implementation independent, you can change your database or persistence provider as your needs change and not worry about anything breaking. Though Java Persistence was originally designed for server tasks, it performs beautifully in client applications, letting client-side developers spend less time on storage and more time on what they are good at: building killer GUIs."
Showing posts with label jpa. Show all posts
Showing posts with label jpa. Show all posts
Friday, June 16, 2006
Friday, June 09, 2006
More Spring Things
"Design enterprise applications with the EJB 3.0 Java Persistence API" lists injecting collaborators of a service using annotations such as "@EJB(beanName = "AccountDao")" to "AccountDao accountDao;".
This compares with Spring 2.0 examples that use the Spring configuration file to inject the collaborators: "JavaEE 5, Spring 2 and AspectJ 5: dependecy injection magics". Some more information, "7.7.1. Using AspectJ to dependency inject domain objects with Spring".
The other useful article is, "Don't repeat the DAO!" which allows the creation of type safe and generic DAOs. This uses dependency injection to put the class type to return and then uses Spring's AOP to add extra behaviour (like finder methods).
This compares with Spring 2.0 examples that use the Spring configuration file to inject the collaborators: "JavaEE 5, Spring 2 and AspectJ 5: dependecy injection magics". Some more information, "7.7.1. Using AspectJ to dependency inject domain objects with Spring".
The other useful article is, "Don't repeat the DAO!" which allows the creation of type safe and generic DAOs. This uses dependency injection to put the class type to return and then uses Spring's AOP to add extra behaviour (like finder methods).
Sunday, May 28, 2006
Annotations All Around
Looking around at the talk on JPA, Java Persistence API Overview "Part of JSR-220, it began as a simplification of entity beans and evolved into POJO persistence. Scope expanded from EE environments to include Java SE. The reference implementation is available as part of GlassFish (the implementation donated by Oracle). The query language was expanded. You can use annotations and/or xml configuration, finally, the persistence runtime provider is pluggable.
Entity what's new:
* Created with new operator
* no required interfaces
* Have persistent identity
* May have both persistent and non-persistent state
* If they are Serializable, you can pass between around without the need for DTO's"
Also, lists the named and dynamic queries, object loading, table relationships and transaction handling.
Pretty much every example with JPA (EJB 3.0) consists of annotations, Annotations and the Object Model "Another approach, similar to the way we've used XDoclet or XDocclet 2, is to have the model and its annotations all in one class, which looks a lot like the class above." and another example, Extending EJB 3.0 with Interceptors "EJB 3.0 formalizes interceptors, already available in proprietary products, you can also intercept EJB life cycle events."
Netbeans seems to have taken the lead on some of this stuff including, See some NetBeans 5.5 (beta) features and screenshots.
Entity what's new:
* Created with new operator
* no required interfaces
* Have persistent identity
* May have both persistent and non-persistent state
* If they are Serializable, you can pass between around without the need for DTO's"
Also, lists the named and dynamic queries, object loading, table relationships and transaction handling.
Pretty much every example with JPA (EJB 3.0) consists of annotations, Annotations and the Object Model "Another approach, similar to the way we've used XDoclet or XDocclet 2, is to have the model and its annotations all in one class, which looks a lot like the class above." and another example, Extending EJB 3.0 with Interceptors "EJB 3.0 formalizes interceptors, already available in proprietary products, you can also intercept EJB life cycle events."
Netbeans seems to have taken the lead on some of this stuff including, See some NetBeans 5.5 (beta) features and screenshots.
Monday, April 17, 2006
Spring Aspects - A Transactional Thing
I've recently been looking at transactions in Spring 2.0 - it certainly has more things to make your code sing.
The Spring 2.0 Transaction document has some useful information on using a TransactionTemplate to wrap transactional operations. Of course, the best way is Spring AOP for declarative transaction management and using Java 5.0's annotations.
There's a previous discussion of applying transactions using Spring 1.x using Hibernate in, Wire Hibernate Transactions in Spring.
Javapolis Spring Update and Maven 2.0 (see also, this Maven 2.0 article) most of talks are well worth a listen.
Articles on using the new AOP features in Spring 2.0: Typed Advice in Spring 2.0 (M2) (about finding methods in Spring AOP) and POJO Aspects in Spring 2.0: A Simple Example.
An article on JPA (Java Persistance API), Using the Java Persistence API with Spring 2.0.
The Spring 2.0 Transaction document has some useful information on using a TransactionTemplate to wrap transactional operations. Of course, the best way is Spring AOP for declarative transaction management and using Java 5.0's annotations.
There's a previous discussion of applying transactions using Spring 1.x using Hibernate in, Wire Hibernate Transactions in Spring.
Javapolis Spring Update and Maven 2.0 (see also, this Maven 2.0 article) most of talks are well worth a listen.
Articles on using the new AOP features in Spring 2.0: Typed Advice in Spring 2.0 (M2) (about finding methods in Spring AOP) and POJO Aspects in Spring 2.0: A Simple Example.
An article on JPA (Java Persistance API), Using the Java Persistence API with Spring 2.0.
Subscribe to:
Posts (Atom)