Abstract base class for pooling
org.springframework.aop.TargetSource implementations which maintain a pool of target instances, acquiring and
releasing a target object from the pool for each method invocation.
This abstract base class is independent of concrete pooling technology;
see the subclass
CommonsPoolTargetSource for a concrete example.
Subclasses must implement the
AbstractPoolingTargetSource.getTarget and
AbstractPoolingTargetSource.releaseTarget methods based on their chosen object pool.
The
AbstractPoolingTargetSource.newPrototypeInstance() method inherited from
AbstractPrototypeBasedTargetSource can be used to create objects
in order to put them into the pool.
Subclasses must also implement some of the monitoring methods from the
PoolingConfig interface. The
AbstractPoolingTargetSource.getPoolingConfigMixin() method
makes these stats available on proxied objects through an IntroductionAdvisor.
This class implements the
org.springframework.beans.factory.DisposableBean interface in order to force subclasses to implement a
AbstractPoolingTargetSource.destroy() method, closing down their object pool.
author: Rod Johnson author: Juergen Hoeller See Also: AbstractPoolingTargetSource.getTarget See Also: AbstractPoolingTargetSource.releaseTarget See Also: AbstractPoolingTargetSource.destroy |