-
Feature Request
-
Resolution: Done
-
Major
-
2.3.5.Final
-
None
Modules injected via resteasy-guice have no way to receive notice of ServletContextListener.ContextDestroyed to perform cleanup. In one of my use cases, with Terracotta's EE Ehcache's being started via Guice, when Tomcat tries to destroy the Resteasy servlet, I get 60 or so errors alike the following:
Mar 4, 2013 4:00:17 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/bo] appears to have started a thread named [BO] but has failed to stop it. This is very likely to create a memory leak.
Mar 4, 2013 4:00:17 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/bo] appears to have started a thread named [non stop reaper thread] but has failed to stop it. This is very likely to create a memory leak.
Mar 4, 2013 4:00:17 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Preventing these errors- telling Ehcahe to shut down- is just a matter of being notified, so we can run the appropriate cleanup during servlet context destroying.