users@glassfish.java.net

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

From: <glassfish_at_javadesktop.org>
Date: Sun, 04 Oct 2009 00:49:48 PDT

Hi Folks,

I have setup a queue using Glassfish's admin console along with a connection factory and have some basic code written to send messages to a queue and have them read using an MDB. All that is fine and works well. However, what I really want to do further on from this is for Glassfish's JMS to poll the queue every hour and then notify the MDB (via it's MessageListener interface) so that it reads the message from the queue. In effect, the MDB will be consuming messages every hour instead of being notified everytime a message arrives within the queue.

Can this be done using Glassfish JMS or should it be done programatically? Any help and advice is appreciated.


Regards,

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

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