Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
For J2EE applications that use CMP to persist entity EJB, it is common to package the application in an Enterprise Archive (EAR) file made up of various J2EE application component archives as Figure 9-4 shows.
Figure 9-4 Packaging a J2EE Application With CMP Entity EJB
The component archives with TopLink dependencies include:
In this type of application, the EJB JAR file specifically service both non-entity and entity EJB. It includes:
The home and remote, and all implementation code for all mapped beans in the application.
All mapped non-EJB classes from the TopLink Workbench project
The home and remote, and all implementation code for any session beans included in the application.
Helper classes that contain TopLink amendment methods, and any other classes the application requires.
For example, an instance of oracle.toplink.ejb.cmp.DeploymentCustomization
(for more information, see customization-class
in Table 8-3 in "Configuring persistence-manager Entries").
Store the following XML files in the EJB JAR \meta-inf
directory:
Note: If you do not use XML files for deployment, include your compiledoracle.toplink.sessions.Project file at the root of the EJB JAR (not in the \meta-inf directory).
|
Because the EJB JAR contains both non-entity and entity EJB, if you are using OC4J or BEA WebLogic (WLS), the <J2EE-Container>-ejb-jar.xml
must contain persistence-manager
and pm-properties
entries. For more information, see "Configuring persistence-manager Entries".
You must persist all of the entity EJB to the same data source. For a CMP application, TopLink does not support session broker functionality (see "Session Broker and Client Sessions").