File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes IBM MQ and MDB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "IBM MQ and MDB" Watch "IBM MQ and MDB" New topic


ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
Can someone tell me what's the difference between a Message Queue and Message driven bean ? how do they interact with each other ?
Brian Hennessy
Ranch Hand

Joined: Oct 24, 2005
Posts: 57
Hi Ben
A message queue is a data struture used for holding messages. Think of it like a list where you can push items onto the list and pop items off the list.
A message driven bean is a special type of EJB that is used to listen for messages on a messsage queue , take the message from the queue and perform some processing on the message. All this typically runs as a transaction which allows you to roll the message back on the queue under certain failure scenarios.

You create a queue manager in IBM MQ and create queues associated with this queue manager. Applications write messages to these queues by using API calls like JMS. In you JEE application you will have written a message driven bean , this bean will process messages put to the queue. The bean will be configured to use a javax.jms.QueueconnectionFactory which is a configuration setting in WebSphere that represents connection details to the MQ queue manager and a javax.jms.Queue object which is a configuration in websphere that represents the actual queue associated with a queue manager in MQ.


I agree. Here's the link:
subject: IBM MQ and MDB
It's not a secret anymore!