commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [pool] Way to destroy all the objects in a pool
Date Fri, 20 Jan 2012 16:36:44 GMT
On Thu, Jan 19, 2012 at 8:21 PM, Sandeep More <moresandeep@gmail.com> 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: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message