This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Bridging JMS + IBM MQ on BEA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Bridging JMS + IBM MQ on BEA" Watch "Bridging JMS + IBM MQ on BEA" New topic
Author

Bridging JMS + IBM MQ on BEA

Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 365
�I need to forward a JMS msg from BEA WebLogic on Tandem Nonstop to IBM MQ. Since Tandem does not currently support MQ I need to send my JMS msg to an intermediate Unix box where MQJMS is running on BEA under Solaris.
�It looks I will have to write an adapter to take the msg off the JMS queue in Unix and put it on the MQ/JMS queue since the IBM MQ/JMS classes doesn�t implement the neutral javax.jms Interface.
�Does anybody know of another way of going about this?
Thank you
Max
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
What version of MQ are you using? MQ certainly implements the standard javax.jms classes... at least in the later versions.

Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
You will have to write the adaptor (or find one already written).

The problem you are dealing with is that the JMS specification does not mandate (or even suggest) what wire protocol should be used. Each JMS provider will have their own proprietary protocol.

If your message architecture is 'request/reply', you will have to do this both ways.

I would talk to the BEA folks and ask if they already have some tools to get you started.

Interesting problem.

Regards, Guy
Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 365
thanks for the replies -

Kyle-

We're using MQ 5.3 - the classes I see implemented are: com.ibm.mq.jms
so if I bind a connection factory in WL 8.1 JNDI, I get:
com.ibm.mq.jms.MQQueueConnectionFactory which gives me a class cast exception
when I try to access it as a javax.jms.QueueConnectionFactory

am I not using the correct interface?

thanks
Max
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Nope, you're not using the right interface. WebSphere MQ 5.3 fully supports JMS. See this url for the information you need.

Kyle
Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 365
Thanks Kyle-

Thanks for the info but I believe the problem still exists:

I need to define the QManager etc in WebLogic at startup in order to bind them into WL�s JNDI. The way I do this is to instantiate the QueueConncectionFactory and Queue and then bind them. Unfortunately I see no way to do this without using the com.ibm classes. In the doc you provided it says (p 201):

If a JNDI namespace is not available, it is possible to create factory objects at runtime. However, using this method reduces the portability of the JMS application because it requires references to WebSphere MQ specific classes. The following code creates a QueueConnectionFactory with all default settings:
factory = new com.ibm.mq.jms.MQQueueConnectionFactory();

So it looks like I have to write an adapter after all. I�m curious, though, how WAS is able to bind MQJMS into JNDI as javax.jms objects.
Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 365
I wanted to provide an update here for those that are interested:

I am using the BEA Foreign Server facility which, under the covers, I bet uses a BEA implementation of JMS. Once I access the foreign definition for an MQ/JMS connection factory I get a class cast exception even though MQJMS implements javax.jms.QueueConnectionFactory.

I think BEA must be using it's own stubs etc. to connect to the Foreign Server (T3 protocol) and it barfs when I try to lookup a foreign QCF that boils down to MQJMS.

So know you know what I know.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Let me give you a few more pointers to look for.

Look here for information about WebLogic's messaging bridge.

This whitepaper talks about using MQ Series with BEA Servers prior to 8.1. There are references on the same site on a presentation (which I couldn't find) on doing this with servers later than 8.1.

Kyle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bridging JMS + IBM MQ on BEA
 
Similar Threads
Spring and Messaging
Send JMS messages to Websphere MQ
Context close
JMS: failed to open MQ queue (Reason 2035) when trying to receive message
JMS & Dynamic Queue