Design of the CICS Java Component

With the skeleton and helper classes generated by the IDL-to-Java compiler process, we now need to write a Java class that will specifically implement the getAccount method we defined in the IDL. With the JCICS Java class library, our CORBA server implementation can perform a program link to (or wrapper) the existing NACT02 program that is written in COBOL and request customer account details. The program is encapsulated by the Java implementation class we write and there is no need to make any changes to the COBOL application. For providing access to legacy CICS applications, the JCICS library is very powerful.

The program link passes parameters using the COMMAREA. The implementation class we write must prepare a COMMAREA suitable for the NACT02 program to include type of request (read), the customer account number, and provide return fields for response, reason and error codes, and of course the account details themselves.

After an IIOP request invokes the getAccount method, the customer account details for the given account number must be returned in the AccountData format.

For our sample application, we split these tasks into three methods:

getAccount( )

Puts request parameters into a string and invokes the callCRUD( ) method. Returned account data is then extracted and set in the AccountData format.

callCRUD( )

Invokes buildCA( ) to prepare the COMMAREA, then performs a program link to the NACT02 program.

buildCA( )

Converts a COMMAREA string into a byte array.

Specific information on developing the Java class and its methods is described in Chapter 7.