Common Client Interface (CCI)

You can create an application to use the IMS™ TM resource adapter to interact with IMS by using the Common Client Interface (CCI).

You can use the application code that is generated by the J2C wizard in a Rational® or WebSphere® integrated development environment (IDE) to access IMS transactions through the IMS TM resource adapter. No coding is necessary when you use this approach. Alternatively, you can write the application source code without using an IDE.

To write the code yourself, you must use the CCI programming interface. The CCI API provides access from Java™ EE clients, such as enterprise beans, JavaServer Pages (JSP) pages, and servlets, to backend enterprise information systems (EIS) such as IMS.

Applications that follow the CCI programming interface model have a common structure, independent of the EIS that is being used. The J2EE Connector Architecture (JCA) specification defines two objects that are necessary for the application: These objects are what an application server uses to manage security, transaction context, and connection pools for a resource adapter. An application that uses the IMS TM resource adapter CCI programming interface starts by obtaining an IMSConnectionFactory object. The IMSConnectionFactory object can be obtained in two ways:

IMS connections

An IMSConnection object can then be created from that IMSConnectionFactory object. The properties of the IMSConnection object can either be specified in an IMSConnectionSpec object passed as a parameter to the getConnection method, or the default values defined in the IMSConnectionFactory is used. After an IMSConnection is obtained, an IMSInteraction instance can be created from the IMSConnection instance. An IMSInteraction instance represents the interaction that is going to be executed on that connection. As with the connection, interactions can have custom properties taken from the IMSInteractionSpec class.

Input and output

To perform the interaction, the application makes a call to the execute() method of the IMSInteraction object, passing it input and output objects to hold the data. An input byte array must be created containing values for each field in the input message to IMS. Likewise, an output byte array must also be created to hold the response message returned by IMS. The value of each field in the output message is extracted from the output byte array.

You can write the input and output byte arrays yourself, or you can use the J2C options in a Rational or WebSphere development environment to create Java data bindings for the input and output messages of your CCI application.

Requirements for applications that retrieve data from an IMS system:
  • Use the IMSConnectionFactory object to create an IMSConnection object.
  • Use the IMSConnection object to create an IMSInteraction object.
  • Use the IMSInteraction object to execute transactions on the backend IMS system.
  • Close the IMSInteraction and IMSConnection objects.

Feedback