commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandeep More <moresand...@gmail.com>
Subject [pool] Way to destroy all the objects in a pool
Date Fri, 20 Jan 2012 01:21:19 GMT
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 ?

Thanks in advance,
/srm


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message