Chapter 8. Comparing CCF to J2C Architecture 157
ConnectionSpec interface
The ConnectionSpec interface implementation stores the connection properties
of the CCF connector. These properties may include the host name, port
number, or both, and should uniquely identify the connection. The
ConnectionSpec implementation is also a Communication Factory capable of
creating a communication interface that drives interactions with the EIS, specified
through the ConnectionSpec properties.
InteractionSpec interface
The InteractionSpec interface stores the interaction properties for a specific CCF
connector that is needed by the communication interface to carry out a single
interaction with the EIS. These properties can include the name of the
transaction to invoke, the datastore name, and so forth. The properties are
connector-dependent. However, if the underlying EIS requires transactional
support and the CCF Infrastructure QoS implementation does not provide any
transaction management, the CCF connector could use those interaction
properties.
Communication interface
The CCF connector implementation of the communication interface provides the
means for the application component to perform interaction with the EIS using
the connector.
Input and Output components of the Communication interface
The Input and Output components of the communication interface are beans that
represent the data exchanged with the underlying EIS. The data is accessible by
an application component via the bean property accessor methods. The
implementation of the bean is either based on the Java Record Library or is
proprietary to a particular CCF connector.
8.1.2 CCF Infrastructure interfaces
Together with the CCF connector, the Application Server runtime environment
supplies the following CCF Infrastructure classes in order to provide the
application components with a set of Quality of Services:
򐂰 RuntimeContext class
򐂰 ConnectionManager interface
򐂰 ManagedFactory interface
򐂰 Managed interface
򐂰 SessionId class
򐂰 Coordinator interface
򐂰 Resource interface
򐂰 LogonInfo interface
158 CCF-to-J2C Architecture Migration
򐂰 LogonInfoItems class
򐂰 RASService interface
These classes are described in this section and a sample application that depicts
their use is provided in 8.1.5, “Setting up the QoS for a sample IMS CCF
application” on page 164.
RuntimeContext class
A RuntimeContext implementation enables the Application Server runtime to
provide its QoS to the CCF connectors and thus to the application component.
The RuntimeContext uses the concept of a single threaded context to make itself
available to a CCF connector. Namely, the Application Server binds the
application component to the current RuntimeContext thread, and the application
component uses the thread to call the CCF connector. The CCF connector gets
the QoS it is interested in from the current RuntimeContext thread.
ConnectionManager interface
A ConnectionManager implementation provides the means to a more efficient
use of physical connections by managing pools of connections and their
respective usage states (unused, used, unused and associated with a session,
used and associated with a session). The following steps describe the
management of the connection, also depicted in Figure 8-2 on page 156:
1. A ConnectionSpec acts as a factory for a Communication object.
2. The Communication object uses the ConnectionManager to reserve the use
of a physical connection.
3. With the connection reserved, the Communication object passes a
ManagedFactory object and the ConnectionSpec that created the
communication to the connection manager. The ConnectionSpec is used to
look up whether an unused physical connection exists, and the
ManagedFactory is used to create a new physical connection if none is
available.
4. When the Communication object has completed its interactions, it releases
the connection back to the ConnectionManager.
The ConnectionManager views a physical connection as an object implementing
the Managed interface. Through the Managed interface, the ConnectionManager
controls the state of the physical connection (life cycle).
Important: The creation of the RuntimeContext for each request does not
create significant overhead because the QoS implementations such as the
ConnectionManager, Coordinator, LogonInfo, and RASService, are singleton
objects in memory.

Get CCF-to-J2C Architecture Migration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.