Setting up TXSeries program to call JEE Server program

This topic explains how to invoke Java EE Server program from TXSeries program.

This topic explains how to set up TXSeries program to call JEE Server program.

You can use your existing C, COBOL and PL/I program in TXSeries to call JEE program in WebSphere Application Server by adding Distributed Program Link (DPL) to invoke JEE application in the application source code. You can follow below step to write your first CICS application invoking the JEE application in WebSphere Application Server.

  1. You must create an EJB application and deploy the EJB application in WebSphere Application (JEE) Server before starting this activity.

    For example, you have already created an Enterprises application bean “FirstEJBSessionBean” with application name “FIRSTGTSEJB” with resource JNDI name “eis/Firstbean” and method name “FirstMethod”.

  2. You must create a program definition entry for EJB application in TXSeries program definition file and provide program PathName as deployed enterprise application JNDI name and the EJB method name separated with ‘#’ character.
    For example: - To add program definition, run
    cicsadd -cpd -r region_name CALLEJB   \
            PathName=“eis/Firstbean#FirstMethod”

    If no method is specified in Program Definition PathName entry, then WebSphere Application Server will treat default method name as ‘execute’. It will try to invoke ‘execute’ method from Enterprises Application.

  3. Your application program can use DPL, by adding the location of the back-end program in program definition file and not specifying the remote server details or explicitly specifying a remote system name in program definition entry.

    For Example, you specify that the back-end program to run on a connected WebSphere application Server by providing the RemoteSysId and RemoteName attributes in the Program Definitions (PD) entry for the program.

    EXEC CICS LINK PROGRAM(‘CALLEJB’) COMMAREA(CR)

    If the PD for CALLEJB has a RemoteSysId defined, the link request is forwarded to that system with EJB JNDI name defined in program definition PathName.

    Otherwise, with the EXEC CICS LINK command, an application program can use the SYSID parameter to specify the connection to the remote system that owns the EJB program. The advantage is that any system, including the local system, can be named in the SYSID attribute.

    Refer to the following example:

    EXEC CICS LINK PROGRAM('CALLEJB') SYSID('ISC1') COMMAREA(CR)

    The EXEC CICS LINK command is routed to the WebSphere Application Server that is defined by the Communications Definitions (CD) ISC1 with the EJB JNDI name defined in the PD definition of region.

Note: COMMAREA option is mandatory in the LINK API when the TXSeries application invokes the EJB application in JEE server.

For more information refer to the topic Programming CICS JEE Inbound Adapter in CICS Transaction Gateway Knowledge center http://www.ibm.com/support/knowledgecenter/SSZHFX_9.2.0/com.ibm.cics.tg.doc/welcome.html