tomcat没法shutdown

tomcat无法shutdown

tomcat无法shutdown,shutdown之后还有一些进程没有释放导致jvm还在活动(大概是这样)。tomcat没法shutdown

 

解决:程序中的线程设置为守护线程:setDaemon(true)

在servlet 中 destroy方法里面自己销毁线程

 

如果是spring则在bean后面配置 destroy-method="destroy" 

 

 

 

目前知道 

org.springframework.scheduling.quartz.SchedulerFactoryBean destroy无效(BUG?)

 

com.mysql.jdbc.Driver 不知道在哪销毁

pool-4-thread-1?这个是什么线程 不知道在哪tomcat没法shutdown

 

 

SchedulerFactoryBean destroy无效的问题 可以通过重写 destroy方法,在shutdown之后给一个 Thread.sleep(1000) 然后就可以了。

 

至于com.mysql.jdbc.Driver 为什么destroy不了就不太了解了。每次shutdown关闭不了之后只能去kill进程 很烦,

而且有时候端口还一直被占用状态中。

1 楼 miwucc 2012-03-21  
楼主,我这个quartz的销毁方法也没法成功。。Thread.sleep(1000) 还是不行啊。。。
com.mysql.jdbc.Driver没法释放。。。
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/lumi-ticket] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/lumi-ticket] appears to have started a thread named [startQuertz_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/lumi-ticket] appears to have started a thread named [Timer-2] but has failed to stop it. This is very likely to create a memory leak.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/lumi-ticket] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/lumi-ticket] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/lumi-ticket] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/lumi-ticket] created a ThreadLocal with key of type [com.schooner.MemCached.SchoonerSockIOPool$1] (value [com.schooner.MemCached.SchoonerSockIOPool$1@1be961e]) and a value of type [java.security.MessageDigest.Delegate] (value [MD5 Message Digest from SUN, <initialized>
]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/lumi-ticket] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@171a201]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@1c80d4]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2012-3-21 19:20:19 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/lumi-ticket] created a ThreadLocal with key of type [org.apache.ws.commons.schema.utils.CollectionFactory$1] (value [org.apache.ws.commons.schema.utils.CollectionFactory$1@14df906]) and a value of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.