Chapter 7 Integrating With IBM WebSphere Application Server Version 6.1 : Configure WebSphere to Use EMS as the JMS Provider

Configure WebSphere to Use EMS as the JMS Provider
This section describes the steps required to configure WebSphere Application Server 6.1 to use TIBCO Enterprise Message Service as its JMS provider. The configuration process is described in the following steps:
After the application server is configured, the section Run the Sample Application Clients gives steps for running the sample Java clients to test the configuration.
This section assumes that an MDB is already configured in the WebSphere Application Server, and that the required administered objects have been created in the EMS server, as described above in Create TIBCO Enterprise Message Service Administered Objects.
Add TIBCO Enterprise Message Service as a JMS Provider
This section configures WebSphere to uses TIBCO Enterprise Message Service as a JMS provider.
1.
2.
3.
In the WebSphere navigation pane, choose Resources > JMS > JMS providers.
4.
5.
 
EMS_HOME\jar\tibjms.jar
External Initial Context Factory
6.
Click the OK button.
7.
Click the Apply button.
For more information about this task, review the WebSphere Application Server documentation for defining a generic JMS provider.
Configure JNDI Bindings for the Connection Factories
This section describes how to create topic and queue connection factories in the WebSphere server.
Create a Topic Connection Factory
1.
In the WebSphere navigation pane, choose Resources > JMS > Topic connection factories.
2.
3.
Choose TIBCO as the resource provider, and click OK.
4.
 
5.
Click the OK button.
Create a Queue Connection Factory
6.
In the WebSphere navigation pane, choose Resources > JMS > Queue connection factories.
7.
Click the New button.
8.
Choose TIBCO as the resource provider, and click OK.
9.
 
10.
Click the OK button.
11.
Click the Save button.
Configure JNDI Bindings for the Destinations
This section describes how to bind the EMS topics sample.listen and sample.weather and queue sample.Q1 in WebSphere.
Add Topics
1.
2.
3.
Choose TIBCO.
4.
 
5.
Click the OK button.
6.
 
Add the Queue
7.
8.
9.
Choose TIBCO.
10.
 
11.
Click the OK button.
12.
Click the Save button.
Create new Listener Ports
This section creates the WebSphere listener ports that connect to the tibemsd. You create two listener ports:
TIBCOPubSubListenerPort for the configured topics.
TIBCOPtoPListenerPort for the configured queue.
To create the listener ports:
1.
In the WebSphere navigation pane, choose Servers > Application servers, and choose the name of the application server.
2.
3.
Create a Listener Port for Topics
4.
Click the New button.
5.
 
6.
Click the OK button.
Create a Listener Port for a Queue
7.
 
8.
Click the OK button.
9.
Click the Save button.
For more information about this task, review the WebSphere Application Server documentation for adding a new listener port.
Install the MDB to Use the Topic and Queue Listeners
This section describes the steps needed to install your MDB for the topic and queue listeners created above, in Create new Listener Ports.
Install the Topic MDB
1.
In the navigation pane, choose Applications > Enterprise Applications.
2.
3.
Specify the location of your message driven bean .ear file.
4.
Click the Next button.
5.
Change the Application name property to test_topic.
Note that you do not need to change any of the other default installation options.
6.
Click the Next button.
7.
Click the Next button to accept the default module to application server mapping.
Note that this mapping can be modified only if you have more than one WebSphere application server configured.
8.
TIBCOPubSubListenerPort is the listener port created above in step 5 of Create new Listener Ports.
9.
Click Next.
10.
Click Finish to complete the installation.
11.
Install the Queue MDB
12.
In the navigation pane, you should still be in Applications > Enterprise Applications.
13.
14.
Specify the location of your message driven bean .ear file.
15.
Click the Next button.
16.
Note that you do not need to change any of the other default installation options.
17.
Click the Next button.
18.
Click the Next button to accept the default module to application server mapping.
Note that this mapping can be modified only if you have more than one WebSphere application server configured.
19.
TIBCOPtoPListenerPort is the listener port created above in step 7 of Create new Listener Ports.
20.
Click Next.
21.
Click Finish to complete the installation.
22.
Restart the Application Server
23.
24.
After the application server has restarted, use the WebSphere Administrative Console to verify that the new listener ports are in their proper initial state.
To do this, expand Servers > Application Servers, then choose your server name in the content pane, then on Message Listener Service and then on Listener Ports. The new TIBCO listener ports should have a solid green arrow under the status column indicating that they are started.
For more information about this task, review the WebSphere Application Server documentation for configuring deployment attributes for a message-driven bean.
Run the Sample Application Clients
In this section, you run the sample Java clients included with your TIBCO Enterprise Message Service installation. If this is the first time you have used these sample clients, you will need to compile them before following the steps described here.
1.
From the EMS_HOME\samples\java directory, type the command:
> java tibjmsTopicPublisher -topic sample.listen "hello world"
2.
From the EMS_HOME\samples\java directory, type the command:
> java tibjmsTopicPublisher -topic sample.weather "hello world 2"
3.
From the EMS_HOME\samples\java directory, type the command:
> java tibjmsQueueSender -queue sample.Q1 "hello world 3"
4.
Open the WebSphere application server log, located in <installation_directory>\logs\<your server>\SystemOut.log, and verify that the WebSphere MDB consumed the sent messages. The log should contain messages sent to the following destinations: