WebLogic as a JMS provider within WebSphere
Archived post from 2011, recovered from my old blog. The technology described here is probably out of date. Original at the Internet Archive.
Its been already four and a half years since I moved from one corporation to another. Now I have three blue letters on my business card instead of two ;) .
At the same time I switched from BEA WebLogic application server to IBM WebSphere. Although these products competes against each other I had recently an excellent opportunity to make them play together. The goal was to configure WebLogic server as an external JMS provider in WebSphere server. Suprisingly it was much easier then I expected. Here are the steps needed to expose a single WebLogic queue within WebSphere server.
Products used
- Oracle WebLogic Server 11g
- IBM WebSphere Application Server 7.0
Configured WebLogic JMS resources
- Queue name = wlsQueue, JNDI name = jms/wlsQueue
- Queue connection factory name = wlsQCF, JNDI name = jms/wlsQCF
Create JMS provider
Copy wljmsclient.jar from WebLogic server onto machine running WebSphere server and note its location.
Using WebSphere application server console create a new JMS provider filling the following fields:
- Name – e.g. WebLogic Messaging Provider
- Classpath: YOUR_PATH/wljmsclient.jar (use appropriate path)
- External initial context factory: weblogic.jndi.WLInitialContextFactory
- External provider URL: t3://HOST:PORT (e.g. t3://localhost:7001)
Create connection factory
Within WebLogic JMS provider create a new queue connection factory specifying at least:
- Name
- JNDI name – local name to be used on WebSphere server (e.g. jms/myQCF)
- External JNDI name – external JNDI name on WebLogic server (e.g. jms/wlsQCF)
Create queue
Within WebLogic JMS provider create a new queue providing at least:
- Name
- JNDI name – local name to be used on WebSphere server (e.g. jms/myQueue)
- External JNDI name – external JNDI name on WebLogic server (e.g. jms/wlsQueue)
Verification
To test the application I created a simple servlet acting as a JMS client, deployed it on WebSphere server and set up resources references to associate the servlet with jms/myQueue and jms/myQCF. After sending a message I could see it reached the target queue using WebLogic console:
Message arrived!