aspose file tools*
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
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "2 jms interview questions" Watch "2 jms interview questions" New topic
Author

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

Rgrds
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 http://www.theserverside.com/books/masteringEJB/index.jsp?tmc
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.


...watch me...as I'm walking the path...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 2 jms interview questions