IBM MQ messaging provider activation specifications
Activation specifications are used to configure inbound message delivery to message-driven beans (MDBs) running inside WebSphere Application Server. They supersede message listener ports, which are now a stabilized function.
Activation specifications and message-driven beans
Activation specifications are the standardized way to manage and configure the relationship between an MDB running in WAS and a destination within IBM MQ. They combine the configuration of connectivity, the Java Message Service (JMS) destination and the runtime characteristics of the MDB, within a single object.
Message-driven beans are a special class of Enterprise Java Bean (EJB). They enable Java Platform, Enterprise Edition (JEE) applications to process messages asynchronously, with WAS managing the transactionality and concurrency of the application.
The following figure shows how an activation specification can be used to link an IBM MQ queue manager destination to an MDB running within WAS. The process of delivering a message from a client to an MDB via an IBM MQ messaging provider activation specification occurs in this way:
- A messaging client, either running in a stand-alone process or within an application server environment, sends a message using JMS (or any other messaging API, such as MQI) to an IBM MQ queue or topic defined in an IBM MQ queue manager.
- An IBM MQ activation specification is configured to listen on that destination for messages. When the new message is detected, it is removed from the destination (potentially under an XA transaction).
- The message is then passed to an DB configured to use the activation specification through its onMessage method.
- The MDB uses the information in the message to perform the relevant business logic.
Activation specifications compared with listener ports
Versions of WAS earlier than v7.0, use listener ports to define the association between a connection factory, a destination, and an MDB.
Activation specifications supersede the use of listener ports, which became a stabilized feature in WAS v7.0. There are several advantages to using activation specifications over listener ports:
- Activation specifications are simple to configure, because they only require two objects: the activation specification and a message destination. Listener ports require three objects: a connection factory, a message destination, and the message listener port itself.
- Activation specifications are not limited to the server scope. They can be defined at any administrative scope in WAS. Message listener ports must be configured at the server scope. This means that each server in a node requires its own listener port. For example, if a node is made up of three servers, three separate listener ports must be configured. Activation specifications can be configured at the node scope, so in the example only one activation specification would be needed.
- Activation specifications are part of the Java Platform, Enterprise Edition Connector Architecture 1.5 and 1.6 standards specification (JCA 1.5 and 1.6). Listener port support in WAS makes use of the application server facilities interfaces defined in the JMS specification, but is not part of any specification itself.
It is still possible to use message listener ports to deliver messages to an MDB using the IBM MQ messaging provider. There are certain scenarios in which the use of listener ports is still preferable to using activation specifications. This usually is the case with configurations in which some of the servers are running on versions of WAS earlier than WAS Version 7.0. It is possible to configure both message listener ports (which make use of IBM MQ messaging provider resources) and IBM MQ messaging provider activation specifications at the same time. See Message-driven beans, activation specifications, and listener ports.
To assist in migrating listener ports to activation specifications, the WAS administrative console provides a Convert listener port to activation specification wizard on the Message listener port collection panel. This allows us to convert existing listener ports into activation specifications. However, this function only creates a new activation specification with the same configuration used by the listener port. It does not modify application deployments to use the newly created activation specification.
Related:
Message-driven beans, activation specifications, and listener ports Deploy an enterprise application to use message-driven beans with JCA 1.5-compliant resources Migrate a listener port to an activation specification for use with the IBM MQ messaging provider Configure an activation specification for the IBM MQ messaging provider Create an activation specification for the IBM MQ messaging provider IBM MQ messaging provider activation specification settings Message listener port collection IBM MQ messaging provider activation specification advanced properties