tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Kriger <>
Subject Re: finalize question
Date Wed, 02 Nov 2005 18:49:27 GMT
> See ...
> (I really need to update the FAQ on this one)
> -Tim

Thanks for the info. A followup question...
"The second one is where the application has ThreadLocal data that is
attached to a container thread. In tomcat this thread will be part of
the thread pool, so it will never be garbage collected."

We use ThreadLocal to handle our Hibernate Session. In
ServletContextListener.contextDestroyed, I call a destroy method on
the class doing the handling that cleans up the Hibernate Sessions and
nulls out the ThreadLocal. Will this allow it to be gc'd or will
Tomcat still hold onto a reference?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message