EJB CICS sample application task guide: Deployment
sgd010
Install JAR files and definitions into CICS using generic tools
This method makes the minimum assumptions about the tools used to create an enterprise bean or the development tools installed on a workstation.
For this task we assume that you have:
- Installed the CICS JAR Development Tool for EJB Technology,
- Installed and configured an FTP client to copy files from your workstation to the z/OS,
- Assembled all the components of the CICS EJB Sample Application into your staging directory,
- Created a deployed JAR file using the CICS JAR Development Tool.
Transfer 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 (DJAR) file and the JAR files containing supporting classe from the staging directory to an HFS directory on the CICS LPAR.
- 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.
- Use chmod 644 to give your CICS region userid read and execute permissions for /usr/deployedJARs/SampleEJB.jar.
Add Entries to the CLASSPATH
Add the names of the JAR files to the CLASSPATH in the profile for the JVM.
- In the sample profile: DFHJVMPR, these have been added to the CLASSPATH statement:
CLASSPATH=\
/usr/lpp/cicsts/cicsts21/samples/ejb/bankaccount/ccf.jar:\
/usr/lpp/cicsts/cicsts21/samples/ejb/bankaccount/eablib.jar:\
/usr/lpp/cicsts/cicsts21/samples/ejb/bankaccount/recjava.jar:.
Define the JAR file to CICS
The DJAR definition tells CICS where your deployed JAR File is located. Since DJARs are associated with CORBASERVERS, you need to specify the fully qualified name/location of your deployed JAR File and the name of the associated CORBASERVER.
- User CEDA to define the enterprise bean DJAR. Sample: EJBSAMP:
- Use CEDA to install the DJAR definition. Sample: EJBSAMP.
Publish the EJB Location to the JNDI Server
- 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, giving the name SAMP/CICSSample which CICS writes to the JNDI server when it is published.
View CICS Resources for the enterprise bean
- 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
- CICS messages can be found by logging onto TSO and displaying the log using SDSF.