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 cause is, let's make sure o is valid.
    pool.returnAndValidateObject(o);
}

the reason is that validation in general is an expensive operation, and 
enabling 
it all the time is inpractical.

any thoughts ?

--Zoltan




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to