File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Order of messages with multiple mdb's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Order of messages with multiple mdb Watch "Order of messages with multiple mdb New topic
Author

Order of messages with multiple mdb's

Amey Sane
Greenhorn

Joined: Feb 09, 2009
Posts: 1

Well, I have this kind of trivial problem for me.
I have a JMS queue, where I have some message objects stored.
Multiple MDB instaces can listen to this queue at runtime.
Now, each of this MDB instance picks up an object from the queue, as and when it arrives.
Then, it performs some operations on this object (which is not all that important in this context).
After this, that MDB instance places the object it has processed in another queue.
However, I am not understanding, how do i maintain the order of objects in another queue.
I mean, the order in which objects were picked up from the first queue and the order in which they are placed in another queue after processing, should be same.
Any suggestions?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

Amey,
What are you trying to accomplish that you need the messages in a certain order? Would putting a sequence number in the message help? More information will help people here give a more useful answer.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
You cannot Guarantee the order ,if you use pool of MDBs.

If you want the order use only single MDB.


If you want something you never had do something which you had never done
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Order of messages with multiple mdb's
 
Similar Threads
MDB Timeout??
MDB-SLSB in Component Diagrams
MDB Timeout??
To Paul : Question about Queue In MDB
Map object with some special features.