Tuesday, July 29, 2014

Configure WebSphere MQ with default JMS provider.

The default JMS provider is bundled with the WebSphere Application server installation, We can use the default JMS provider rather than using external JMS providers (like ActiveMQ ) for our message oriented middle-ware solutions.


The default JMS provider can be used with the help of Service Integration Bus (SIB) feature of WebSphere, so your Enterprise Application will use Connection factory to connect to the SIB and then get the connected to the destination queue.

Steps below is using WebSphere 8.5 and can be used with other version around this.

Step 1: Create SIB

  •           Click on the Buses from the Service Integration  and add new Bus 
  •           As shown below give your SIB name and un-select “bus security”
  •           Continue on finishing the wizard and finally save configuration.

Step 2: Attache your server (ex: server1) to the newly created BUS

  •           Click on new created BUS and click “Bus Member” to add your server to this bus.


  • Click on Add button to add your server to the SIB and select File Store as your persistence store of messages and Finish the wizard with other default settings.


Step 3: Create Queue Connection Factory


  • Click on Queue Connection factory under Resource from left pane on admin console and continue with creating similar to connection factory.



  •           Add new connection factory using “Default JMS Provider” 



  •           Provide your connection factory name and JNDI name and select your bus from the drop down list





Step 4: Create destination queue

  • Select the Queue link from the Resources pane on left pane on Admin console.
  • Click “New”  to start creating queue and select “Default messaging provider”
  • Give your test queue name and JNDI name as shown below and select “Create Service Integration Bus destination” from the Queue name selection to proceed with creating destination queue. It will prompt you with wizard to create the destination queue and give Identifier as “TestQD” and select other default settings and finish. So now your queue JNDI of “jms/TestQ” will be mapped to the actual destination of “TestQD” queue. Also make sure you save the configurations at the end.



Step 5: Use your queue with sample JMS sender and listener.

You are ready with the connection factory and destination Queue with below JNDI names,so write your own sample to push message to the queue and listener to read it.

JNDI Name of Connection factory: jms/TestQCF

JNDI name of the queue:jms/TestQ


No comments:

Post a Comment