commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: [dbcp] [crosspost from dev] PoolableConnectionFactory validat ion and synchronized methods
Date Mon, 24 Nov 2003 22:46:36 GMT
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


Mime
View raw message