private Vector<PoolEventListener> poolEventListeners = new Vector<PoolEventListener>();
public AbstractPool(PooledService pooledService) {
parentService = pooledService;
AbstractServiceDesc serviceDesc = pooledService.getServiceDesc();
int minInstances = serviceDesc.getMinInstances();
int maxInstances = serviceDesc.getMaxInstances();
this.minInstances = minInstances < maxInstances ? minInstances
: maxInstances;
this.maxInstances = maxInstances > minInstances ? maxInstances
: minInstances;
this.timeout = serviceDesc.getTimeout();
// Add self listener to the listeners list.
this.addEventListener(selfListener);
}