Hi,
Thanks for the quick answer. I try this, but something strange is happening when I try to deploy application (without the Tomcat restart). I define ServletContextListener (create my implementation of this listener and define this listener in web.xml). In method contextDestroyed I try to shutdown all of the schedulers in following way: ApplicationContext context = (ApplicationContext) sce.getServletContext().getAttribute(WebApplicationContext.* ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE*); scheduler = (StdScheduler) context.getBean("scheduler"); cbcInterfaceScheduler.shutdown(*true*); Boolean parameter means: wait for jobs to complete. I follow the logs, destroy method is called and all schedulers are shutdown. When I try to deploy same WAR file again, following error appears in catalina log file: Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [scheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak. Aug 13, 2010 12:22:54 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [Thread-32] but has failed to stop it. This is very likely to create a memory leak. I also try to pause all jobs for scheduler and remove all jobs from scheduler before I shutdown the scheduler, but I get the same error. This is confusing for me because this is shown in log file when I try to deploy application. Could you give me some advice of how I can solve this? Thanks in advance. 2010/8/12 Caldarale, Charles R <chuck.caldar...@unisys.com> > > From: Ivan Mladenović [mailto:pif...@gmail.com] > > Subject: Question about undeploying application > > > > Deployed application have some threads that are running > > in background. > > Then deployed application must stop those threads as part of its shutdown > procedure. Tomcat can't do it for you. You should be using a > ServletContextListener in your webapp, so it can properly manage the threads > when its contextDestroyed() method is invoked. > > > Can I configure Tomcat to kill all treads when application > > is undeployed? > > No, that's the webapp's job. > > - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >