EJB CICS sample application task guide: Deployment
sgd005
Assemble EJB CICS sample application files in a staging directory
In preparation for deploying and installing the EJB CICS sample application you need to assemble the various components into a staging directory.
The CICS components of the sample application that you have prepared are:
- Enterprise bean: CICSSample
- Command beans: V2CSTDBCommand, V2ACTDBCommand
The Web servelet classes of the sample application that you have prepared are:
- SampleServlet.servlet
- CustomerData.class
- ErrorData.class
- SampleServlet.class
The remaining supplied components of the sample application are:
- Java Server Pages (JSPs)
-
SampleError.jsp
SampleResults.jsp
- HTML
-
index.html
Create a staging directory
- Set up a directory on your workstation act as the staging directory into which you will export jar files from VisualAge for Java. The sample working directory: C:\cicsejb can be used as your staging directory.
Export components from VisualAge for Java
The components to be exported from VisualAge for Java are:
- Enterprise bean JAR file
- EJB client JAR file
- Web servlet JAR file
Generate Code for exported classes
Before exporting classes to jar files you need to generate deployed code.
- Start VAJ, go to the workbench and click on the Projects tab.
- Click on the EJB tab in the VisualAge for Java workbench.
- Right click on the CICSSample group in the left column
and select Generate Deployed Code.
Export enterprise bean JAR file
- Click on the EJB tab in the workbench.
- Right click in the Enterprise Beans column click on CICSSample and select Export -> Deployed JAR to start the Export to a deployed JAR file SmartGuide.
- Specify the name of the exported JAR file, Sample: C:\cicsejb\SampleEJB.JAR.
- Click the Details... button next to .class.
- In addition to the pre-selected classes, select CustomerData and all the command bean classes starting with V2ACTDB and V2CSTDB.
- Click OK.
- Click Finish.
Your JAR file appears in the staging directory.
- You can list the contents of the JAR file using the JAR utility:
c:
cd \cicsejb
jar -tvf SampleEJB.jar
You can also list the content of a Jar file using a zip utility.
The sample jar file supplied with CICS TS 2.1 also includes other files, including COBOL source files, etc. For convenience these files have not been included in this task step.
Note:the JAR file exported from VisualAge for Java v3.5 is a v1.0 EJB JAR file. It must be converted into a v1.1 EJB JAR file before it can be deployed and installed into a CICS Transaction Server enterprise bean server.
Export EJB client JAR file
- Right click on the CICSSample EJB Group and select Export->Client JAR...
- Enter the fully qualified name of the client jar file. Sample C:\cicsejb\SampleCLI.jar.
- Click Finish.
SampleCLI.jar appears in the staging directory.
Different versions of VisualAge for Java may add files that do not appear in the sample client jar file supplied with CICS TS 2.1.
Export web servlet supporting classes
Now export the servlet supporting Servlet, Data Bean, and Error Data Bean classes from VisualAge for Java.
- Click on the project tab in the VisualAge for Java .
- Right click on the CICSEJBSample project and select Export... to start the Export SmartGuide.
- Select the classes and/or project to be exported, then right mouse click on the selected project or classes, and select Export....
- Click Next.
- Enter the fully qualified name of the the servlet class jar file. Sample: C:\cicsejb\SampleServlet.jar.
- Click on Details for Class.
- On the Class Export panel, in the Types column, deselect all the classes except:
- ErrorData
- SampleServlet
- CustomerData
- Click OK.
- On the Export to a jar file SmartGuide panel Click on Finish.
SampleServlet.jar appears in the staging directory.
The sample jar file supplied with CICS TS 2.1 also includes other files, including html, jsp and source files, etc. For convenience these files have not been included in this task step.
with CICS TS 2.1.