EJB CICS sample application task guide: Deployment

sgd005


EJB CICS sample application task guide

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:

The Web servelet classes of the sample application that you have prepared are:

The remaining supplied components of the sample application are:

Java Server Pages (JSPs)
SampleError.jsp
SampleResults.jsp

HTML
index.html

    Create a staging directory

  1. 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:

    Generate Code for exported classes

    Before exporting classes to jar files you need to generate deployed code.
  2. Start VAJ, go to the workbench and click on the Projects tab.
  3. Click on the EJB tab in the VisualAge for Java workbench.
  4. Right click on the CICSSample group in the left column and select Generate Deployed Code.

    Export enterprise bean JAR file

  5. Click on the EJB tab in the workbench.
  6. 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.
  7. Specify the name of the exported JAR file, Sample: C:\cicsejb\SampleEJB.JAR.

    Export EJB smartguide panel: Specify destination

  8. Click the Details... button next to .class.
  9. In addition to the pre-selected classes, select CustomerData and all the command bean classes starting with V2ACTDB and V2CSTDB.

    Export EJB smartguide panel: Specify classes

  10. Click OK.
  11. Click Finish.
    Your JAR file appears in the staging directory.
  12. 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

  13. Right click on the CICSSample EJB Group and select Export->Client JAR...
  14. Enter the fully qualified name of the client jar file. Sample C:\cicsejb\SampleCLI.jar.

    Export EJB Client smartguide

  15. 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.
  16. Click on the project tab in the VisualAge for Java .
  17. Right click on the CICSEJBSample project and select Export... to start the Export SmartGuide.
  18. Select the classes and/or project to be exported, then right mouse click on the selected project or classes, and select Export....

    Export smartguide panel: Specify destination

  19. Click Next.
  20. Enter the fully qualified name of the the servlet class jar file. Sample: C:\cicsejb\SampleServlet.jar.
  21. Click on Details for Class.
  22. On the Class Export panel, in the Types column, deselect all the classes except:

    Export smartguide panel: Specify classes

  23. Click OK.

    Export smartguide panel: Specify JAR options

  24. 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.