tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <rosenberg.l...@googlemail.com>
Subject Re: Is ThreadLocal safe to use in servlets
Date Sat, 02 Jun 2007 19:52:04 GMT
they are absolutely perfect to reduce parameter pumping through many
layers of code. But you should set and reset them properly, best in a
filter.

regards
Leon

On 6/2/07, lightbulb432 <veerukrishnan@hotmail.com> wrote:
>
> Are ThreadLocal variables safe to use with servlets? There are some cases
> where it could really simplify my code if used correctly, but first I want
> to make sure there aren't any horrible problems with doing so. (I've read
> that the implementation of ThreadLocals has gotten much better with the last
> few releases of Java.)
>
> Has anyone had experience using them successfully, or even unsuccessfully?
> If so, please share your insights.
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Is-ThreadLocal-safe-to-use-in-servlets-tf3858168.html#a10930638
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Mime
View raw message