Oracle9iAS TopLink CMP for Users of BEA WebLogic Guide Release 2 (9.0.3) Part Number B10065-01 |
|
This chapter describes the configuration and testing of TopLink Container-Managed Persistence. Please refer to Oracle9iAS TopLink Getting Started for installation information.
TopLink Container-Managed Persistence requires:
java.exe
or jre.exe)
This procedure configures TopLink Container-Managed Persistence Foundation Library. This procedure assumes you have already installed TopLink Container-Managed Persistence.
The TopLink class library is certified 100% pure Java and can be run on any JDK 1.2 or higher Java VM/platform.
WebLogic Version | Persistence directory (above <WebLogLogicINSTALL_DIR>) |
---|---|
6.1 (service Pack 3) |
|
7.0 |
|
Under Windows, if BEA WebLogic Server is already installed, the TopLink installer automatically copies a file called persistence.install
to the WebLogic persistence directory.
If BEA WebLogic Server is not yet installed, or if you are installing TopLink in a non-Windows environment, then you must either:
persistence.install
file referencing TopLink_CMP_Descriptor.xml
.
or
<INSTALL_DIR>
\core\lib\toplink.jar;<INSTALL_DIR>
\core\lib\xerces.jar;<INSTALL_DIR>
\wls_cmp\lib\tl_wlsx.jar;
where <INSTALL_DIR>
is the directory into which you installed TopLink (C:\{ORACLE_HOME}\toplink
if you installed to the default directory).
To test TopLink Container-Managed Persistence with entity beans, run the Single Bean example documented in Chapter 9, "The EJB 2.0 Single Bean Example Application". For detailed instructions on how to set up and run this example, see Chapter 9, "The EJB 2.0 Single Bean Example Application".
When the TopLink Mapping Workbench, and the Single Bean example all run successfully, your TopLink installation is complete.
Start the server as described in the WebLogic documentation. The most reliable way to start a server is to create a startup script. Refer to the BEA WebLogic documentation for more information on class loader and classpath issues. Once the server is running, start the TopLink CMP application.
TopLink Container-Managed Persistence includes a sample domain used to deploy and run the example application. This start script is available in <INSTALL_DIR>
\examples\
under
wls6.1\Server\config\TopLink_Domain
for WebLogic 6.1 (service Pack 3)
wls7.0\Server\config\TopLink_Domain
for WebLogic 7.0
If you write your own start script, ensure that the CLASSPATH includes all of the following
<INSTALL_DIR>
\core\lib\toplink.jar;<INSTALL_DIR>
\core\lib\xerces.jar;<INSTALL_DIR>
\wls_cmp\lib\tl_wlsx.jar;
where <INSTALL_DIR>
is the directory into which you installed TopLink (C:\{ORACLE_HOME}\toplink
if you installed to the default directory).
If a security manager is used, you must specify a security policy file.
-Djava.security.manager -Djava.security.policy==c:\weblogic\weblogic.policy
A sample security policy file is supplied with the BEA WebLogic installation procedure.
Note that you will have to edit the weblogic.policy
file (normally located in the BEA WebLogic install directory) to grant permission for TopLink to use reflection. To do this, add the following line to the file in the general "grant" section.:
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
grant// Permission "enableSubstitution" needed to run the WebLogic console
permission java.io.SerializablePermission "enableSubstitution";// Permission "modifyThreadGroup" required to run the WebLogic Server
permission java.lang.RuntimePermission "modifyThreadGroup"; permission java.lang.RuntimePermission//... bulk of permissions not shown ...
//required for toplink
permission java.lang.reflect.ReflectPermission suppressAccessChecks"; };
If after successfully installing TopLink, you encounter problems running TopLink, one or more of the following suggestions may help resolve the problem:
persistence.install
file in the WebLogic installation contains the required TopLink_CMP_Descriptor.xml
entry
weblogic.policy
file is edited to reflect this.
See Oracle9iAS TopLink Troubleshooting for more information.
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|