Using a JMS activation specification to put the event XML into a WebSphere MQ queue

To use a JMS activation specification to put the event XML into a WebSphere MQ queue, you create resources, including a Java Messaging Service (JMS) activation specification, and update the IBM_WBM_EMITTER SERVICE application to use the activation specification.

About this task

When you follow the steps, the following resources are created.
Type of resource Example resource name or value
WebSphere MQ Queue manager MQQmgr
TCP listener 1414 (port number)
Server-connection channel ServerConnChannel
Local queue AppEventQ
WebSphere® Application Server JMS queue (WebSphere MQ messaging provider) MQQueue (JNDI: jms/eventemitter/queue)
JMS activation specification (WebSphere MQ messaging provider) MQActSpecQueue (JNDI: jms/eventemitter/actspecqueue)

Procedure

  1. Check for the queue manager listener port and create a server-connection channel and a local queue:
    1. In the WebSphere MQ Explorer, click the queue manager. Open the Advanced folder and click the Listeners folder to check for the TCP listener. Note the port number. By default, a TCP listener is created when a queue manager is created. If no TCP listener exists, you can create one and specify a port number for it by right-clicking the Listeners folder, clicking New, and selecting TCP Listener.
    2. In the WebSphere MQ Explorer, click the queue manager. Open the Advanced folder. Right-click the Channels folder, click New, and select Server-Connection Channel. Enter a name for the channel and click Finish. Note the channel name.
    3. In the WebSphere MQ Explorer, click the queue manager. Right-click the Queues folder, click New, and select Local Queue. Enter a name for the queue (such as AppEventQ) and click Finish. Note the queue name. This queue is where applications put their event XML.
  2. Create a JMS queue using the WebSphere MQ messaging provider:
    1. In the administrative console, select Resources > JMS > Queues. Select a scope and click New. Select WebSphere MQ messaging provider as the JMS resource provider and click OK.
    2. In the Configuration panel, enter the name and the JNDI name for the queue. For example, the name could be MQQueue and the JNDI name could be jms/eventemitter/queue. In the Queue name field, enter the WebSphere MQ queue name that you created in step 1c.
  3. Create a JMS activation specification using the WebSphere MQ messaging provider:
    1. In the WebSphere Application Server administrative console, select Resources > JMS > Activation specifications. Select a scope and click New. Select WebSphere MQ messaging provider as the JMS resource provider, and then click OK.
    2. In step 1 of the wizard, enter the name and the JNDI name. For example, the name could be MQActSpecQueue and the JNDI name could be jms/eventemitter/actspecqueue. In step 1.1, enter the JNDI name of the JMS queue that you created in step 2, for example jms/eventemitter/queue. Select Queue as the destination type.
    3. In step 2 of the wizard, select the default connection method Enter all the required information into this wizard. In step 2.1, enter the queue manager name, for example MQQmgr. In step 2.2, enter the connection information. Select Client as the transport type and enter the host name of the machine that hosts the queue manager, the port number of the TCP listener that you noted in step 1a, and the name of the server-connection channel that you created in step 1b.
    4. In step 3 of the wizard, click Test Connection to verify that all the information is correct and you have a successful test connection.
    5. To complete the setting and save the configuration, click Next and Finish.
  4. Update the resources of the IBM_WBM_EMITTER SERVICE application to use the JMS activation specification that you created:
    1. In the administrative console, select Applications > Application Types > WebSphere enterprise applications and click IBM_WBM_EMITTER_SERVICE.
    2. In the Configuration tab, under Enterprise JavaBeans Properties, click Message Driven Bean listener bindings.
    3. In the Listener Bindings column, select Activation Specification and enter the JNDI name of the JMS activation specification that you created in step 3, the JMS queue that you created in step 2, and the authentication alias.
    4. Click OK and save the change.
  5. Restart the IBM® Business Monitor server.

Results

You have finished the configuration. If applications put event XML onto the local WebSphere MQ queue, the JMS event emitter service wraps the XML in a Common Base Events envelope and sends it to the common event infrastructure (CEI) server for the IBM Business Monitor server to process.

What to do next

Optional: To verify that the configuration is working, send a test message to the local WebSphere MQ queue.
  • In the WebSphere MQ Explorer, right-click the local queue (such as AppEventQ) and select Put Test Message.
  • In the WebSphere MQ Explorer, you can see that the queue depth of the local queue is 0.
The JMS event emitter service has successfully retrieved the message from the WebSphere MQ queue, wrapped it into the xs:any slot in a Common Base Event, and sent it out to the CEI server.