wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes JMS on MQSeries via MDBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS on MQSeries via MDBs" Watch "JMS on MQSeries via MDBs" New topic
Author

JMS on MQSeries via MDBs

Jes Sie
Ranch Hand

Joined: Jul 24, 2001
Posts: 188
I've got an interesting situation here. I've just inherited a bunch of codes which (do not come with any deployment descriptors). Basically there is a working system which uses a java client to send out JMS message to an MQSeries 5.2 queue. Then, an MDB is there to listen to it.
The system is running fine, but I'm supposed to be documentating the flow of what needs to be done for any new developer point of view. I'm new to the project and know nuts about MQ and only know some JMS.
There is the MA88 Package in place. I would like to know how do we configure the MDB to 'listen' to an MQSeries queue. Is it in the deployment descriptor? (I do not have them). And, what configuration is required to be done in the app server (WebLogic) to recognise the queue factory, etc.
FYI, the app server used is WebLogic 6.1
Any hint would be nice, thank you.


Thank you.<br /> <br />- Jess Sie<br /> <a href="mailto:jess@see-consulting.com" rel="nofollow">jess@see-consulting.com</a>
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by Simon See:
...I would like to know how do we configure the MDB to 'listen' to an MQSeries queue. Is it in the deployment descriptor? (I do not have them)...

Well.. in the EJB jar you need to specify the MDB, something like :

So here you're saying that your MDB will be listening to a Queue.
You will also need another xml file that contains all the available topics and queues (and if you need to create another one you should add it there). I have no idea how it is with weblogic, but in JBoss 3.0.x is in jboss-webq.xml (notice that these guys at Jboss keep changing name to its xml descriptors, so it might be outdated ;-). something like this..

as you mentioned, this is only a hint . So if you have no descriptors at all, how are you doing the documentation..? bit tough ...
hope this helps


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Jes Sie
Ranch Hand

Joined: Jul 24, 2001
Posts: 188
Thanks.
This seems like a good info. But, I'm more a less know how it's done with java client to send JMS to MDBs. I'm just wondering what would be 'additional' if MQSeries were used instead of native JMS.
I've got the MA 88....which is the wrapper for JMS for MQSeries. Just no configuration files included. The code on sending message to the MQ seems to be using the same old default connection factory, javax.jms.QueueConnectionFactory. I expected an MQSeries connection factory or something?
Somehow WebLogic is making this foreign JMS provider (MQ) local to Weblogic. How?
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
It is possible that the messages are being moved to WebSphere MQ via a separate process (this is how I do these types of things). Therefore, all the internal JMS producers are insulated from the fact that WebSphere MQ is being used.
The separate moving process could either be another MDB/JMS Listener that explicitly writes to WebSphere MQ or a WebLogic Messaging Bridge. Messaging Bridges were added to WLS in 6.1 and are used to integrate with Foreign JMS Providers (exactly your situation). For more information see: Using the WebLogic Messaging Bridge.
Jes Sie
Ranch Hand

Joined: Jul 24, 2001
Posts: 188
Originally posted by Chris Mathews:
It is possible that the messages are being moved to WebSphere MQ via a separate process (this is how I do these types of things). Therefore, all the internal JMS producers are insulated from the fact that WebSphere MQ is being used.
The separate moving process could either be another MDB/JMS Listener that explicitly writes to WebSphere MQ or a WebLogic Messaging Bridge. Messaging Bridges were added to WLS in 6.1 and are used to integrate with Foreign JMS Providers (exactly your situation). For more information see: Using the WebLogic Messaging Bridge.

Not quite, the Messaging Bridge thingy is only meant for WLS 7.0 (and possibly very high SP version of 6.1).
There are other strategy documented here like using Startup class, LDAP, etc.
Foreign JMS strategies
I seem to answer my own question
I welcome more inputs and code snippets, though.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Originally posted by Simon See:
Not quite, the Messaging Bridge thingy is only meant for WLS 7.0 (and possibly very high SP version of 6.1).

The WebLogic Messaging Bridge has always been available in WLS 6.1, it was just not officially supported until 6.1 SP3.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS on MQSeries via MDBs