EJB CICS sample application task guide: Deployment
sgd008
Deploy the EJB JAR for CICS
For this task we assume that you have exported an EJB v1.0 JAR file from VisualAge for Java and saved it in your staging directory.
Deploy the EJB JAR File for CICS Transaction Server
Use the CICS JAR Development Tool for EJB Technology to create the container specific code required by CICS to execute the enterprise bean. This tool also converts the EJB v1.0 deployment descriptor created by VisualAge for Java v3.5 into the EJB v1.1 deployment descriptor required by CICS.
The CICS JAR Development Tool for EJB Technology needs access to all of the classes used in your Enterprise Bean. Some of the needed classes and interfaces are included in your SampleEJB.jar. The EJB CICS Sample Enterprise bean also uses generic classes:
- Java Record Framework: supporting classes in recjava.jar.
- CICS Connector for CICS TS feature of CICS TS 2.1: supporting classes in
recjava.jar, eablib.jar, ccf.jar, ctgclient.jar, and ctgservlet.jar.
You make these jar files (or other support classes) available to the CICS JAR Development Tool for EJB Technology via the system CLASSPATH environment variable.
- Set the CLASSPATH environment variable on a system wide basis by adding the required directory path to your system CLASSPATH variable using the System Properties panel.
- Click on Start -> Programs -> IBM CICS TS 2.1 Tools -> CICS JAR Development Tool for EJB Technology to start the CICS Jar Development Tool.
- Click on File->Load... and select the EJB JAR file. Sample: SampleEJB.jar.
- Click on Open.
The single enterprise bean in the EJB Jar file is listed in the Current Enterprise Beans field.
- Select File->Generate... to start the generation of the deployed EJB v1.1 JAR file.
The input JAR generated by VisualAge for Java 3.5 is a V1.0 EJB Jar file. The CICS JAR Development Tool for EJB Technology will generate an EJB v1.1 JAR,but will present the option to retain the V1.0 EJB data. Since there is no requirenment for the v1.0 information, click Remove.
- On the Select Output File panel, ensure that the Verbose Output option is checked to get extra messages when the enterprise bean executes.
- Ensure that the Keep generated source code option is checked.
- Click Generate to start the code generation process.
A panel pops up to show messages from the generation process.
The deployed jar file (DJAR file) is written to the C:\cicsejb directory as SampleEJB_GEN.jar.
- Close the log window using the window X control and choose File -> Exit to close the CICS Jar development tool.
- Rename the deployed Jar file from SampleEJB_GEN.jar to SampleEJB.jar.
You are now ready to install the CICS components of the EJB CICS Sample Application.