commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: Digester and Threads Question
Date Wed, 24 Mar 2004 19:30:26 GMT
No problem!  That will definitely work, but it might be a little better to
use a pool rather than a ThreadLocal.  With a pool, you won't necessarily
have to have a new instance for every thread.  The pool will only create one
if it's absolutely necessary (i.e. the pool is empty when a thread wants to
borrow an object from it).  So, if it's quite uncommon for requests to be
simultaneously using a Digester for this purpose, you might even get by with
only ONE instance.  Plus, a ThreadLocal is associated with a SPECIFIC Thread
object.  So, if your appserver doesn't use a thread pooling mechanism (most
do, however), you really won't be saving yourself anything.  Just some
thoughts. :-)

-----Original Message-----
From: Adrian Perez Jorge [] 
Sent: Wednesday, March 24, 2004 2:20 PM
To: Jakarta Commons Users List
Subject: Re: Digester and Threads Question

Hey!  That's just what I was looking for! (Well... I didn't search too 
much) Thank you very much James for your answer, thank you very much 
Alan for your question ;)

 This list is just cool .  Cheers,


James Carman wrote:

>Check out the ThreadLocal class for this.  It's part of the core Java
>language and is designed for just this case.

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

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

View raw message