Auto Email. 2005-04-11 - By Darshan
Back Hi Robert,
Thanks for your reply. I need some clarifications regarding the daemon thread solution as i didn't worked on daemon threads.
My current application's requests will be dispatched to a handler classes from a servlet. Suppose if i create a normal thread from a handler it will create a new thread for each request. Is it the same with daemon threads? If yes, then there will be a multiple thread lookups to the DB.
I am going through the Quartz. I have the same query regarding this product also. Suppose if i create a instance of Job Scheduling code in a servlet or a handler, will it create multiple threads which leads to multiple lookups to the DB?
Thanks & Regards Darshan
On Sun, 10 Apr 2005 06:13:25 -0400, Robert Taylor <64rwtaylor05@(protected)> wrote:
>Darshan, > >Write a daemon process that "wakes up" every 24 hours and queries the >database for all users whose passwords have "expired". >Iterate over the returned collection and email them their new password. > >The daemon process could be implemented using the java.util.Timer and >java.util.TimerTask or a more robust solution might be to use Quartz. >Your process would simple use a POJO service which would delegate the >database call to a DAO to retrieve the data. The service could then use >the Java Mail API or maybe an "email service" to facilitate creating and >sending the email. > >If you wanted to get really fancy you could use Spring to "wire up" your >components. > >No need to involved Tomcat or MVC. > > >/robert > >Darshan wrote: >> Hi, >> >> In our project one of the requirement is "the password of a user has to >> become invalid for each 100 days from the last password change date, and >> system should generate a new password and send it to the user". The >> technical details as follows. >> >> Plain Java code (No EJBs),Oracle DB,Mail API for emailing, MVC and DAO >> patterns, Tomcat 4.1 >> >> The emailing component will be integrated with the current system and the >> component should run only once per day to check the expired passwords. >> There should not be any end user interaction required to achieve this. >> >> Please share your ideas on this. >> >> Thanks in advance. >> >> Regards >> Darshan >> >> =========================================================================== >> To unsubscribe, send email to listserv@(protected) and include in the body >> of the message "signoff J2EE-INTEREST". For general help, send email to >> listserv@(protected) and include in the body of the message "help". >> >> > > ========================================================================== >To unsubscribe, send email to listserv@(protected) and include in the body >of the message "signoff J2EE-INTEREST". For general help, send email to >listserv@(protected) and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|