The Java Persistence API (JPA) represents a simplification of the persistence programming model. JPA manages persistence and object/relational mapping within the Java EE specification for Enterprise Java Beans 3.0. The JPA specification 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.
JPA combines the best features from previous persistence mechanisms such as Java Database Connectivity (JDBC) APIs, Object Relational Mapping (ORM) frameworks, and Java Data Objects (JDO). Creating entities under JPA is as simple as creating serializable classes. JPA supports the large data sets, data consistency, concurrent use, and query capabilities of JDBC. 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 specification like JDO and EJB 2.x entities.
The JPA implementation does not mandate that you migrate existing applications. Existing EJB 2.x Container Manager 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.
With the JPA tools in the product, you can use wizards to create and automatically initialize mappings. You can create new database tables from existing entity classes (top-down mapping) or new entity beans from existing database tables (bottom-up mapping). You can also use the tools to create mappings between existing database tables and entity beans (meet-in-the-middle mapping), where names or other attributes differ. For flexibility in designing your data access application, you can choose from a range of mapping types. You can create mappings from several types of Java class, and you can specify entity inheritance with several options for database design.
JPA is covered under the JSR 220 EJB 3.0 specification: JSR 220: Enterprise JavaBeans 3.0
You can read the following topics before creating a JPA applications. They provide planning and technology overview information that may be useful if you are new to JPA applications or developing JPA applications in this development environment.
If you are already familiar with JPA applications technology the following topics will help you set up your workspace for JPA applications development, and guide you through the development process.
The following JPA tutorial is included with this product:
In addition to the information found in this infocenter, the following links provide additional learning material.
IBM® Redbooks®: WebSphere® Application Server Version 6.1 Feature Pack for EJB 3.0