+

Search Tips   |   Advanced Search

JPA for WAS


JPA for WAS is built on the Apache OpenJPA open source project.

Apache OpenJPA and JPA for WAS

Apache OpenJPA is a compliant implementation of the Sun Microsystems JPA specification. Using OpenJPA as a base implementation, WAS employs extensions to provide additional features and utilities for WAS customers. Because JPA for WAS is built from OpenJPA, all OpenJPA functionality, extensions and configurations are unaffected by the WAS extensions. Users running OpenJPA applications do not need to make any changes to use their applications in WAS.

JPA for WAS provides more than compatibility with OpenJPA. JPA for WAS contains a set of tools for application development and deployment. Other features of JPA for WAS include support for XML mapping, JPA Access Intent, enhanced tracing capabilities, command scripts and translated message files. The provider of JPA for WAS is com.ibm.websphere.persistence.PersistenceProviderImpl.

The properties for OpenJPA can be defined in one of two ways. We can either specify the property in the persistence.xml file or by using a JVM command line argument on either client or server. See the following examples:

See on OpenJPA properties, see Chapter 2 on Configuration and the Part 3 Reference sections in the OpenJPA users guide.

The Extension Properties of JPA for WAS may be specified with the openjpa or wsjpa prefix. We can mix the openjpa and wsjpa prefixes as you wish for a common set of properties. Exceptions to the rule are wsjpa specific configuration properties, which should use the wsjpa prefix only. In the event that a JPA for WAS specific property is used with the openjpa prefix, a warning message will be logged indicating that the offending property will be treated as a wsjpa property.

The reverse does not hold true for the openjpa prefix. In that case, the offending property will merely be ignored.



 

Related concepts

Task overview: Storing and retrieving persistent data with the Java Persistence API (JPA)

 

Related tasks

Set the Java Persistence API (JPA) default persistence provider