amazon

Wednesday, January 4, 2012

Configuration of a JMS activation specification

The JMS activation specification is based on the Java 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.

To configure a JMS activation specification for the default messaging provider, you use the administrative console to complete the following steps:

1.       Select Resources > JMS Provider > Default messaging.
2.       Click JMS activation specification under Activation Specifications.
3.       Click New.
4.       Enter the following and then click OK:
- Name (The name by which the activation specification is known for administrative purposes): IBAActivationSpec
– JNDI name (The JNDI name that is used to bind the activation specification into the JNDI name space): jms/IBAActivationSpec
– Destination type (Whether the message-driven bean uses a queue or topic destination): Select Queue
– Destination JNDI name (The JNDI name that the message-driven bean uses to look up the JMS destination in the JNDI name space): jms/IBAQueue
– Bus name (The name of the bus to connect to. Specify the name of the service integration bus to which connections are made. This must be the name of the bus on which the bus destination identified by the Destination JNDI name property is defined. The server to which associated message-driven beans are deployed must be a member of this bus): Select IBASampleBus
5.       Click Save and then when prompted click Save to Save to Master Configuration.
6.       Click Finish.

Bind the Activation Specification and Destination to the MDB

1.  In the Project Explorer View open EJB Deployment Descriptor.
2.  Go to Bean tab.
3.  Select SampleMDB Bean.
4.  On the right side in the Message-Driven Destination section, select:
Destination type: Queue
5.  On the right side in the WebSphere Binding section, select:
JCA Adapter: selected
ActivationSpec JNDI name: jms/IBAActivationSpec
Destination JNDI name: jms/IBAQueue

0 comments:

Post a Comment