Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
OC4J supports the following persistence APIs:
TopLink EJB 3.0 JPA persistence provider (see "How Does OC4J Manage Persistence in an EJB 3.0 Application?")
TopLink EJB 2.1 persistence manager (see "How Does OC4J Manage Persistence in an EJB 2.1 Application?")
Orion EJB 2.0 persistence manager (deprecated: see the Oracle Containers for J2EE Orion CMP Developer's Guide)
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 |
---|---|---|---|---|
|
Absent |
Optional; if present, contains no mappings and no |
Toplink |
Default TopLink |
|
Present |
Optional; if present, contains no mappings and no |
Toplink |
TopLink as defined in |
Present |
Optional; if present, contains no mappings |
Toplink |
TopLink as defined in |
|
|
Absent |
Present and contains Orion mappings; |
Orion |
Orion as defined in |
|
Absent |
Optional; if present, contains no mappings |
Orion |
Default Orion |
Footnote 1 See "<persistence-manager>".
For more information, see the following: