Chapter 7. Application and system design guidelines 187
7.4 Design guidelines for J2EE Connector Architecture
The J2EE Connector Architecture (JCA) defines a set of standards about how a
resource adapter provides connectivity to an enterprise system application (EIS)
and how the system contracts with an application server.
There are set of contracts between the resource adapter and the application
server which provides services to the resource adapter and maintains a
pluggable mechanism when running in the application server.
There are currently two versions of the JCA specification. The JCA 1.0
specification includes outbound communication and JCA 1.5 includes outbound
as well as inbound communication.
You can find these specifications here:
http://java.sun.com/j2ee/connector/
7.4.1 Components of J2EE Connector Architecture
Figure 7-20 J2EE Connector Architecture components
System Level Contracts
Life Cycle Management
Connection Management
Transaction Management
W ork Management
Message Inflow
Transaction Inflow
Security Management
E IS -S pecific
Interface
Common
Client
Interface
Application
Component
J2EE
Application Server
Resource
Adapter
Enterprise
Information System
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.
򐂰 System contracts
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.

Get Patterns: Implementing Self-Service in an SOA Environment 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.