com.ibm.websphere.asynchbeans.pool

Interface PoolableObject


  1. 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

Modifier and Type Method and Description
  1. void
init()
This is called when the object is about to be reused from the pool.
  1. void
returned()
This is called when the object is returned to the pool.

Method Detail

init

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

returned

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