+

Search Tips   |   Advanced Search

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


The Java Persistence API (JPA) for the appserver defines the management of persistence and object/relational mapping within Java Enterprise Edition (Java EE) and Java Standard Edition (Java SE) environments.

The Java Persistence API (JPA) represents a simplification of the persistence model. JPA functions within the Java EE specification for EJBs 3.0 requirements, managing persistence and object/relational mapping. The JPA spec defines the object/relational mapping within its own guidelines instead of relying on vendor-specific mapping implementations. These features make applications that use JPA easier to implement and manage.

In a nutshell, JPA combines the best features from previous persistence mechanisms such as JDBC APIs, Object Relational Mapping (ORM) frameworks, and Java Data Objects (JDO). Creating entities under JPA is as simple as Plain Old Java Objects (POJOs). JPA supports the features provided by JDBC without requiring the knowledge of the specific models defined by the various JDBC implementations. Like object-relational software and object databases, JPA allows the use of advanced object-oriented concepts such as inheritance. JPA avoids vendor lock-in because it does not rely on a strict spec like JDO and EJB 2.x entities.

The JPA implementation does not mandate that you migrate existing applications. Existing EJB 2.x Container Managed Persistence applications continue to execute without changes. JPA may not be ideal for every application, however, for many applications it provides a better alternative to other persistence implementations.

Use the topics listed below for detailed information about aspects of JPA:

 

 

Next steps

Product support for JPA The implementation of Java Persistence API for the appserver can be used on all platforms that are supported for the appserver, including iSeries and z/OS. Java Persistence API for the application server functions with all databases supported in WAS. In addition to these, Java Persistence API for WAS can support databases that are supported by the OpenJPA implementation of JPA.

Databases supported by OpenJPA but not supported by WAS have not been tested extensively by IBM and might contain unknown compatibility issues. For a list of supported databases, refer to the OpenJPA user guide.

Additional information

For additional information about OpenJPA, see the OpenJPA User Guide. For information about Java Persistence API specifications, see the link listed below. The information resides on both IBM and non-IBM Internet sites, whose sponsors control the technical accuracy of the information. Often, the information is not specific to this product but is useful all or in part for understanding WAS ND. When possible, links are provided to technical papers and Redbooks that supplement the broad coverage of the release documentation with in-depth examinations of particular product areas.


Java Persistence API (JPA) Architecture
JPA for WAS
Develop and packaging JPA applications for a Java EE environment
Develop and packaging JPA applications for a Java SE environment
Enable SQL statement batching
Database generated version ID
Mapping persistent properties to XML columns
JPA Access Intent

 

Related tasks


Set Persistence Provider support in the appserver
Associating persistence units and data sources
Set OpenJPA caching to improve performance
Troubleshooting Java Persistence API (JPA) applications
Task overview: Using enterprise beans in applications

 

Related information


../../../../com.ibm.websphere.wim.doc.en/supporteddatabases.html