I would approach this using persistent messages.
Your webapp creates a persistent message adds the time (as a property
maybe) at which the message should be sent as email and puts it on a queue.
Another application can regularly poll the queue for messages that are
ready to be emailed.
That way if the webapp, the application that does the mailing or the
broker dies and comes back up, the messages are not lost.
Gaurav
Hehl, Thomas wrote:
I new to JMS and messaging in general and would like a little advice.
In my application, I have a java webapp that sends e-mails. For reasons too
complicated to explain, my client wants an hour lag time between the time
the e-mail is created and the time it is sent, so I need to park it
somewhere.
The problem is that I want them to be able to shutdown (or even crash) my
server, re-start, then have the messages take back off again like nothing
ever happened. It seemed like something activeMQ might be well suited for.
Am I barking up the wrong tree? Has anyone done anything like this?
Thanks.
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
ACS, Inc.
Government Solutions
1733 Harrodsburg Road
Lexington, KY 40504-3617
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> or by telephone at 859-277-8800 ext. 144.
Thank you.