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.
Post a Comment