You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Emanuele Gheradini <gh...@hotmail.com> on 2009/09/11 10:32:54 UTC

commons.pool 1.5.2 PoolUtils.synchronizedPool question

Watching the source code, it seems to me the implementation of
Generic{Keyed}ObjectPool is thread-safe.

So what is the need of PoolUtils.synchronizedPool ?

Can someone explain me ? I can't find the answer in the docs :(
-- 
View this message in context: http://www.nabble.com/commons.pool-1.5.2-PoolUtils.synchronizedPool-question-tp25397061p25397061.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: commons.pool 1.5.2 PoolUtils.synchronizedPool question

Posted by Emanuele Gheradini <gh...@hotmail.com>.

Mark Thomas wrote:
> 
> 
> Look at the JavaDocs.
> 
> Mark
> 
>From JavaDocs:
"
public static KeyedObjectPool synchronizedPool(KeyedObjectPool keyedPool)

Returns a synchronized (thread-safe) KeyedObjectPool backed by the specified
KeyedObjectPool.
Note: This should not be used on pool implementations that already provide
proper synchronization such as the pools provided in the Commons Pool
library. Wrapping a pool that waits for poolable objects to be returned
before allowing another one to be borrowed with another layer of
synchronization will cause liveliness issues or a deadlock.
"

Sorry for my dumb question. Thanks for replying.

-- 
View this message in context: http://www.nabble.com/commons.pool-1.5.2-PoolUtils.synchronizedPool-question-tp25397061p25397315.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: commons.pool 1.5.2 PoolUtils.synchronizedPool question

Posted by Mark Thomas <ma...@apache.org>.
Emanuele Gheradini wrote:
> Watching the source code, it seems to me the implementation of
> Generic{Keyed}ObjectPool is thread-safe.
> 
> So what is the need of PoolUtils.synchronizedPool ?
> 
> Can someone explain me ? I can't find the answer in the docs :(

Look at the JavaDocs.

Mark




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org