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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]