> From: Stephan Schöffel [mailto:[EMAIL PROTECTED] > Subject: Re: Howto continue TimerTask after Tomcat Server was > restarted > > maybe you could put your timertask in an servlets init() > method and the put <load-on-startup>1</load-on-startup> > in the web.xml of that servlet
Not recommended, since there's no guarantee the init() method will only be called once (a servlet may be instantiated multiple times). Better to use a lifecycle listener; see section 10 of the servlet spec for details. Also, make sure you have a reliable means of shutting down the timer task when the related app (or Tomcat itself) goes away. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]