EJB CICS sample application task guide: Deployment

sgd030


The EJB CICS sample application task guide

Install into CICS using CICS Production Deployment Tool

The CICS production deployment tool is a tool for system administrators to use to install enterprise bean applications in deployed JAR files into CICS systems. The tool also provides the capability for editing the JAR file deployment descriptor and creating the CICS or CPSM resource definitions required to run enterprise bean applications.

The CICS production deployment tool applies specified required changes to the ejb-jar file and is able to produce as output:

  1. a deployed ejb-jar file, containing all the modifications required before it may be used. If stored in HFS this ejb-jar file is ready to be used.
  2. a DFHCSDUP input stream to define in the host system CSD the CICS resource definitions relevant to the Enterprise JavaBeans in this ejb-jar file.
  3. BATCHREP input stream which may be used in a CICSPlex SM environment to fulfil an equivalent function to the DFHCSDUP input stream.
Each use of the CICS production deployment tool can generate either a DFHCSDUP input stream, or a BATCHREP input stream, or both, as the user chooses.

For this task we assume that you have:

    Transfer deployed JAR files to z/OS HFS

    To run the enterprise bean on the CICS TS enterprise bean server, you will need to copy the deployed JAR file and the JAR files containing supporting classes from the staging directory to an HFS directory on the CICS LPAR.

  1. Use your FTP client to copy sampleEJB.jar from:
    Sample C:\cicsejb\ sampleEJB.jar
    to
    Sample HFS destination directory: /usr/deployedJARs/SampleEJB.jar

    Give CICS permission to read deployed JAR files

    Ensure that CICS has the permissions to read the JAR Files, or CICS will not be able to run your Enterprise Bean.

  2. Use chmod 644 to give your CICS region userid read and execute permissions for /usr/deployedJARs/SampleEJB.jar

    Install DJAR in CICS

  3. Use the menu option of the Windows NT (or Windows/2000) Start menu, Programs, IBM CICS TS 2.1 Tools, Production Deployment Tool for EJB Technology to start the CICS production deployment tool

    Two windows open on your workstation:

      Access the Production Deployment Tool task panels

    1. Click on CICS EJB Deployment at the top of the left hand side to activate the tool.

      Production Deployment Tool panel: JAR file tasks

    2. Click on the Tasks tab.
    3. Click on the twistie for JAR File tasks to show the task steps.

      Production Deployment Tool panel: Expanded JAR file task tree 1

    4. At the top of the right hand panel, select Work with JAR files via FTP.
      Click OK.

      Production Deployment Tool panel: Expanded JAR file task tree 2

      Open DJAR file

    5. Click on Choose FTP server on the task list in the left hand panel.
      Click Yes to start a new JAR file editing session.
    6. On the panel Choose an FTP server enter:
      z/OS Host name <host name>
      FTP user id <your user id for host access>
      Password <your password for host access>

      Production Deployment Tool panel: Specify FTP server


      Click OK.

    7. Click on Specify JAR files in the task list, which is now enabled.
      Click Yes to start a new JAR file editing session.
    8. Specify file names for:
      Source JAR file. Sample: /usr/deployedJARS/SampleEJB.jar
      Destination JAR file. Sample:/usr/deployedJARS/SampleEJB.jar
      Click OK
    9. Click Yes to overwrite the source file with the destination file.

      The remaining tasks in the task hierarchy are now enabled.

      Production Deployment Tool panel: Enabled JAR file task tree

      Set EJB attributes

      There are no environment entries in the application sample.

      Set CICS resources

      CORBASERVER
      The CORBASERVER definition was created when CICS was configured as an EJB server

      DJAR

    10. Click on Define DJAR to create the resource definition for the DJAR.
    11. Click on Create to open the DJAR resource definition form.
    12. Enter the required attributes for the DJAR definition:
      name: EJBSAMP
      description: DJAR for EJBSample
      corba-server: CSV1
      hfs-file: /usr/deployedJARs/SampleEJB.jar

      Production Deployment Tool panel: DJAR Definition

    13. Click OK to dismiss the Define DJARS panel.

      REQUESTMODEL
      The EJB CICS Sample Application uses the default transaction CIRP, so a Request Model definition is not required

      Set Container Bindings

      There are no container bindings to set.

      Save DJAR file

    14. Click on Save JAR file in the task tree.
    15. Click Yes to confirm the save request.
      A message shows the status of the FTP transfer. ClickOK.

      Set up batch update stream

      Create a DFHCSDUP batch file to create the specified resource definitions in CICS.
    16. Click on Set up batch update streams on the task tree to open the set up panel.
    17. Select CICS DFHCSDUP stream, or CICSPlex SM BATCHREP stream, or both.

      Production Deployment Tool panel: Select batch update stream types

    18. Click OK to open the Define CICS parameters panel or the Define CICSPlex SM parameters panel, or both.

      DFHCSDUP update
      On the Define CICS parameters panel, enter:
      CSD list: C021LIST
      CSD Group: C021EJB
      Output HFS file name: /usr/deployedJARs/C021CSD

      Production Deployment Tool panel: Specify CICS parameters

    19. Click OK to close the Define CICS parameters panel.
      A message shows the status of the FTP transfer. ClickOK.

      BATCHREP update
      On the Define CICSPlex SM parameters panel edit the fields to set:
      Context: <name of your Context>
      RESDESC: EJBSAMPD
      RESGROUP: EJBSAMPG
      Output HFS file name: /usr/deployedJARs/SAMPBREP

      Production Deployment Tool panel: Specify CPSM parameters

    20. Click OK to close the Define CICSPlex SM parameters panel.
      A message shows the status of the FTP transfer. ClickOK.
    21. Close the CICS Production Deployment Tool.

      Install CICS Resources into a CSD using DFHCSDUP

      The CSD update information produced by the CICS Production for the EJB Application Sample in C021CSD, with the JCL for the update job added, is:

      
      //C021CSDU JOB (0),RACF,MSGCLASS=H,REGION=3M,TIME=1439,
      //  CLASS=A,NOTIFY=&SYSUID
      /*JOBPARM   LINES=9999
      //JCLLIB   JCLLIB ORDER=DEMOCICS.C021.JCL
      //*
      //* RUN DFHCSDUP TO
      //* CREATE REQUIRED RESOURCES FOR CICS EJB SAMPLE
      //*
      //CSDUP    EXEC PGM=DFHCSDUP,REGION=4M
      //STEPLIB   DD DISP=SHR,DSN=CTS210.CICS610.SDFHLOAD
      //DFHCSD    DD DISP=SHR,DSN=DEMOCICS.COMMON.CICSTS21.DFHCSD,
      //             AMP=('BUFND=4,BUFNI=12')
      //SYSPRINT  DD SYSOUT=*
      //SYSUDUMP  DD SYSOUT=*
      //SYSIN     DD *
      *********************************************************************** 03600000
      *  CICS EJB SAMPLE RESOURCE DEFINITIONS                               * 01600000
      *                                                                     * 02000000
      *  CICS RESOURCE DEFINITION BATCH UPDATE STREAM CREATED USING THE     * 02400000
      *  CICS EJB PRODUCTION DEPLOYMENT TOOL.                               * 02800000
      *                                                                     *
      *  THE ASSUMPTION IS THAT THE CICS REGION IS ALREADY CONFIGURED AS    *
      *  AS AN EJB SERVER, SO ONLY THE DJAR DEFINITION IS REQUIRED.         *
      *********************************************************************** 03600000
      DELETE DJAR(EJBSAMP)
             GROUP(C021EJB)
      
      DEFINE DJAR(EJBSAMP)
             GROUP(C021EJB )
             DESCRIPTION(DJAR for EJB Sample)
             CORBASERVER(CSV1)
             HFSFILE(/usr/deployedJARs/SampleEJB.jar)
      
      ADD GROUP(C021EJB) LIST(C021LIST)
      
      

    22. Update the sample JCL with the information required for your own system:
      Edit name of your CICS libraries
      Edit name of your CSD
    23. Run the DFHSCDUP job to create the definitions in the specified group, Sample: C021EJB.
    24. Use CEDA to install the definitions in C021EJB into your CICS system.

      Install CICS Resources into CPSM using BATCHREP

      The CICSPlex SM repository update file produced by the CICS Production for the EJB Application Sample in SAMPBREP is:

      
      CONTEXT CICSPLX1;
      CREATE RESDESC RESDESC(EJBSAMPD)
                     DESCRIPTION( )
                     LSREGSTR(NO)
                     AUTOINST(NO)
                     ;
      CREATE RESGROUP RESGROUP(EJBSAMPG)
                      DESCRIPTION( )
                      ;
      CREATE RESINDSC RESDESC(EJBSAMPD)
                      RESGROUP(EJBSAMPG)
                      DESCRIPTION( )
                      ;
      CREATE EJDJDEF NAME(EJBSAMP)
             RESGROUP(EJBSAMPG)
             DESCRIPTION('DJAR for EJB Sample')
             CORBASERVER(CSV1)
             HFSFILE(/usr/deployedJARs/SampleEJB.jar)
             ;
      
      

    25. Ensure that the BATCHREP file contains the information required for you own system:
      Your Context name
    26. Sign on to TSO on the system where your CPSM maintenance point CMAS is running and invoke the CPSM EUI.
    27. Set the required Context for the CMAS responsible for the management of the CICS EJB server.
    28. Invoke the BATCHREP view and specify the name of the BATCHREP stream data set.
    29. Ensure that all other required BATCHREP parameters are specified and load the definitions into the CPSM repository.
    30. Install the definitions into the CICS EJB server.

      Publish the EJB Location to the JNDI Server

    31. Use CEMT to publish the enterprise bean to your JNDI server:
      CEMT PERFORM DJAR(EJBSAMP) PUBLISH.
      This adds the bean name CICSSample to the CORBASERVER prefix, Sample: SAMP. This gives the name SAMP/CICSSample which CICS writes to the JNDI server when it is published.

      View CICS Resources for the enterprise bean

    32. Use CEMT to display resources relating to enterprise beans.

      CEMT I TCPIPSERVICE will display information about TCPIPSERVICE definitions.
      CEMT I CORBASERVER will display information about CORBASERVER definitions.
      CEMT I DJAR will display information about DJAR definitions.
      CEMT I BEAN will display information about Enterprise Beans.

      CICS Messages

    33. CICS messages can be found by logging onto TSO and displaying the log using SDSF.

    You are now ready to test your EJB CICS application.