This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes 2 jms interview questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "2 jms interview questions" Watch "2 jms interview questions" New topic

2 jms interview questions

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi All
i had 2 questions on JMS which i was not able to answer conclusively.
Hope you guys can help me out.
1) In JMS, how does the Producer of a message get an acknowlegement of the reciept of the message by the recepient of the message.
Is it managed implicitly by JMS or it is the responsibility of the the consumer to tender a confiramtion back to the sender regarding the receipt of the message
2)In JMS, say if the producer sends a few messages to the consumer. The messages are such that the second message is dependent on the first message
but when the consumers receivs the messages he gets the second one prior to the first one
How to solve this problem .is there a way by which we can impose some sort of ordering on the messages sent

Sergiu Truta
Ranch Hand

Joined: Dec 16, 2003
Posts: 121
1) You can send responses back by specifying a destination in jmsReplyTo and after dealing with the received message, you construct a response message and send it to the destination specified in jmsReplyTo. You can find this mechanism explained in Ed Roman's "Mastering EJB" (page 231) at
2) in MDBs you cannot rely on the order the messages are treated because a JMS Server is not guaranteed to deliver messages to a pool of MDBs in any particular order. I'm walking the path...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: 2 jms interview questions
It's not a secret anymore!