WebSphere 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 WebSphere Application Server and a destination withinIBM 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 WebSphere Application Server managing the transactionality and concurrency of the application.

- 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 a IBM MQ queue or topic defined in a IBM MQ queue manager.
- A 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 MDB that has been 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 WebSphere Application Server earlier than Version 7.0, use listener ports to define the association between a connection factory, a destination, and an MDB.
- 激活规范容易进行配置,这是因为他们只需要两个对象:激活规范和消息目标。侦听器端口需要三个对象:连接工厂、消息目标和消息侦听器端口本身。
- 激活规范不局限于服务器作用域。可以在 WebSphere Application Server 中的任何管理作用域定义激活规范。消息侦听器端口必须在服务器作用域进行配置。这意味着节点中的每个服务器都需要自己的侦听器端口。例如,如果节点由三个服务器组成,那么必须配置三个单独的侦听器端口。可以在节点作用域配置激活规范,所以在该示例中仅需要一个激活规范。
- 激活规范是 Java Platform, Enterprise Edition 连接器体系结构 1.5 和 1.6 标准规范 (JCA 1.5 和 JCA 1.6) 的一部分。WebSphere Application Server 中的侦听器端口支持将利用 JMS 规范中定义的应用程序服务器设施接口,但该支持本身不属于任何规范。
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 WebSphere Application Server earlier than WebSphere Application Server 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. For more information, see 消息驱动的 Bean、激活规范和侦听器端口.
为了帮助将侦听器端口迁移到激活规范,WebSphere Application Server 管理控制台在“消息侦听器端口集合”面板上提供了将侦听器端口转换为激活规范向导。此向导允许您将现有侦听器端口转换为激活规范。然而,此功能仅创建与侦听器端口具有相同配置的新激活规范。它不会将应用程序部署修改为使用新创建的激活规范。