-
1. Re: Custom service for sending emails
darranl Dec 13, 2004 8:00 AM (in response to clau25)You could use EJB timers, or you could work out how long till the mail needs to be send and call Thread.sleep.
-
2. Re: Custom service for sending emails
berkgypsy Dec 13, 2004 1:26 PM (in response to clau25)you should probably create a scheduled service
http://www.jboss.org/wiki/Wiki.jsp?page=Scheduler -
3. Re: Custom service for sending emails
genman Dec 29, 2004 6:22 PM (in response to clau25)
Or schedule the e-mail message using JMS. Create an MDB to send the e-mail when the JMS message is dequeued. -
4. Re: Custom service for sending emails
clau25 Jan 20, 2005 9:37 AM (in response to clau25)Thank you all for your answers.
I did it finally using the sleep() method of the Thread. I am not able to use EJBTimers yet because we use jboss 3.2.3 and as far as i know there are no EJBTimers in this version.
For genman: My service uses JMS for sending the emails. But it has to send a message to the queue at a certain specified time. From there, a MDB sends the email. So i need to make that check in a loop in service in order to see when the time for sending the email is the same as the current time.
Claudia