我正在使用Quartz來每小時運行一項工作。 Servlet在Tomcat上運行,我正在使用ServletConextListener來偵聽上下文何時被銷燬。石英:內存泄漏?
當我關閉Tomcat,我得到的消息:
「似乎已經開始了一個名爲[MyScheduler_Worker-1]線程,但未能阻止它」。
但後來我看到這條消息:
「[DEBUG] 11年9月28日:45:26.671 AM MyScheduler_Worker-1 [org.quartz.simpl.SimpleThreadPool]
的WorkerThread被關閉。」
因此,假設這個線程沒有內存泄漏是安全的嗎?
這裏是我的日誌的外觀:
{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是說沒有給足夠的時間,以石英來關閉線程。但我還沒有能夠驗證這一點。 – Codo