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: GenericKeyedObjectPool synchronization
Date Fri, 23 Apr 2004 17:09:27 GMT
It is included in v1.1
The changes were done between revisions 1.21 and 1.24 of 
GenericObjectPool:
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/pool/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?r1=text&tr1=1.21&r2=text&tr2=1.24&diff_format=l

The same technique should work with the Keyed version.

A performance test for the keyed pool would be nice, here is the one 
for GenericObjectPool:
http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/pool/src/test/org/apache/commons/pool/performance/PerformanceTest.java

There is a TODO in the GenericKeyedObjectPool.borrowObject.
If you have a large pool and use "maxTotal" then you probably want to 
apply this patch:
http://issues.apache.org/bugzilla/show_bug.cgi?id=27493
It will be included in v1.3 but first I want to release the current 
cvs head as v1.2.

Cheers
Dirk

Delfosse Julien wrote:
> Thanks for your response.
> 
> I was actually planning to use a bunch of generic object pool objects (one
> for each key) and to synchronize on that particular pool, but I guess it
> would be a waste of space.  Other possibility include using the
> util.concurrent package and semaphores, but I have to be extra-carefull
> about deadlocks, resource leaks and other boring (and complicated) stuff.
> 
> I'll definitely check your GenericObjectPool synchronization.  Is it in the
> 1.1 distro or do I have to browse the cvs head (or a specific branch ?)
> 
> Thanks again
> 
> Julien



---------------------------------------------------------------------
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