> -----Original Message----- > From: Berin Loritsch [mailto:[EMAIL PROTECTED] > Sent: den 2 november 2001 16:50 > To: Avalon Developers List > Subject: Re: Throttling Excalibur > > My initial attempts to provide a BlockingHardResourceLimitingPool > (i.e. one > that waits until something is released) resulted in DeadLock in certain > circumstances. This is IMO a bad thing--because once you have deadlock, > you can't get ANY more connection objects.
Hmmm... It looks like something the DjikstraSemaphore class could be used for. Use semaphore.aquire() in get() and semaphore.release() in put(). This, of course, means that each thread can only aquire one instance from the pool, to prevent deadlock. Is there a way to recognize when a thread has taken two items out of the pool and optionally throw an exception in that case? Berin, I'd be quite happy to take a look at whatever code it is you have for the blocking pool, along with the test cases (if any). /LS -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>