File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes JMS design question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS design question" Watch "JMS design question" New topic

JMS design question

Mat Dug

Joined: Dec 14, 2003
Posts: 5
I need help in a JMS design question.
I�ve more than one application (say App1 and App2) sending messages to a Send Q, which will be picked by MDB in the container. Both App1 and App2 will set the setJMSReplyTo() in the message by passing a Receive Q. Both App1 and App2 waits for the ACK message from the Receive Q by calling setMessageListener() method on the QueueReceiver by passing this object to it. After completing the work MDB puts the ACK message into the Receive Q.
In the above scenario, do I need to use message selector so that App1 ACK messages will go to App1 and App2 ACK messages will go to App2? Or by default JMS knows (since it has a reference to App1 and App2) to send ACK messages appropriately between App1 and App2.
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
You will either need to use a Message Selector, or you can use Temporary Queues for the return messages.

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
I agree. Here's the link:
subject: JMS design question
It's not a secret anymore!