users@glassfish.java.net

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

From: <glassfish_at_javadesktop.org>
Date: Sun, 04 Oct 2009 02:36:41 PDT

Thanks once again Felipe :) You're correct in that it is somewhat similar to batch-processing. Each message would be executing a specific process and if that process fails I wish the message to remain within the queue. That way the message can be read again and only be removed from the queue if that process runs successfully.

Ideally I'd like to have that process re-tried every hour, hence the queue will be polled every hour for the messages as opposed for them to be read as soon as they arrive. If that process is re-tried say x times then it sends a failure email and removes the message from the queue since the process always fails. That's the kind of situation I'm trying to setup up.

I might be trying to use JMS in an incorrect way so I'm open to suggestions as to how I could implement my requirements in a proper way with JMS if my plan is wrong. I'm quite new to JMS so apologies if my own plan is totally wrong since I'm getting to grips with it :)


Thanks again.


John
[Message sent by forum member 'johnstv' (johnstevens3_at_hotmail.com)]

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