Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4
-
None
Description
When setting a new object factory, the existing idle poolable objects are not destroyed by the same factory that created them.
1453 public void setFactory(PoolableObjectFactory factory) throws IllegalStateException {
1454 List toDestroy = new ArrayList();
1455 synchronized (this) {
1456 assertOpen();
1457 if(0 < getNumActive())
else
{ 1460 toDestroy.addAll(_pool); 1461 _numInternalProcessing = _numInternalProcessing + _pool._size; 1462 _pool.clear(); 1463 }1464 _factory = factory;
1465 }
1466 destroy(toDestroy); // <----- indirectly calls _factory.destroy(...) when _factory has already been replaced by the new factory.
1467 }