-
Aug 16th, 2010, 04:24 AM
#1
How to kill all threads created by application on application undeploy
Hi,
I’m using Spring 3.0.3 version. Web application is deployed on Tomcat 6.0.29. When application is running application will start some background jobs (some of them are scheduled by Quartz 1.8.4).
When I try to undeploy application (by using Tomcat Manager) there is a following error:
Aug 16, 2010 10:08:52 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [ActiveMQ Scheduler] but has failed to stop it. This is very likely to create a memory leak.
Aug 16, 2010 10:08:52 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Thread-13] but has failed to stop it. This is very likely to create a memory leak.
Aug 16, 2010 10:08:52 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [TcpSocketClose: java.util.concurrent.ThreadPoolExecutor$Worker@700 edc] but has failed to stop it. This is very likely to create a memory leak.
Application has defined ServletContextListener, and method contextDestroyed is overridden. This method will shutdown all the Quartz schedulers that are defined in application. Quartz jobs are shutdown in following way:
WebApplicationContext context = (WebApplicationContext) sce.getServletContext().getAttribute(
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT _ATTRIBUTE);
StdScheduler scheduler = (StdScheduler) context.getBean("scheduler");
scheduler.shutdown(true);
Boolean parameter means: wait for jobs to complete.
It seems to threads that are in error message not created with Quartz scheduler.
The problem is when I try to deploy new version (or same application again) application cannot be started and I get following error:
Aug 16, 2010 11:17:30 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [scheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
Aug 16, 2010 11:17:30 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Thread-31] but has failed to stop it. This is very likely to create a memory leak.
Can I kill all threads on application undeploy (without restarting the Tomcat)?
Thanks in advance.
-
Aug 18th, 2010, 01:45 AM
#2
Problem solved
Hello,
Problem solved by changing Quartz scheduler version to 1.8.3.
-
Jul 5th, 2011, 11:49 AM
#3
Downgrading to 1.8.3 didn't fix the problem for me. I posted my solution here in a similar thread
http://forum.springsource.org/showth...060#post370060
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules