IBM WebSphere Application ServerTM
Release 7

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 implements PoolableObject then the default object pool implementation will call the init method when returning the object from ObjectPool.getObject and call the returned method when ObjectPool.returnObject is called.

Objects that implement java.util.Collection are automatically cleared when returned to a default object pool.


Method Summary
 void init()
          This is called when the object is about to be reused from the pool.
 void returned()
          This is called when the object is returned to the pool.
 

Method Detail

init

void init()
This is called when the object is about to be reused from the pool.


returned

void returned()
This is called when the object is returned to the pool.


IBM WebSphere Application ServerTM
Release 7