tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Kriger <andy.kri...@gmail.com>
Subject Re: finalize question
Date Wed, 02 Nov 2005 18:49:27 GMT
> See ...
> http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669
>
> (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?

thx
andy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message