Blog

Milestone 3 of OpenJPA 2.0.0 is now available for download. This release is based on the 20090922 Proposed Final Draft 2 of the JSR-317 JPA 2.0 specification. Included are many enhancements, fixes, and new functionality; giving developers early access to many key features of JPA 2.0. Visit the OpenJPA 2.0.0 Milestone 3 page for additional details.

Note: This is an implementation of an early-draft specification developed under the Java Community Process (JCP). The code is untested and presumed not to be a compatible implementation of the JSR-317 Java Persistence API, Version 2.0 specification. We encourage you to migrate to an implementation of the JSR-317 Java Persistence API, Version 2.0 specification that has been tested and verified to be compatible as soon as such an implementation is available, and we encourage you to retain this notice in any implementation of JSR-317 Java Persistence API, Version 2.0 specification that you distribute.

With the completion of iteration 11, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:

  • OpenJPA is based upon Proposed Final Draft 2 of JSR-317.
  • Support for cascading detach using cascade-detach as specified in the orm.xml.
  • Assertion that relationships in MappedSuperclass are unidirectional.
  • OpenJPA was updated to the CR5 level of the bean validation specification.
  • A new code sample which showcases the use of embeddables.
  • Corrected an XML encoding issue which occurred when using XML data with SQL Server.
  • Many documentation updates.
  • Improved test coverage for many database platforms. The current test matrix is available here.

With the completion of iteration 10, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:

  • Support for the Criteria and Metamodel API. The Criteria and Metamodel API can be used in conjunction to create and execute strongly-typed programmatic queries.
  • Metamodel source file generation. OpenJPA provides tooling to generate metamodel source classes.
  • Support for the TypedQuery and Tuple interfaces. These interfaces are provided to manipulate typed queries and their results.
  • Automatic setting of compatibility options based upon persistence version. Compatibility options are configured based on persistence version to provide backward compatibility for OpenJPA version 1.x applications.
  • Support for naming of unique constraints.
  • Lob, Temporal, and Enumeration can now be specified on element collections.
  • JPQL now supports multiple constructors in the query projection list.
  • Support for the shared-cache-mode element in the persistence.xml. Provides configuration/enablement options for L2 cache.
  • Support for Cacheable annotation and CacheStoreMode/CacheRetriveMode properties. Allows per class configuration of L2 cacheing and per-operation tuning of cache behavior.
  • Database updates including updates for Derby reserved words, usage of a new version of commons-pool and commons-dbcp, and a new Derby network server test profile.
  • Support for JDBC date, time, and timestamp literals within JPQL and Criteria queries.


With the completion of iteration 9, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:

  • Bean Validation support for validation groups. Specific validation groups can be targeted for lifecycle events.
  • A TraversableResolver is now registered with the bean validator. The resolver ensures that only loaded attributes are validated.
  • A PersistenceProviderResolver and PersistenceProviderResolverHolder are available from the Geronimo Spec API. PersistenceProviderResolver can be used to return the list of persistence providers available in the runtime environment.
  • Availablility of ProviderUtil and PersistenceUnitUtil interfaces. These interfaces provide methods to determine the load state of a persistent entity or attribute. In addition, PersistenceUnitUtil can be used to get the identifier of an entity.
  • Significant improvements to OpenJPA's subquery processing.
  • OpenJPA now includes the ability to use a pluggable encryption provider. This provider can be used to support encrypted database passwords in the persistence.xml. See the Encryption Provider chapter in the documentation for more details.



EHCache has just announced a Cache Plugin for OpenJPA!
Very easy configuration and/or download will get you running right away. Check it out!



Thanks to everyone who participated in the OpenJPA Logo Contest.
We have a winning logo, along with some website updates that I hope everyone will enjoy.

With the completion of iteration 8, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:

  • Sub-project for JSR-303 (Bean Validation) testing with configurable bean validation providers.
  • Automatic detection of bean validation providers.
  • Support for bean validation groups, configurable through standard persistence.xml properties.
  • Bug fixes for attribute-overrides and embeddable processing.
  • Performance enhancements to class reflection utility. Provides 17% performance gain in some benchmarks.


Submissions: Accepted now through June 30, 2009
Rules: See the Logo Contest page for more details.
Voting: Will occur from July 1 through July 21.
Winner: Will be announced on or after July 22.

Milestone 2 of OpenJPA 2.0 is now complete and a distribution is available for download. This download includes a preview of many new OpenJPA and JPA 2.0 Early Access features including enhanced support for embeddables, JPQL enhancements, new locking modes, and many other enhancements. Visit the OpenJPA 2.0 Early Access 2 distribution page for additional details.

This is an implementation of an early-draft specification developed under the Java Community Process (JCP) and is made available for testing and evaluation purposes only. The code is not compatible with any specification of the JCP.

The seventh iteration of OpenJPA 2.0 is complete! Content of this iteration is based upon the 03/13/2009 draft of the JPA 2.0 specification. This iteration contains these new features:

  • New MapKeyEnumerated and MapKeyTemporal annotations and equivalent XML elements for tagging the key of a map collection as either an enumerated or temporal type.
  • Base support for JSR-303 Bean Validation including basic configuration and lifecycle-based event validation.
  • Support the use of delimited identifiers within annotation attributes for a subset of mapping annotations when used with the Derby and DB2 databases. Support for additional databases will be added in future iterations.
  • JPQL subqueries now support derived path expressions and the use of KEY() with map collections.
  • OSGI bundle metadata has been added to the OpenJPA jar. This simplifies the use of OpenJPA in an OSGi environment such as Apache Felix.
  • OrderBy no longer requires specifying the name attribute when applied to a collection of basic type.

These new features are available in the latest nightly snapshot build. Be aware that the JPA 2.0 specification is not final so these features are subject to change.

Many thanks to those who contributed to this iteration! If you'd like to be a contributor to the OpenJPA project, please post your interest on the dev mailing list or contact one of the active committers.

-Jeremy

The sixth iteration of OpenJPA 2.0 is complete! Content of this iteration is based upon the 03/13/2009 draft of the JPA 2.0 specification. This iteration contains these new features:

With the completion of iteration 6, OpenJPA includes several additional JPA 2.0 (based on the 03/13/2009 spec draft) features. Here is a summary of the new features provided by OpenJPA:

  • Query timeout detection for additional databases. Query timeouts are more accurately detected and reported in DB2, Oracle, SQL Server, and Informix.
  • Support for scalar expressions in JPQL subqueries. Scalar expressions such as substring can now be used within a subquery.
  • Support for explicit access types on persistent types. The persistence access method can now be specified on a per-type and field or method level.
  • Spec related updates to OrderColumn and EntityManager methods.
  • JPQL queries now support key/value paths as arguments to scalar functions. KEY() and VALUE() can now be used to indicate that a map key or value should be used as an argument to a scalar function.

These new features are available in the latest nightly snapshot build. Be aware that the JPA 2.0 specification is not final so these features are subject to change.

Many thanks to those who contributed to this iteration! If you'd like to be a contributor to the OpenJPA project, please post your interest on the dev mailing list or contact one of the active committers.

-Jeremy

Google Summer of Code (GSoC) is a global program that offers student developers stipends to write code for various open source software projects. More than 100 organizations including Apache Software Foundation are participating in this program that offers an excellent opportunity for the students all over the globe to actively involve in open source development. OpenJPA team had offered several projects on behalf of Apache Software Foundation to participate in GSoC 2009. Recently after an extensive ranking process, following projects had been selected: (the full list of selected projects can be seen here)

  1. Cross-partition Query in a Distributed Database Environment
  2. Adaptive Query Targeting in Distributed Database Environment

The fifth iteration of OpenJPA 2.0 is complete! Content of this iteration is based upon the 03/13/2009 draft of the JPA 2.0 specification. This iteration contains these new features:

  • Updated spec APIs and schemas based upon most current specification draft. New, unimplemented methods will throw an UnsupportedOperationException.
  • Support new JPA LockModeType in find, lock and refresh methods in the EntityManager interface. A new "mixed" lock manager is introduced implementing the new mixed optimistic and pessimistic entity locking semantics.
  • AttributeOverride enhanced to allow navigation of multiple levels of embeddables, use with map keys and values, and use with element collections.
  • AssociationOverride enhanced to support specification of a join table and override of embeddables within relationships.
  • Support for general and qualified identification variables in JQPL selections. KEY, ENTRY, and VALUE qualifiers can now be used within the SELECT clause.
  • Lock and query timeout hint values can now be specified on applicable entity manager and query methods.
  • Lock mode (including the new pessimistic lock modes) can be specified on query methods and named queries. This allows for fine-grained locking configuration at the query level.
  • The unwrap method can be used to get an instance of OpenJPA entity manager and query interfaces.
  • Single entities or an entity graph may be detached from the entity manager. Specifying the new cascade type of DETACH or ALL on relationships allows selective detachment of an entity graph.
  • The third argument of the JPQL SUBSTRING function is now optional.
  • JPQL queries have been enhanced to support the projection of element collections, nested embeddables, and relationships from embeddables.

These new features are available in the latest nightly snapshot build. Be aware that the JPA 2.0 specification is not final so these features are subject to change.

Many thanks to those who contributed to this iteration! If you'd like to be a contributor to the OpenJPA project, please post your interest on the dev mailing list or contact one of the active committers.

-Jeremy

OpenJPA 1.2.1 released

OpenJPA 1.2.1 is now available from http://openjpa.apache.org/downloads.html and from the ibiblio maven repository. Version 1.2.1 is a bugfix release which includes 30 notatble bug fixes and 10 improvements.

The complete list of issues resolved can be found in the release notes at http://openjpa.apache.org/builds/1.2.1/apache-openjpa-1.2.1/RELEASE-NOTES.html.

Thanks again to everyone who contributed to making this release a success!

The third iteration of OpenJPA 2.0 is complete! Content is based on the 10/31/2008 draft of the JPA 2.0 specification. In addition to several bug fixes, this iteration contains these new features:

  • Support for collection-valued parameters in JPQL using the IN expression. A collection-valued parameter (List, Set, etc.) may now be used in conjunction with the IN expression within the where clause of a JPQL statement.
  • JPA specification level is available as an OpenJPA property. The JPA specification level of the provider can now be retrieved via the openjpa.Specification property.
  • Support for derived identities including the use of MappedById. OpenJPA now supports entities which have an id that is derived from the id of another identity for one-to-one and many-to-one relationships with a parent-dependent type association.
  • Support for getSupportedProperties and getProperties methods on the EntityManager and EntityManagerFactory. The active properties and their values, in addition to the full set of supported properties, can be retrieved for the EntityManager and EntityManagerFactory.
  • The OrderColumn annotation and equivalent XML allows the specification of the table attribute. The table attribute can be used to specify the join or collection table used in the relationship or collection.
  • Support for getHints and getSupportedHints on Query. The active hints and their values, in addition to all supported hints, can be retrieved for a Query.
  • A new cache which provides caching of SQL for prepared JPQL queries. See OPENJPA-703 for additional details.

These new features are available in the latest nightly snapshot build. Be aware that the JPA 2.0 specification is not final so these features are subject to change.

Many thanks to those who contributed to this iteration. If you'd like to be a contributor to the OpenJPA project, please post your interest on the dev mailing list or contact one of the active committers.

-Jeremy