• Post Reply Bookmark Topic Watch Topic
  • New Topic

order of message using MDB's

 
david lightman
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
has anyone ran into the problem where transactions coming into a queue where an MDB is listnening needs to process messages in order? This seems so contradictive to what J2ee and MDB's are all about about
-the only way I see to achieve this is to lower the connections to 1 so it can go only go one a time..

is this the only alternative when using MDB's?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,
Why do you need to process the messages in a specific order? Do they depend on a certain state? numbering?

Another alternative is to put this piece of information in the database before placing the message on the queue. Then when each message is received by the MDB, it can check whether the state is ready yet. If not, back on the queue.
 
Amit G Piplani
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope using MessageSelectors should help in this case, by checking for some property(which defiens the order of messages)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!