This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Hi, I'm running a standalone Java application to send tons of emails. The client wants to have a GUI tool for "easier" control and friendly interface. The process sometimes takes up to 24 hours to complete since there are hundreds and thousands of emails need to be sent. I want to develop some jsp page with servlets for this. When user clicks on some button or link then the mailing process will kick off, my question is how to interrupt the process when client wants to stop the process in case they make some mistakes? Is it a good idea to convert those command line tool to a Web-based application?
Do you know why this cup is useful? Because it is empty.
Whenever I've done something like this, I do not do the real work in the web application. Rather, the web app only serves as a control panel, and the real work is done by a daemon process running somewhere on the server (or even another server).
I usually use a DB as the communication tool between the two parts, but other means can be used.
The two processes are uncoupled and know nothing about each other. Each just uses the DB to set up and control the jobs.
thanks Bear, I will do it the DB way, what I planed before was I create some dummy file in tmp folder in case of interruption, then my mail daemon will constantly check the file existence, if it exits, then I will stop otherwise resume.
Regards Hongli [ January 07, 2008: Message edited by: Hongli Li ]