SOLVED: Service lifecycle
david.grigglestone Jan 20, 2012 4:36 PMIn the doc I see that session lifecycles are bound to the underlying HTTP session, however it is not apparent what the lifecycle of a service is.
In particular I am trying to understand the correct way(s) to cleanup any threads that might be created by the service. It is not obvious to me how to get a callback when the service should be destroyed.
I'd also like to understand why I see messages from the web-container (in my case Tomcat) like those below when I undeploy an example app like the stockdemo?
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/errai-bus-demos-stockdemo] appears to have started a thread named [com.google.inject.internal.util.$Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/errai-bus-demos-stockdemo] appears to have started a thread named [Thread-6] but has failed to stop it. This is very likely to create a memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/errai-bus-demos-stockdemo] appears to have started a thread named [Dispatch Worker Thread] but has failed to stop it. This is very likely to create a memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/errai-bus-demos-stockdemo] appears to have started a thread named [Dispatch Worker Thread] but has failed to stop it. This is very likely to create a memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/errai-bus-demos-stockdemo] appears to have started a thread named [Thread-7] but has failed to stop it. This is very likely to create a memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/errai-bus-demos-stockdemo] appears to have started a thread named [ExecutorPoolWorker] but has failed to stop it. This is very likely to create a memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/errai-bus-demos-stockdemo] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@1a5a58e0]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@2180e7a4]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/errai-bus-demos-stockdemo] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@15e7d12b]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@26556949]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/errai-bus-demos-stockdemo] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@31734b48]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@8537d55]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/errai-bus-demos-stockdemo] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@21495bb8]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@57249e1a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jan 18, 2012 1:03:23 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/errai-bus-demos-stockdemo] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@2507e9a8]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@2a7d2796]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.