commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <>
Subject Re: Is the commons pool threadsafe
Date Mon, 17 May 2004 16:40:36 GMT
Yes, GenericObjectPool is thread safe, you don't have to synchronise.

You might want to make sure your PoolableObjectFactory is thread safe.
Concurrent pool.borrowObject() method calls are able to call the 
PoolableObjectFactory methods at the same time.


Ian Petzer wrote:
> Hello All
> I trawled through the mail-archives about this issue but could not come up
> with a conclusive answer.
> My question is:
> Is access to the GenericObjectPool thread safe? Can I have multiple objects
> calling borrowObject() and returnObject() at the same time or do I need to
> synchronise access to it?
> Thanks
> Ian

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

View raw message