188 Patterns: Implementing Self-Service in an SOA Environment
As shown in Figure 7-20 on page 187, Version 1.5 of the J2EE Connector
Architecture defines a number of components and interfaces that make up this
architecture to connect to any EIS. JCA main components include resource
adapter, system level contracts between application server and resource
adapter, and the Common Client Interface (CCI).
JCA 1.5 defines the following:
Common Client Interface (CCI)
The CCI defines a common API for interacting with resource adapters. It is
independent of a specific EIS. A Java developer communicates to the
resource adapter using this API.
These contracts are a set of system-level contracts between an application
server and EIS. These extend the application server to provide:
Connection management enables an application server to pool
connections to the underlying EIS and enables application components to
connect to an EIS. This leads to a scalable application environment that
can support a large number of clients requiring access to an EIS.
Transaction management enables an application server to use a
transaction manager to manage transactions across multiple resource
managers. This contract also supports transactions that are managed
internal to an EIS resource manager without the necessity of involving an
external transaction manager.
Security management provides support for a secure application
environment that reduces security threats to the EIS and protects valuable
information resources managed by the EIS
Life cycle management (new in JCA 1.5) enables an application server to
manage the life cycle of a resource adapter. This contract provides a
mechanism for the application server to bootstrap a resource adapter
instance during its deployment or application server startup, and to notify
the resource adapter instance during its undeployment or during an
orderly shutdown of the application server.
Work management (new in JCA 1.5) enables a resource adapter to do
work (monitor network endpoints, call application components, and so on)
by submitting Work instances to an application server for execution. The
application server dispatches threads to execute submitted Work
instances. This allows a resource adapter to avoid creating or managing
threads directly, and allows an application server to efficiently pool threads
and have more control over its runtime environment. The resource adapter
can control the security context and transaction context with which Work
instances are executed.