Done:
https://issues.apache.org/jira/browse/POOL-183
- Original Message
From: Phil Steitz
To: Commons Developers List
Sent: Wed, February 2, 2011 2:18:52 PM
Subject: Re: [pool] potential new method for interface ObjectPool
On 2/2/11 1:46 PM, zoly farkas wrote:
> Would it
Would it be possible to add a method:
void returnAndValidateObject(T obj) throws Exception
In general I was thinking of the following use case:
Object o = pool.borrowObject();
try
{
.
o.doStuff();
.
pool.returnObject(o);
}
catch(Exception e)
{
// not sure what
the use volatiles : waiting,complete,totalBorrowTime, totalReturnTime,
nrSamples
is not correct.
for ex the following totalBorrowTime += borrowTime is not atomic resulting in a
race condition.
one way to fix this is using the java.util.concurent Atomic variants or even
better,
make these var