Hi, >Hello. I have some classes that are started by a servlet when tomcat >starts, their main method has a timer to execute some stuff periodically. >When I shut tomcat down, the classes remain running. How can i make them >shut down with tomcat?
One possible way would be to implement a ServletContextListener and its contextDestroyed() event, shut down the classes gracefully. Another way, assuming the classes are extensions of threads, to mark them as daemons. Daemon threads will die when tomcat exits. Did you write these classes or are they 3rd party? >The reason they stay up is probabbly the same for their log file to be >catalina's log and not my app's log, which i still have not figured out how >to change. I doubt that's the reason they stay up. It's more likely that the above are two separate issues. You could post another question in a new thread with logging questions. I suggest you search the archives first as the above question is fairly common. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
