Re: Is ThreadLocal safe to use in servlets

2007-06-24 Thread Martin Gainty
PM Subject: RE: Is ThreadLocal safe to use in servlets From: lightbulb432 [mailto:[EMAIL PROTECTED] Subject: Re: Is ThreadLocal safe to use in servlets A different way of asking this question is where/when does Tomcat start the Thread that handles a given request, and what is executed

RE: Is ThreadLocal safe to use in servlets

2007-06-24 Thread Caldarale, Charles R
From: Martin Gainty [mailto:[EMAIL PROTECTED] Subject: Re: Is ThreadLocal safe to use in servlets Just so I understand..you're advocating ThreadLocal over immutable variables or Local variables? Not at all - just pointing out the ramifications of using ThreadLocal in a thread-pooling

RE: Is ThreadLocal safe to use in servlets

2007-06-24 Thread Caldarale, Charles R
From: lightbulb432 [mailto:[EMAIL PROTECTED] Subject: RE: Is ThreadLocal safe to use in servlets When might an advanced Tomcat user need to play with this Executor element? To conserve resources when multiple Connector elements are configured. No point in having a multitude of idle

RE: Is ThreadLocal safe to use in servlets

2007-06-24 Thread lightbulb432
users of the Singleton. (Though it does simplify each of the 5 methods, making them oblivious to the fact that they're dealing with ThreadLocals, and that's what I'm hoping you might be able to suggest a way of doing...) -- View this message in context: http://www.nabble.com/Is-ThreadLocal-safe

Re: Is ThreadLocal safe to use in servlets

2007-06-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, Martin Gainty wrote: Just so I understand..you're advocating ThreadLocal over immutable variables or Local variables? ThreadLocals... ya know: the power of thread variables with the convenience of local variables. Get with the program.

Re: Is ThreadLocal safe to use in servlets

2007-06-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 lb, lightbulb432 wrote: I have another question about using ThreadLocal as an instance variable in a threadsafe Singleton. If the Singleton has 5 instance methods, each of which requires use of the value stored in the ThreadLocal, I see one

RE: Is ThreadLocal safe to use in servlets

2007-06-24 Thread Caldarale, Charles R
From: lightbulb432 [mailto:[EMAIL PROTECTED] Subject: RE: Is ThreadLocal safe to use in servlets Is it safe to assume that this is the way to go, or are there ever, ever any times when it would be less desirable to go this route than the default thread-pool-per-connector element? I

Re: Is ThreadLocal safe to use in servlets

2007-06-23 Thread lightbulb432
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

RE: Is ThreadLocal safe to use in servlets

2007-06-23 Thread Caldarale, Charles R
From: lightbulb432 [mailto:[EMAIL PROTECTED] Subject: Re: Is ThreadLocal safe to use in servlets A different way of asking this question is where/when does Tomcat start the Thread that handles a given request, and what is executed in the context of that thread? (e.g. filters, listeners

RE: Is ThreadLocal safe to use in servlets

2007-06-23 Thread lightbulb432
that are inserted elsewhere in the same request that created/invalidated a session, or bound/unbound a session attribute. Caldarale, Charles R wrote: From: lightbulb432 [mailto:[EMAIL PROTECTED] Subject: Re: Is ThreadLocal safe to use in servlets A different way of asking this question is where/when

RE: Is ThreadLocal safe to use in servlets

2007-06-23 Thread Caldarale, Charles R
From: lightbulb432 [mailto:[EMAIL PROTECTED] Subject: RE: Is ThreadLocal safe to use in servlets Based on the behavior you specified of ThreadLocals sticking around after the webapp is undeployed, is it correct to say that the thread pool you mentioned is global to ALL webapps in Tomcat

RE: Is ThreadLocal safe to use in servlets

2007-06-23 Thread lightbulb432
instead? -- View this message in context: http://www.nabble.com/Is-ThreadLocal-safe-to-use-in-servlets-tf3858168.html#a11270711 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users

Is ThreadLocal safe to use in servlets

2007-06-02 Thread lightbulb432
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

Re: Is ThreadLocal safe to use in servlets

2007-06-02 Thread Leon Rosenberg
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

RE: Is ThreadLocal safe to use in servlets

2007-06-02 Thread Caldarale, Charles R
From: lightbulb432 [mailto:[EMAIL PROTECTED] Subject: Is ThreadLocal safe to use in servlets Are ThreadLocal variables safe to use with servlets? They're great for keeping track of bits and pieces for a given request, but can lead to GC problems if used for data with a longer lifetime