com.ibm.websphere.asynchbeans.pool
Interface PoolableObject
-
public interface PoolableObject
Pooled objects that need to be initialized or cleaned up when entering/leaving the pool should implement this interface. The default pool implementation checks if the object being pooled implements this interface. If the object being pooled implementsPoolableObject
then the default object pool implementation will call theinit
method when returning the object fromObjectPool.getObject
and call thereturned
method whenObjectPool.returnObject
is called.Objects that implement
java.util.Collection
are automatically cleared when returned to a default object pool.