Summary
OpenJPA is a very capable persistence technology. In addition to providing much function, it is based on a standard. Products like WebSphere Application Server provide enhanced versions of OpenJPA, and caching technologies like ObjectGrid can provide enterprise-quality applications. In this chapter, we showed you how to code against the OpenJPA APIs, map entities, and configure the system for your applications. The OpenJPA documentation can provide you with many more details. In addition, we showed you how to implement the services from the common example.
The JPA 2.0 specification was being written at the time of this writing. Some extensions from OpenJPA, Hibernate, and others may eventually be included in the specification. The Specification group is looking at the following items:
- Expanded object/relational mapping functionality, including greater flexibility in combining existing mapping options, support for collections of embedded objects, multiple levels of embedded objects, ordered lists, combinations of access types, and so forth.
- Additions to the Java Persistence query language.
- An API for "criteria" queries. Hibernate contains a Criteria API we covered in the previous chapter.
- Standardization of sets of "hints" for query configuration and for Entity Manager configuration.
- Standardization of additional metadata to support DDL generation and "Java2DB" mapping.
- Expanded pluggability contracts to support efficient passivation and replication of extended persistence contexts in Java EE environments.
- Standardization of additional contracts for entity detachment and merge, and persistence context management.
- Support for validation.
You should keep an eye on the progress of this specification and see which of these features actually get added to the standard.