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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
