aspose file tools*
The moose likes Servlets and the fly likes Eternal process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Eternal process" Watch "Eternal process" New topic
Author

Eternal process

Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
Hi friends,

I need in my app something like an eternal process that will run on the server in a quite low priority. I will not have to initialize it, or maybe only once when I restart tomcat.

I am not sure how it should be done in Java.

When it is invoked it should keep on scanning the database for records with dates that have already passed, do something (send an email), set the record's date to some time in the future (according to additional data found in this record), and continue to scan other records... or go to sleep for a while...

Could you please give me some info about how it should be done on a Java server (Tomcat) and what terms should I look into. Should I use daemons?

Thanks, Joseph.


We must know, we will know. -- David Hilbert
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

You have given the textbook definition of a daemon.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
Thank you.

What do you think about java.util.TimerTask

or Quartz ???

Job Scheduling in Java
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eternal process