Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (10.1.3.5.0)

Part Number E13981-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Understanding EJB Persistence Services

OC4J supports the following persistence APIs:

OC4J chooses the type of persistence to use based on the type of object-relational mappings you define and the presence or absence of certain deployment XML files. How OC4J chooses depends on the type of EJB application you are deploying:

EJB 3.0 Applications

OC4J uses the TopLink EJB 3.0 JPA persistence provider if you deploy EJB 3.0 entities in an ejb.jar file without an ejb-jar.xml file, or if OC4J detects one or more EJB 3.0 annotations.

For more information, see the following:

EJB 2.n Applications

For EJB 2.1 and EJB 2.0 applications, OC4J uses the algorithm that Table 2-4 summarizes by your action. For example, if you deploy a CMP application without a toplink-ejb-jar.xml file, OC4J uses the TopLink persistence manager and creates default TopLink object-relational mappings.

Table 2-4 OC4J EJB 2.n Persistence Manager Selection

Your Action toplink-ejb-jar.xml orion-ejb-jar.xml Persistence Manager Mapping Type
  1. Deploy.

Absent

Optional; if present, contains no mappings and no persistence-manager element.

Toplink

Default TopLink

  1. Deploy.

Present

Optional; if present, contains no mappings and no persistence-manager element.

Toplink

TopLink as defined in toplink-ejb-jar.xml (default persistence manager properties)

  1. Edit the orion-ejb-jar.xml file to set persistence-manager element name attribute to toplinkFoot 1 .

  2. Edit additional persistence-manager subentriesFootref 1.

  3. Deploy.

Present

Optional; if present, contains no mappings

Toplink

TopLink as defined in toplink-ejb-jar.xml (custom persistence manager properties)

  1. Deploy.

Absent

Present and contains Orion mappings; persistence-manager element is optional.

Orion

Orion as defined in orion-ejb-jar.xml

  1. Edit the orion-ejb-jar.xml file to set persistence-manager element name attribute to orionFootref 1.

  2. Deploy.

Absent

Optional; if present, contains no mappings

Orion

Default Orion


Footnote 1 See "<persistence-manager>".

For more information, see the following: