users@glassfish.java.net

Re: JMS Messages redelivered infinitely with default settings

From: <glassfish_at_javadesktop.org>
Date: Tue, 29 Apr 2008 03:55:48 PDT

I can see the merit of setting properties for RuntimeExceptions.

The only way I can prevent it from redelivering infinitely is by checking getJMSRedelivered. It seems cumbersome to me to have to hard code logic to check for this flag... I would have to check every message as the first thing, and then sent it to either the default DMD or my own queue for such erroneous messages.

The other App Servers and messaging systems I've used all have the ability to set limits... WebLogic, WebSphere 6.0 default messaging, WebSphere 6.0 MQ all have the ability to set a threshold on the max # of redeliveries, and where to send the message after that has been set.

All of the projects I've worked on in the past have used these features, and it has always been assumed to be a configuration setup rather then a programming exercise. Now I have to rely on the fact that a InitialContext, Connection and Destination can be properly programatically established for the message I need to send to a custom DMD (this of course should always work, but I still dont think it should have to be done this way).
[Message sent by forum member 'asherwin' (asherwin)]

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