On Thu, Jan 19, 2012 at 8:21 PM, Sandeep More <[email protected]> wrote:

> Hello,
> I was wondering whether there is a method which one would call to destroy
> all the objects in a pool.
>
> To be specific, I am using ‘GenericObjectPool’ to create a pool consisting
> of object ‘MyObject’ (implements PoolableObjectFactory).
> ‘destroyObject()’ method is implemented for ‘MyObject’ which does some
> cleaning.
>
> Is there a way for me to call the ‘destroyObject()’ method for all the
> objects in the pool from ‘GenericObjectPool’, something like ‘clear()’ but
> which works on ‘destroyObject()’ method of all the objects in the pool ?
>

Hello,

clear is documented to call PoolableObjectFactory#destroyObject(Object).
What am I missing?

Gary


> Thanks in advance,
> /srm
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
E-Mail: [email protected] | [email protected]
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to