Re: [pool] GenericKeyedObjectPool, WHEN_EXHAUSTED_BLOCK multiple threads

2006-10-29 Thread Holger Hoffstaette
Hi Sandy, On Sat, 28 Oct 2006 21:12:06 -0400, Sandy McArthur wrote: The next release of pool has a KeyedObjectPool implementation that basically uses a monitor per key. There is a global monitor for accessing the the internal pool for the key but it is very briefly held. This code has been

[pool] GenericKeyedObjectPool, WHEN_EXHAUSTED_BLOCK multiple threads

2006-10-28 Thread Holger Hoffstaette
I'm having a bit of a problem understanding a scenario for GenericKeyedObjectPool. I need to WHEN_EXHAUSTED_BLOCK with a GKOP that is used from multiple threads, but I cannot see how a blocking borrow(key) can ever continue when another thread tries to returnObject(key, object), as the methods

Re: [pool] GenericKeyedObjectPool, WHEN_EXHAUSTED_BLOCK multiple threads

2006-10-28 Thread Marc Carter
List commons-user@jakarta.apache.org To commons-user@jakarta.apache.org cc Subject [pool] GenericKeyedObjectPool, WHEN_EXHAUSTED_BLOCK multiple threads I'm having a bit of a problem understanding a scenario for GenericKeyedObjectPool. I need to WHEN_EXHAUSTED_BLOCK with a GKOP that is used

Re: [pool] GenericKeyedObjectPool, WHEN_EXHAUSTED_BLOCK multiple threads

2006-10-28 Thread Holger Hoffstaette
On Sat, 28 Oct 2006 17:15:41 +0100, Marc Carter wrote: I cannot see how a blocking borrow(key) can ever continue when another thread tries to returnObject(key, object) borrowObject() calls Object.wait() which allows other threads access to the locked object (as opposed to Thread.sleep() which

Re: [pool] GenericKeyedObjectPool, WHEN_EXHAUSTED_BLOCK multiple threads

2006-10-28 Thread James Carman
The java.util.concurrent package didn't arrive until JDK5, so I would doubt that you can use that stuff in Commons Pool anyway. The Ant build says that the source version is 1.4. On 10/28/06, Holger Hoffstaette [EMAIL PROTECTED] wrote: On Sat, 28 Oct 2006 17:15:41 +0100, Marc Carter wrote: