8.3.1 Available JPA providers
The JPA provider is an engine that provides the EntityManager functionality. The JPA providers that can be used with Application Server include Cosminexus JPA provider and the JPA providers provided by other vendors. The following points describe the usage of each of these JPA providers:
- Organization of this subsection
(1) When Cosminexus JPA provider is used
Cosminexus JPA provider is a JPA provider provided with Application Server. Cosminexus JPA provider provides the Cosminexus JPA provider-specific functionality in addition to the functionality based on the JPA 1.0 specifications. For an overview of Cosminexus JPA provider, notes on application implementation, and the usage methods of Cosminexus JPA provider, see 9. Cosminexus JPA Provider.
(2) When the JPA providers from other vendors are used
The JPA providers are provided by other vendors. The JPA specifications clearly specify the interfaces between JPA providers and Application Server, and therefore you can also use JPA providers provided by other vendors and conforming to the JPA 1.0 specifications with Application Server.
When you use the other JPA providers from Application Server, you must specify the following settings:
-
Specifying JAR files
You use one of the following methods to specify the JAR file containing the JPA provider implementation:
-
Specify the JAR file under the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file. To specify a JAR file, you specify add.class.path in the <param-name> tag and the JAR file in the <param-value> tag. For details on the Easy Setup definition file and parameters to specify, see 12.2.1 Parameters used for setting up the user properties for the J2EE server.
-
Include JAR files in J2EE applications as a library.
-
-
Definitions in persistence.xml
In the <provider> tag of persistence.xml, specify the implementation class name of javax.persistence.PersistenceProvider provided by the used JPA provider. For details, see 8.8.2(2) <provider> tag.
To use the functionality for monitoring the J2EE application execution time provided with Application Server, you must add the JPA provider classes and entity classes into the protected area list. For details on how to add a class into the protected area list, see 2.2.5 criticalList.cfg (Protected areas list file) in the uCosminexus Application Server Definition Reference Guide.
- Reference note
-
With the execution of applications using the JPA, you can use the trace based performance analysis functionality provided with Application Server.
-
When Cosminexus JPA provider is used as the JPA provider
The trace based performance analysis can be output with both Application Server and Cosminexus JPA provider.
-
When a JPA provider from other vendors is used
You can only use the trace based performance analysis output by Application Server.
Note that with Application Server, the trace based performance analysis is output by the EntityManagerFactory, EntityManager, EntityTransaction, and Query APIs of the javax.persistence package. Furthermore, the trace based performance analysis related to the entity life cycle callback is output with the JPA provider.
For an overview of the trace based performance analysis, see 15.2 Overview of the trace based performance analysis of Application Server. For key points on output of the performance analysis trace, see 15. Performance Analysis Trace.
-