Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
To deploy a TopLink application to OC4J 10g Release 3 (10.1.3) or later, modify the orion-ejb-jar.xml
file as follows:
If you are migrating an application from a previous release of OC4J, you can use the TopLink migration tool to automatically migrate persistence information from your orion-ejb-jar.xml
file to a new toplink-ejb-jar.xml
. For more information, see "Migrating OC4J Orion Persistence to OC4J TopLink Persistence".
If you are using TopLink as your OC4J persistence manager, the default persistence manager in 10g Release 3 (10.1.3), you can configure the persistence-manager
subentry (see Table 8-2) in the orion-ejb-jar.xml
file. For more information on the scenarios in which you would want to modify orion-ejb-jar.xml
, see "OC4J and the orion-ejb-jar.xml File".
If you are not using TopLink as your OC4J persistence manager, do not modify the persistence-manager
subentries.
OC4J 10g Release 3 (10.1.3) and later do not support entity-deployment
attribute pm-name
. Use persistence-manager
attribute name
instead (see Table 8-2). When OC4J parses the orion-ejb.jar.xml
file, if it finds a pm-name
attribute, OC4J ignores its value and logs the following warning message:
WARNING: Use of |
Table 8-2 orion-ejb-jar.xml File persistence-manager Entries
Entry | Description |
---|---|
|
The name of the persistence manager to use. Set this value to If you set the |
Do not configure this attribute. If |
|
This property applies only when If you export your TopLink mapping metadata to a deployment XML file, set this property to the name of the deployment XML file (default: Do not set this property if you are using a TopLink project class instead of a mapping metadata file (see |
When you select TopLink as the persistence manager (see name
in Table 8-2), use the persistence-manager
subentries for pm-properties
(see Table 8-3) to configure the TopLink session that the TopLink run time creates and uses internally for CMP projects. The persistence-manager
subentries take the place of a sessions.xml
file in a CMP project.
Note: You can only configure a subset of session features using these properties and in most cases, default configuration applies. To configure all session features and to override defaults, you must use a customization class (seecustomization-class in Table 8-3).
|
Table 8-3 orion-ejb-jar.xml File persistence-manager Subentries for pm-properties
Entry | Description |
---|---|
|
Unique name for this TopLink-persisted EJB deployment JAR file. Must be unique among all TopLink-persisted deployed JAR files in this application server instance. When the TopLink run time internally creates a TopLink session for this TopLink-persisted deployed JAR file, the TopLink session manager stores the session instance under this If you do not specify a name, the TopLink run time will generate a unique name. |
|
If you export your TopLink mapping metadata to a Java class (that extends Do not set this property if you are using a mapping metadata file (see |
Optional Java class (that implements Use your implementation of the The class must be fully qualified by its package name and included in the deployment JAR file. |
|
Optional TopLink database platform class (instance of Set this value to the database platform class that corresponds to the database that your application uses. The class must be fully qualified by its package name. |
|
Optional flag to allow relationships between remote objects. This flag may be used as a way to migrate from TopLink EJB 1.1 entities (when relationships were created between remote entities). Using this flag does not comply with EJB 2.0. Valid values are:
|
|
When you select TopLink as the persistence manager (see name
in Table 8-2), use the pm-properties
subentry for cache-synchronization
(see Table 8-4) to configure TopLink cache coordination features of the session that the TopLink run time uses internally for CMP projects. For more information about TopLink cache coordination, see "Understanding Cache Coordination".
When this subentry is present, you must use a customization class (see customization-class
in Table 8-3) to complete cache coordination configuration. For more information about TopLink cache coordination configuration, see "Configuring a Coordinated Cache".
Table 8-4 orion-ejb-jar.xml File pm-properties Subentries for cache-synchronization
Entry | Description |
---|---|
|
An indicator of whether or not cache coordination updates should be propagated to other servers synchronously or asynchronously. Valid values are:
|
|
For a JMS coordinated cache: assuming that you are using the Oracle Application Server Containers for J2EE (OC4J) JNDI naming service and that all the hosts in your coordinated cache can communicate using OC4J proprietary RMI protocol ORMI, use a URL like: ormi://<JMS-host-IP>:<JMS-host-port> where For an RMI or CORBA coordinated cache: assuming that you are using the OC4J JNDI naming service and that all the hosts in your coordinated cache can communicate using OC4J proprietary RMI protocol ORMI on OC4J default port 23791, use a URL like: ormi://<session-host-IP>:23791 where |
|
Optional username required to log in to the JNDI naming service. |
When you select TopLink as the persistence manager (see name
in Table 8-2), use the pm-properties
subentry for default-mapping
(see Table 8-5) to configure the TopLink default mapping and automatic table generation feature.
For more information about TopLink default mappings, see "Default Mapping in EJB 2.0 or 3.0 CMP Projects Using OC4J at Run Time".
For more information about TopLink automatic table generation, see "Automatic Database Table Creation".
Table 8-5 orion-ejb-jar.xml File pm-properties Subentries for default-mapping
Entry | Description |
---|---|
|
Optional element that determines what TopLink will do to prepare the database tables that are being mapped to. Valid values are:
If no The This setting overrides autocreate-tables and autodelete-tables configuration at the application (EAR) or system level. For more information, see "Automatic Database Table Creation". |
|
An element used if the generated table names are not long enough to be unique. Values are restricted to In default mapping, each entity is mapped to one table. The only exception is in many-to-many mappings where there is one extra relation table involved in the source and target entities. When However, if the same entity is defined in multiple JAR files in an application, or across multiple applications, table-naming collision is inevitable. To address this problem, set If there is no The |