• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need some ideas

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

thanks

Hongli
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Hongli Li
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I like the DB approach because it provides automatic transaction locking.
 
reply
    Bookmark Topic Watch Topic
  • New Topic