Ano, redeploy memory leaky web aplikaci jsou bohuzel velmi caste. (Objevil jsem je napr. v ZKossu, JasperReports, ale i jeden Hibernate). Vetsinou je duvodem spane pouziti ThreadLocal promennych, nekdy i neukoncene Thready. V tomto pripade se zda byt duvodem oboji. Nejlepsi je ThreadLocal i Thready spravne pouzivat. Ale kdyz nezbyde nic jineho, tak se daji i vycisit.
Cisteni po kazdem requestu: http://www.dewavrin.info/?p=196 Cisteni pri undeploy: presne kod nevim, ale asi se dela v nejakem servler.destroy() metode, s tim, ze servlet ma <load-on-startup>1</load-on-startup>. Mohu to zjistit presneji. Jinak mnoho zdaru pri loveni memory leaku: http://xmedeko.blogspot.com/2010/02/java-web-container-hunting-redeploy.html On Fri, Nov 26, 2010 at 08:30, Vladislav Krejcirik <vkrejci...@gmail.com> wrote: > > Dobry den, mam webovou aplikaci, ktera spousti nova vlakna, ve kterych bezi > dlouho trvajici vypocty. Kdyz aplikaci odinstaluju z Tomcatu (verze 7) mam v > logu nasledujici hlasku. Myslim si, ze aplikace korektne neukonci vsechna > bezici vlakna behem odinstalace. Nesetkal jste se nekdo s timto problemem? > Diky za kazdou pripominku. > > > > 26.11.2010 7:55:29 org.apache.catalina.loader.WebappClassLoader > clearReferencesJdbc > SEVERE: The web application [/clan-cr-20101126] registered the JBDC driver > [org.h2.Driver] but failed to unregister it when the web application was > stopped. To prevent a memory leak, the JDBC Driver h > as been forcibly unregistered. > 26.11.2010 7:55:29 org.apache.catalina.loader.WebappClassLoader > clearReferencesThreads > SEVERE: The web application [/clan-cr-20101126] appears to have started a > thread named [30332...@qtp-25564797-0] but has failed to stop it. This is > very likely to create a memory leak. > 26.11.2010 7:55:29 org.apache.catalina.loader.WebappClassLoader > clearReferencesThreads > SEVERE: The web application [/clan-cr-20101126] appears to have started a > thread named [14807...@qtp-25564797-1 - Acceptor0 > selectchannelconnec...@localhost:8888] but has failed to stop it. This is ve > ry likely to create a memory leak. > 26.11.2010 7:55:29 org.apache.catalina.loader.WebappClassLoader > clearThreadLocalMap > SEVERE: The web application [/clan-cr-20101126] created a ThreadLocal with > key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@1d56bbe]) > and a value of type [org.apache.ibatis.executor.E > rrorContext] (value [ > ### The error may exist in package/core/CoreMapper.java (best guess) > ### The error occurred while processing mapper_resultMap[ConstraintMap]]) > but failed to remove it when the web application was stopped. This is very > likely to create a memory leak. > 26.11.2010 7:55:29 org.apache.catalina.loader.WebappClassLoader > clearThreadLocalMap > SEVERE: The web application [/clan-cr-20101126] created a ThreadLocal with > key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@94a28e]) > and a value of type [org.apache.cxf.bus.CXFBusImpl > ] (value [org.apache.cxf.bus.cxfbusi...@287811]) but failed to remove it > when the web application was stopped. This is very likely to create a memory > leak. > 26.11.2010 7:55:29 org.apache.catalina.startup.HostConfig checkResources > INFO: Undeploying context [/clan-cr-20101126] > > ----- > Vladislav Krejcirik (http://www.vkrejcirik.info) > -- > View this message in context: > http://konference-java-cz.958153.n3.nabble.com/Thread-safe-webova-aplikace-Tomcat-7-tp1971440p1971440.html > Sent from the konference java.cz mailing list archive at Nabble.com. > -- Ondra Medek