user manual

280 BES Developers Guide
Common Client Interface (CCI)
directly with the Borland Enterprise Server; this provides for a smoother, less
costly migration path to J2EE 1.3.
The CCI defines a remote function call interface that focuses on executing
functions on an EIS and retrieving the results. The CCI is independent of a
specific EIS; in other words, it is not bound to the data types, invocation hooks,
and signatures of a particular EIS. The CCI is capable of being driven by EIS-
specific metadata from a repository.
The CCI enables the Borland Enterprise Server to create and manage
connections to an EIS, execute an interaction, and manage data records as
input, output, or return values. The CCI is designed to leverage the Java
Beans architecture and Java Collection framework.
The Connectors 1.0 specification recommends that a Resource Adapter
support CCI as its client API, while it requires the Resource Adapter to
implement the system contracts. A developer may choose to write the
Resource Adapter to provide a client API different from the CCI, such as:
the Java Database Connectivity (JDBC) API (an example of a general EIS-
type interface), or
for example, the client API based on the IBM CICS Java Gateway (an
example of a EIS-specific interface)
The CCI (which form the application contract) consists of the following:
ConnectionFactory A ConnectionFactory implementation creates a
connection and interaction object as a means of interacting with an EIS. Its
getConnection method gets a connection to an EIS instance.
Connection A Connection implementation represents an application level
handle to an EIS instance. The actual connection is represented by a
ManagedConnection. An application gets a Connection object by using the
getConnection method of a ConnectionFactory object.
Interaction An Interaction implementation is what drives a particular
interaction. It is created using the ConnectionFactory. The following three
arguments are needed to carry out an interaction via the Interaction
implementation: InteractionSpec, which identifies the characteristics of the
concrete interaction, and Input and Output, which both carry the exchanged
data.
InteractionSpec An InteractionSpec implementation defines all interaction-
relevant properties of a connector (for example, the name of the program to
call, the interaction mode, and so forth). The InteractionSpec is passed as
an argument to an Interaction implementation when a particular interaction
has to be carried out.
Input and output The input and output are records.
A record is a logical collection of application data elements that combines the
actual record bytes together with its type. Examples are COBOL and C data
structures. Record implementation in CCI uses streams. In the
javax.resource.cci.Streamable interface, reading and writing from streams is
handled by read and write methods. In the javax.resource.cci.Record
interface, getRecordName() and getRecordShortDescription(), and