A JMS activation specification is a configurable resource that
enables a message-driven bean (MDB) to communicate with the default messaging
provider.
About this task
The JMS activation specification is based on the J2EE Connector Architecture
(JCA) 1.5 standard, and provides Java connectivity between application servers
such as WebSphere Application Server, and enterprise information systems.
It provides a standardized way of integrating JMS providers with J2EE application
servers, and provides a framework for exchanging data with enterprise systems,
where data is transferred in the form of messages.
For earlier versions
of WebSphere Application Server, the interface between an MDB and its destination
is the listener port. A listener port is a messaging component that can be
manually started and stopped by the administrator. When a listener port stopped,
the MDB associated with it can no longer process messages. If an MDB fails
to process a message several times, the listener port is automatically stopped
by the application server. Listener ports are used with the MQ Client Link
(the WebSphere Application Server Version 5 provider), and with WebSphere
MQ when used as an external JMS provider.
With WebSphere Application
Server Version 6, the interface between an MDB and its destination is the
JMS activation specification. Because a JMS activation specification is a
group of messaging configuration properties not a component, it cannot be
manually started and stopped. For this reason, to prevent an MDB from processing
messages, you must complete the following tasks:
- Stop the application that contains the MDB.
- Stop the messaging engine.
It is possible to share a single JMS activation specification
with multiple MDBs. This simplifies administration because it is only necessary
to provide a single set of messaging configuration properties.
Note: Although it is not possible to use the listener port configuration settings
with the WebSphere Application Server Version 6 default messaging provider,
listener ports can still be configured for earlier messaging providers, for
example the WebSphere MQ messaging provider. If you want to use an activation
specification with WebSphere MQ, you must use the default messaging provider
to configure activation specifications and then use WebSphere MQ Link. For
information about the setup of a WebSphere MQ link to exchange messages between
queues of the default messaging provider and WebSphere MQ see related tasks.
The
following guidelines show which scenarios use activation specifications or
listener ports:
- If you are using J2EE 1.2 and EJB 1.1 with WebSphere Application Server
v4, MDBs are not used so you do not need listener ports or activation specifications.
WebSphere Application Server v4 uses message beans, but these are not MDBs
or EJBs.
- If you are using J2EE 1.3 and EJB 2.0 with WebSphere Application Server
Version 5, you must use listener ports. The MDBs are JMS MDBs that implement
MessageListener, and there is no JCA support. WebSphere Application Server
Version 5 uses listener ports to associate MDB classes with their JMS destinations.
- If you are using J2EE 1.4 and EJB 2.1 with WebSphere Application Server
Version 6 and not using JMS, you must use activation specifications. A connector
MDB uses JCA to access its resources, so the connector must therefore be
configured with an activation specification. This is for new bean development,
and does not affect the conversion of MDBs from EJB 2.0 to EJB 2.1.
- If you are using J2EE 1.4 and EJB 2.1 with WebSphere Application Server
Version 6, the decision depends on whether your JMS provider API is implemented
with JCA. In J2EE 1.4, the JMS 1.1 API can now be implemented with the JCA
1.5 API. If so, your MDB is a JMS MDB that is implemented as a connector
MDB, and must therefore be configured with an activation specification. If
not, this is the same JMS situation as for J2EE 1.3, and you must configure
this EJB 2.1 MDB in the same way as you would configure an EJB 2.0 MDB, which
in WebSphere Application Server is to use a listener port.
To configure
a JMS activation specification for the default messaging provider, you use
the administrative console to complete the following steps. This task contains
an optional step for creating a new JMS activation specification: