JCA Concepts
Internal
Java EE Connector Architecture (JCA)
Java EE Connector Architecture (JCA) defines a standard architecture for JEE systems to access external heterogenous Enterprise Information Systems (EIS), such as databases, messaging systems and mainframe transaction processing. The external EIS are referred to as resource managers. The JEE system interaction to the external system is channeled through a collocated component written in Java and named resource adapter. JCA define a standard set of contracts between the JEE server and the resource adapter. The standard contracts include:
- Connection Management Contract. This contracts allows the JEE server pool connections to the underlying EIS, allowing for a scalable application environment where a large number of clients use efficiently a relatively low number of connections to the EIS.
- Transaction Management Contract. This contract refers to interaction between the JEE transaction manager and transactional EIS system, and allows the JEE transaction manager to manage transaction across multiple resource managers. Transactions that are managed internally by the EIS without the involvement of an external transaction manager are also supported by this contract. JCA 1.5 adds a Transaction Inflow Management Contract which allows a resource adapter to propagate an imported transaction content to the JEE server.
- Security Contract that enables secure access to the EIS.
- Lifecycle Management Contract enables a JEE server to manage the lifecycle of the resource adapter from initiation through upgrades to obsolescence. The JEE server can bootstrap the resource adapter during its own startup and notifies the resource adapter of its shutdown.
- Thread Management Contract allows the resource adapter to delegate work to JEE-managed threads. The JEE server pools and manages threads, but the resource adapter can control the security context and the transaction context of the worker threads, but it allows it to avoid creating threads directly.
- Message Provider Pluggability Contract. This contract allows the resource adapter to deliver messages to MDBs independently of the specific messaging style, semantics and infrastructure used to deliver messages. This is known as message inflow management.
- Optionally, a Generic Command Interface Contract between the JEE server and the resource adapter.
Resource Manager
An external EIS is referred to as a resource manager in a JCA context.
Resource Adapter
A resource adapter is a component that implements JCA API and architecture. It is similar to a datasource, however, it provides connectivity to and from an Enterprise Information System (EIS) such as a database, messaging system, transaction processing system, etc. From an Application Server's perspective, a resource adapter is a deployable component, packaged in a Resource Adapter Archive (RAR), whose file can be deployed within the AS.