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?