9.2.3 Preconditions for using Cosminexus JPA Provider
This section describes the preconditions for using Cosminexus JPA Provider.
- Organization of this subsection
(1) Available components
The components that use Cosminexus JPA Provider are EJB 3.0 and later in the case of EJBs and Servlet 2.5 and later in the case of Web components. For details on the available components, see 8.3.2 Available components.
(2) Connectable databases
You can connect to the following databases when you use Cosminexus JPA Provider:
-
Oracle
-
HiRDB
(3) Available DB Connectors
Cosminexus JPA Provider uses DB Connector to update the database. You can use DB Connectors listed in the following table with Cosminexus JPA Provider.
Database used |
Transaction type |
Available DB Connector |
---|---|---|
Oracle |
LocalTransaction NoTransaction |
DBConnector_Oracle_CP.rar |
XATransaction |
DBConnector_Oracle_XA.rar |
|
Oracle RAC |
LocalTransaction NoTransaction |
DBConnector_Oracle_CP.rar DBConnector_CP_ClusterPool_Root.rar DBConnector_Oracle_CP_ClusterPool_Member.rar |
HiRDB |
LocalTransaction NoTransaction |
DBConnector_HiRDB_Type4_CP.rar |
XATransaction |
DBConnector_HiRDB_Type4_XA.rar |
(4) Environment that cannot be used
You cannot use Cosminexus JPA Provider in the following environment:
-
Execution environment for the batch applications
-
Execution environment for the EJB client applications
(5) Using the method cancellation functionality
With Cosminexus JPA Provider, a unique binary code is embedded in the accessor method for OneToOne and ManyToOne LAZY fetch. As a result, the accessor method is subject to method cancellation. Therefore, when LAZY fetch is specified for the OneToOne relationship or ManyToOne relationship, the entity class, embeddable class, and mapped super-class must be registered in the protected area.
Note that if the classes are not registered in the protected area, method cancellation might occur on the embedded binary code. The operations when the classes are not registered in the protected area might not function properly.
Whether the classes are registered or not registered in the protected area, the following stack trace is output due to method timeout. However, if the classes are registered in the protected area, method cancellation does not occur.
In the following example, the embedded EntityClass1._toplink_getmappingClass2 is invoked by extending the EntityClass1.getMappingClass2 method invoked by the user. Consequently, a method timeout occurs, but method cancellation does not occur.
message-id message(LANG=ja) KDJE52703-W A timeout occurred while the user program was executing. (threadID = 23794987, rootAPInfo = 10.209.11.124/5964/0x4828eb62000128e0, application = JPA_JavaEE_TP, bean = TestBean, method = doTest) jpa.test.annotation.onetoone.entity.EntityClass1._toplink_getmappingClass2(EntityClass1.java) locals: (jpa.test.annotation.onetoone.entity.EntityClass1) this = <0x11e35878> (jpa.test.annotation.onetoone.entity.EntityClass1) at jpa.test.annotation.onetoone.entity.EntityClass1.getMappingClass2(EntityClass1.java:34) locals: (jpa.test.annotation.onetoone.entity.EntityClass1) this = <0x11e35878> (jpa.test.annotation.onetoone.entity.EntityClass1)
For details on registering the classes in the protected area, see 2.2.5 criticalList.cfg (Protected areas list file) in the uCosminexus Application Server Definition Reference Guide.
(6) Using the annotation reference control functionality
When you use Cosminexus JPA Provider, you cannot use the annotation reference control functionality. If the annotation reference control functionality is enabled, you cannot define the persistence context and persistence unit references.