Hitachi

uCosminexus Application Server Maintenance and Migration Guide


12.3.5 Changes in JPA

Organization of this subsection

(1) Abolition of the CJPA provider

The conventional CJPA provider cannot be used because it does not support JPA 2.1 APIs. Instead, Application Server version 11 and Developer version 11 newly provide a JPA provider that supports JPA 2.1. However, Cosminexus's original functions provided by the conventional CJPA provider cannot be used. The following parameters are ignored even if they are specified.

(2) Persistence units and persistence context of container management cannot be used

The JPA 2.1 support scope for Application Server version 11 and Developer version 11 does not support the JPA container functionality. For this reason, applications that assume the use of the following APIs and DD elements to obtain the persistence units and persistence context for container management cannot be migrated.

In addition, the following parameters cannot be specified:

Acquisition of the EntityManagerFactory object can be substituted with the persistence unit for application management. In accordance with the JPA 2.1 specifications, obtain the EntityManagerFactory object by using the following implementation example.

EntityManagerFactory factory 
= Persistence.createEntityManagerFactory("persistence-unit-name");
EntityManager manager = factory.createEntityManager();

(3) Changes in the database supported as the persistence destination

In the JPA 2.1 support scope for Application Server version 11 and Developer version 11, only the following database can be used as the persistence destination:

If persistence to other databases is required, prepare a JPA provider library# corresponding to JPA 2.1 and the persistence destination database, and add it to the class path instead of the Cosminexus JPA 2.1 provider.

#

EclipseLink, Hibernate JPA, or some other library