View Single Post
  #6 (permalink)  
Old 01-24-2008, 08:16 PM
JAdmin JAdmin is offline
Member
 
Join Date: Jan 2008
Posts: 20
JAdmin is on a distinguished road
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!
Reply With Quote