10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Common Client Interface<br />

Transaction Inflow<br />

<strong>The</strong> Connector architecture supports importing transactions from an EIS to a <strong>Java</strong> <strong>EE</strong> server.<br />

<strong>The</strong> architecture specifies how to propagate the transaction context from the EIS. For example,<br />

a transaction can be started by the EIS, such as the Customer Information Control System<br />

(CICS). Within the same CICS transaction, a connection can be made through a resource<br />

adapter to an enterprise bean on the application server. <strong>The</strong> enterprise bean does its work under<br />

the CICS transaction context and commits within that transaction context.<br />

<strong>The</strong> Connector architecture also specifies how the container participates in transaction<br />

completion and how it handles crash recovery to ensure that data integrity is not lost.<br />

Common Client Interface<br />

1016<br />

This section describes how components use the Connector architecture Common Client<br />

Interface (CCI) API and a resource adapter to access data from an EIS.<br />

Defined by the J2<strong>EE</strong> Connector architecture specification, the CCI defines a set of interfaces<br />

and classes whose methods allow a client to perform typical data access operations. <strong>The</strong> CCI<br />

interfaces and classes are as follows:<br />

■ ConnectionFactory: Provides an application component with a Connection instance to an<br />

EIS.<br />

■ Connection: Represents the connection to the underlying EIS.<br />

■ ConnectionSpec: Provides a means for an application component to pass<br />

connection-request-specific properties to the ConnectionFactory when making a<br />

connection request.<br />

■ Interaction: Provides a means for an application component to execute EIS functions,<br />

such as database stored procedures.<br />

■ InteractionSpec: Holds properties pertaining to an application component’s interaction<br />

with an EIS.<br />

■ Record: <strong>The</strong> superclass for the various kinds of record instances. Record instances can be<br />

MappedRecord, IndexedRecord,orResultSet instances, all of which inherit from the<br />

Record interface.<br />

■ RecordFactory: Provides an application component with a Record instance.<br />

■ IndexedRecord: Represents an ordered collection of Record instances based on the<br />

java.util.List interface.<br />

A client or application component that uses the CCI to interact with an underlying EIS does so<br />

in a prescribed manner. <strong>The</strong> component must establish a connection to the EIS’s resource<br />

manager, and it does so using the ConnectionFactory. <strong>The</strong> Connection object represents the<br />

actual connection to the EIS and is used for subsequent interactions with the EIS.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!