Abstract base class for pooling
org.springframework.aop.TargetSourceimplementations 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
CommonsPool2TargetSource for a concrete example.
Subclasses must implement the
#getTarget and
#releaseTarget methods based on their chosen object pool.
The
#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
#getPoolingConfigMixin() method
makes these stats available on proxied objects through an IntroductionAdvisor.
This class implements the
org.springframework.beans.factory.DisposableBeaninterface in order to force subclasses to implement a
#destroy()method, closing down their object pool.