You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Dirk Verbeeck <di...@pandora.be> on 2003/11/24 23:46:36 UTC

Re: [dbcp] [crosspost from dev] PoolableConnectionFactory validat ion and synchronized methods

Just compare the 2 borrowObject methods.
GenericObjectPool:
     public Object borrowObject() throws Exception {

GenericKeyedObjectPool:
     public synchronized Object borrowObject(Object key) throws Exception {

GenericKeyedObjectPool has the disadvantage of being completely synchronized.
Lots of room for improvements.

PS: Because of the synchronization in PoolableConnectionFactory you won't see 
a lot of difference between BasicDataSource and the other ones but once the 
synchonization on validate is removed you will see the difference.

-- Dirk

Todd Carmichael wrote:

> Has your experience and feedback from others been that GenericObjectPool
> 'scales' better than GenericKeyedObjectPool?
> 
> Anyone else with perspective on this please chime in. 
> 
> Thanks.
> 
> ToddC




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