| 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: | glas...@javadesktop.org (glas...@javadesktop.org) | |
| Date: | Oct 7, 2009 1:32:37 am | |
| List: | net.java.dev.glassfish.users | |
You could also have a look at this pattern
http://www.eaipatterns.com/Aggregator.html.
You could write an MDB with receives message and stores them in database. Then a
timer fires periodically, aggregates the message and send a second "aggregated"
message to a second MDB. The second MDB would be the one doing the real
processing. Depending on how you handle the transaction, the whole batch would
either succeed or fails.
A variant would be to rely on JMS itself to queue the message, then the timer
open a connection, consumes the message from queue1 and send them one by one to
queue 2 which are then process with a MDB. The system must be sized and
configured so that no message get discarded from queue 1 in case the load is
too important.
You could also process the message in the timer itself, as suggested in previous
posts. The different will be mainly in the nature of the retry mechanism. MDB
can be configured with retry attempt, dead message queue, etc. Timer also have
retry mechanism, but are a bit more limited.
[Message sent by forum member 'ewernli' (erwa...@gmail.com)]





