Sunday, October 7, 2007

Installing the EJB 2.0 Container with Weblogic

To install EJB 2.0 for BEA WebLogic Server:

Download the weblogic510ejb20b1.zip file.

Unzip the contents of weblogic510ejb20b1.zip to a temporary directory. You should have three files named ejb20.jar, ejb20-cmp.jar, and ejb20-examples.zip.
Create a persistence20 directory in lib subdirectory of your existing WebLogic Server Version 5.1 installation:

$ mkdir %WL_HOME%\lib\persistence20

Copy the ejb20-cmp.jar file to the /lib/persistence20 subdirectory.
$ cp ejb20-cmp.jar %WL_HOME%\lib\persistence20


Extract the ejb20-examples.zip file to the examples subdirectory of your existing WebLogic Server Version 5.1 installation:
$ cd %WL_HOME%
$ jar xvf path\ejb20-examples.zip


This creates an ejb20 subdirectory containing the EJB 2.0 examples.
Add the path to ejb20.jar to the beginning of the weblogic.classpath and Java classpath variables. For example, if you use setEnv.cmd and startWebLogic.cmd to start the server, edit the following lines.

Note:
ejb20.jar must appear at the beginning of weblogic.classpath.
In setEnv.cmd, add ejb20.jar to the beginning of the classpath, as in:
set CLASSPATH=path\ejb20.jar;c:\weblogic\lib\weblogic510sp3boot.jar;%JDK_CLASSES%%W
L_HOME%\license;%WL_HOME%\classes;%WL_HOME%\lib\weblogicaux.jar;%CLIENT_CLASSES%;%SERVER_CLASSES%%RMIFORMS%


In startWebLogic.cmd, add ejb20.jar to the beginning of the weblogic.classpath, as in:

set
WEBLOGIC_CLASSPATH=path\ejb20.jar;.\lib\persistence\weblogic510sp3.jar;.\licens
e;.\classes;.\lib\weblogicaux.jar;.\myserver\serverclasses

No comments: