| From | Sent On | Attachments |
|---|---|---|
| glas...@javadesktop.org | Oct 4, 2009 12:49 am | |
| Felipe Gaúcho | Oct 4, 2009 12:53 am | |
| glas...@javadesktop.org | Oct 4, 2009 1:03 am | |
| Felipe Gaúcho | Oct 4, 2009 1:40 am | |
| glas...@javadesktop.org | Oct 4, 2009 2:36 am | |
| VTR Ravi Kumar | Oct 4, 2009 2:47 am | |
| Felipe Gaúcho | Oct 4, 2009 2:56 am | |
| glas...@javadesktop.org | Oct 4, 2009 7:56 am | |
| Trond Strømme | Oct 5, 2009 2:14 am | |
| Trond Strømme | Oct 5, 2009 2:29 am | |
| glas...@javadesktop.org | Oct 5, 2009 6:26 pm | |
| glas...@javadesktop.org | Oct 6, 2009 3:23 pm | |
| glas...@javadesktop.org | Oct 6, 2009 10:48 pm | |
| glas...@javadesktop.org | Oct 7, 2009 1:32 am | |
| glas...@javadesktop.org | Oct 7, 2009 3:27 am | |
| glas...@javadesktop.org | Oct 7, 2009 4:04 pm | |
| glas...@javadesktop.org | Oct 8, 2009 3:21 pm |
| Subject: | Re: How do you poll a Glassfish JMS queue say every hour? | |
|---|---|---|
| From: | Trond Strømme (Tron...@Sun.COM) | |
| Date: | Oct 5, 2009 2:14:54 am | |
| List: | net.java.dev.glassfish.users | |
Hi. Have you looked at the OpenESB components, more specifically the SchedulerBC, the BPELSE and the JMSCB? (openesb.dev.java.net) With the scheduler BC you can have a cron-like job that fires on selected intervals. A business process will pick up the trigger, Writing a simple EJB that hooks into JMX you an look up the queue's MBean, get the number of messages in the queue, feed this to a BPEL process that does a JMS On Demand Receive to pull any number of messages off the queue in a loop. To reuse the MDB you've already got have the business process pull messages of the main queue and into an intermediate queue for immediate processing by the same MDB.
.trond glas...@javadesktop.org wrote:
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' (john...@hotmail.com)]





