-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Eric,
On 7/22/2010 12:58 AM, Eric P wrote: > One idea would be to insert a record into a database table that > signifies an email should be sent to the user. This table could be > regularly checked by a scheduled job (e.g., a TimerTask) that runs every > minute in the background. I like this idea in theory, but prefer a different implementation: use cron instead of TimerTask. Make your email-sending code completely separate from your webapp. This will give you greater flexibility and you can even have the job running on a completely different server. Plus, if you decide to cluster your webapp, you don't have to figure out how to choose which cluster member should run the email job and which ones should not. > Another (maybe not so good) idea would be to leverage perhaps a session > or request attribute listener that would check for a certain attribute > being added to a session or requests. This sounds overly complicated. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxIeDkACgkQ9CaO5/Lv0PB86gCeO9Mhqdl7UJ/LvgP5TesfKL19 x3QAn04tmdN36IfSoka2JFNt2lavV/7J =fX2A -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org