commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zoly farkas <>
Subject [pool] potential new method for interface ObjectPool<T>
Date Wed, 02 Feb 2011 18:46:31 GMT
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();
catch(Exception e)
    // not sure what the cause is, let's make sure o is valid.

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

any thoughts ?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message