The programming interface model

Applications using the CCI have a common structure, independent of the EIS that is being used. The JCA defines Connections and ConnectionFactories which represent the connection to the EIS. These objects allow a J2EE application server to manage security, transaction context, and connection pools for the resource adapter.

An application must start by obtaining a ConnectionFactory from which a Connection can be obtained. The properties of this Connection can be overridden by a ConnectionSpec object. The ConnectionSpec class is CICS-specific, so may be either an ECIConnectionSpec or an EPIConnectionSpec.

After an connection has been obtained, an Interaction can be created from the Connection in order to make a particular request. As with the Connection, Interactions can have custom properties set by the CICS-specific InteractionSpec class (ECIInteractionSpec or EPIInteractionSpec). To perform the Interaction, call the execute() method and use CICS-specific Record objects to hold the data. For example:
			Obtain a ConnectionFactory
			Connection c = cf.getConnection(ConnectionSpec)
			Interaction i = c.createInteraction()
			InteractionSpec is = newInteractionSpec();
			i.execute(spec, input, output)	
The ConnectionFactory can be obtained in two ways: