Starting a Clean-up program

2003-01-29 Thread Chandra Gottipati
I have a static method that starts a thread with a class that does some clean-up tasks. public static void init(){ Thread t = new Thread( new ClearUserHashMapClient() ); t.start(); }//init How can I configure my webapp to call this init() method when I deploy my war file on Tomcat.

RE: Starting a Clean-up program

2003-01-29 Thread Shapira, Yoav
Howdy, Implement a javax.servlet.ServletContextListener, and call that init method in the listener's contextInitialized() event. Don't forget to put the listener in your webapp's web.xml file. public static void init(){ Thread t = new Thread( new ClearUserHashMapClient() ); t.start();

RE: Starting a Clean-up program

2003-01-29 Thread Scott Purcell
class and immediately executes its init. Scott Purcell Vertis Corporation -Original Message- From: Chandra Gottipati [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 9:45 AM To: Tomcat Users List Subject: Starting a Clean-up program I have a static method that starts a thread