users@glassfish.java.net

Re: How do you poll a Glassfish JMS queue say every hour?

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Oct 2009 15:21:38 PDT

Hi John,

>>Can an MDB change the value of a message such as "retryNumber" for it to be picked up again by the selector?
No, but JMSJCA does allow you to maintain a state on a message, especially if that message will be rolled back. For this you can set a user property on the message, and the next time this message is redelivered you can read this value back from the message. The values are kept in memory, so they won't survive a system restart.

>>All this is within a business process context and not any kind of infrastructure problem whereby
JMSJCA supports global interceptors so that you could potentially factor out this infrastructure logic.

These facilities were built to support a customer who had similar requirements as you in terms of an error handling system and retries. Your requirements appear to be not that much different.

Frank
[Message sent by forum member 'fkieviet' (frank.kieviet_at_sun.com)]

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