users@glassfish.java.net

JMS Message stuck in queue after crash in transacted session

From: <glassfish_at_javadesktop.org>
Date: Sat, 29 Mar 2008 21:09:37 PST

I have a situation where I am receiving messages from a message queue in a transacted session using local transaction. The idea is that the message isn't acknowledged until I am sure that the message was fully processed...if there was an error processing, I'd like the message to remain on the queue for a future retry.

Occasionally during the handling of the message, a handler will crash or be terminated without a clean shutdown. This seems to leave the messages that were being handled at the time of the crash in a state where they can no longer be dequeued...a queue browser shows that they are still there, but a receiver cannot receive them. Is this the intended behavior? Can you point to any documentation on what is supposed to happen in a transactional message receiver in the case of a connection failure? Is there a way to detect and to "unstick" these message?

Thanks.
[Message sent by forum member 'christopherrued' (christopherrued)]

http://forums.java.net/jive/thread.jspa?messageID=266639