Sto usando Quartz per eseguire un lavoro ogni ora. Il servlet è in esecuzione su Tomcat e sto utilizzando ServletConextListener per ascoltare quando il contesto viene distrutto.Quarzo: perdita di memoria?
quando chiudo Tomcat, ottengo il messaggio:
"sembra aver iniziato una discussione chiamato [MyScheduler_Worker-1], ma non è riuscito a fermarlo".
Ma più tardi vedo questo messaggio:
"[DEBUG] 28 Settembre 11: 45: 26,671 AM MyScheduler_Worker-1 [org.quartz.simpl.SimpleThreadPool]
WorkerThread viene arrestato."
Quindi è lecito ritenere che non ci siano perdite di memoria a causa di questo thread?
Ecco come il mio registro appare:
{SEVERE: The web application [/*************] appears to have started a thread
named [MyScheduler_Worker-1] but has failed to stop it. This is very likely to c
reate a memory leak.
Sep 28, 2011 11:45:26 AM org.apache.catalina.loader.WebappClassLoader clearRefer
encesThreads
SEVERE: The web application [/*************] appears to have started a thread
named [MyScheduler_Worker-2] but has failed to stop it. This is very likely to c
reate a memory leak.
Sep 28, 2011 11:45:26 AM org.apache.catalina.loader.WebappClassLoader clearRefer
encesThreads
SEVERE: The web application [/*************] appears to have started a thread
named [MyScheduler_Worker-3] but has failed to stop it. This is very likely to c
reate a memory leak.
[DEBUG] 28 Sep 11:45:26.671 AM MyScheduler_Worker-2 [org.quartz.simpl.SimpleThre
adPool]
WorkerThread is shut down.
[DEBUG] 28 Sep 11:45:26.671 AM MyScheduler_Worker-1 [org.quartz.simpl.SimpleThre
adPool]
WorkerThread is shut down.
[DEBUG] 28 Sep 11:45:26.671 AM MyScheduler_Worker-3 [org.quartz.simpl.SimpleThre
adPool]
WorkerThread is shut down.
Tomcat si dice di non dare abbastanza tempo per quarzo per l'arresto dei fili. Ma non sono ancora riuscito a verificarlo. – Codo