This content has been marked as final. Show 3 replies
If you are using "AUTO_ACKNOWLEDGE" in a non-transacted session, and application fail before control successfully returns from onMessage() method, JMS server will not be acknowledged.
Go through this article, http://www.javaworld.com/javaworld/jw-02-2002/jw-0315-jms.html?page=1 , to make your understanding a bit more sound.
I hope this helps.
882256 wrote:If onMessage() does not return successfully then the message will not be auto-acknowledged.
I would like to know what happen if my application fail (lets suppose the computer break) before the onMessage() return (on a class that implement javax.jms.MessageListener). Suppose the acknowldge used is AUTO_ACKNOWLEDGE. What happen? The JMS Server was acknowledge or not?
See the javadoc for Session.AUTO_ACKNOWLEDGE:
this states that "With this acknowledgment mode, the session automatically acknowledges a client's receipt of a message... when the message listener the session has called to process the message successfully returns. "