To use a JMS activation specification to publish
the event XML to a topic, you indicate a topic string, 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 topic (WebSphere MQ messaging provider) |
MQTopic (JNDI: jms/eventemitter/topic) |
| JMS activation specification (WebSphere MQ messaging
provider) |
MQActSpecTopic (JNDI: jms/eventemitter/actspectopic) |
Procedure
- Check for the queue manager listener port and
create a server-connection channel and a local queue:
- 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.
- 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.
- 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.
- Create a JMS topic using the WebSphere MQ messaging
provider:
- In the administrative console, select . Select a scope and click New.
Select WebSphere MQ messaging provider as the
JMS resource provider, and then click OK.
- In the Configuration panel, enter the name
and the JNDI name for the queue. For example, the name could be MQTopic and
the JNDI name could be jms/eventemitter/topic.
In the Topic name field, enter a topic string,
such as TestTopic.
- Create a JMS activation specification using the WebSphere
MQ messaging provider.
- In the WebSphere Application
Server administrative
console, select . Select
a scope and click New. Select WebSphere
MQ messaging provider as the JMS resource provider, and
then click OK.
- In step 1 of the wizard, enter the name
and the JNDI name. For example, the name could be MQActSpecTopic and
the JNDI name could be jms/eventemitter/actspectopic.
In step 1.1, enter the JNDI name of the JMS queue that you created
in step 2, for example jms/eventemitter/topic.
Select Queue as the destination type. In step
1.2, do not change the default value.
- 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.
- In step 3 of the wizard, click Test
Connection to verify that all the information is correct
and you have a successful test connection.
- To complete the setting and save the configuration,
click Next and Finish.
- Update the resources of the IBM_WBM_EMITTER SERVICE application
to use the JMS activation specification that you created:
- In the administrative console, select and
click IBM_WBM_EMITTER_SERVICE.
- In the Configuration tab,
under Enterprise JavaBeans Properties, click Message Driven
Bean listener bindings.
- 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 topic that you created
in step 2, and the authentication alias.
- Click OK and save
the change.
- 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 Topics folder
and select Test Publication.
- In the Publish Test Message wizard, enter the topic name that
you used (such as TestTopic) in the Topic
string field and put some XML data into the Message
data field.
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.