Messaging in the J2EE Connector Architecture
System management contracts defined by JCA v1.0 ...
Connection Allow appservers to pool connections to an EIS. For scaling up to a large number of clients. Transaction Manage transactions across multiple resource managers. Security Provide support for a secure application environment. Additional system management contracts defined by JCA v1.5...
Life cycle Manage the life cycle of a resource adapter, providing a mechanism for the appserver to...
- Bootstrap a resource adapter instance during its deployment or appserver startup
- Notify the resource adapter instance during its undeployment or during an orderly shutdown of the appserver.
Work Submit work instances to an appserver for execution to...
- monitor network endpoints
- call application components
- etc...
The appserver dispatches threads to execute submitted work instances. This allows a resource adapter to avoid creating or managing threads directly, and allows an appserver to efficiently pool threads and have more control over its run time environment.
The resource adapter can control the transaction context with which work instances are executed.
Transaction inflow Enable a resource adapter to propagate an imported transaction to an appserver. Allow a resource adapter to transmit transaction completion and crash recovery calls initiated by an EIS
Ensure that the ACID properties of the imported transaction are preserved.
Message inflow Enable a resource adapter to asynchronously deliver messages to message endpoints residing in the appserver independent of...
- Messaging style
- Messaging semantics
- Messaging infrastructure
Serves as the standard message provider pluggability contract for...
- JMS
- Java API for XML Messaging (JAXM)
- etc...
For asynchronous messaging, we are most interested in....
- Connection management
- Message inflow
...which provide for inbound and outbound communication between messaging client and providers.
Message endpoints
Message-driven bean application that asynchronously consumes messages from a message provider.
J2EE v1.4 compliant appservers support EJB v2.1, which defines additional elements for the MDB deployment descriptor to support the message inflow system contract of the JCA.
MessageEndpointFactory
Used by the resource adapter to obtain references to message endpoint instances (MDBs).
Multiple message endpoint instances can be created for a single message endpoint, enabling messages to be processed concurrently.
Resource adapters
Map the proprietary API exposed by the EIS to the API defined by the JCA or some other architecture, JDBC or JMS, for example. Commonly referred to as connectors.
The resource adapter itself runs in the same process as the appserver and is responsible for delivering messages to the message endpoints hosted by the appserver.