|
We are not sure, if you are using this as part of a web application. If so, there is an easy way to start the timer whenever your application server starts.
It is usually a practice to start Servlets when the application server starts up. You can do this by setting the value for load-on-startup as 1.
<load-on-startup>1</load-on-startup>
Now, add code to start your thread (Timer) in the init() method of the Servlet.
Hope this helps!
Last edited by JavaBean : 01-24-2008 at 09:00 PM.
Reason: No url at the end of every post!
|