Type | Changes | By |
 |
Fixed constructor which was ignoring maxTotal parameter:
GenericKeyedObjectPool(Keyed
PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction,
long maxWait, int maxIdle, int maxTotal, boolean testOnBorrow, boolean testOnReturn,
long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis,
boolean testWhileIdle)
|
sandymac |
 |
Changed StackKeyedObjectPool to discard stalest, not freshest, idle object when maxSleeping is reached.
|
sandymac |
 |
Allowed blocked threads in GenericObjectPool borrowObject to be interrupted.
Fixes POOL-102.
Thanks to John Sumsion.
|
psteitz |
 |
Fixes to address idle object eviction and LIFO/FIFO behavior reported
in POOL-86.
-
Made LIFO/FIFO behavior configurable for GenericObjectPool and
GenericKeyedObjectPool, with default set back to LIFO
(reverting to 1.2 behavior).
-
Fixed GOP, GKOP evict method and added tests to ensure objects
are visited in oldest-to-youngest order.
-
Changed backing store for GOP, GKOP pools back to Commons
Collections CursorableLinkedList (brought this class in,
repackaged with package scope).
Fixes POOL-86.
|
psteitz |
 |
Changed the default setting for Config.softMinEvictableIdleTimeMillis to
GenericObjectPool.DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS (was
being incorrectly defaulted to DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS).
Fixes POOL-110.
Thanks to Alexander Pogrebnyak.
|
psteitz |
 |
Added a wrapper for the shared idle object eviction timer for all
pools. The wrapper class wraps the Timer and keeps track of how many
pools are using it. If no pools are using the timer, it is canceled.
This prevents a thread being left running which, in application server
environments, can lead to memory leaks and/or prevent applications
from shutting down or reloading cleanly.
Fixes POOL-97.
Thanks to Mark Thomas.
|
psteitz |
 |
Reduced synchronization in GenericObjectPool, GenericKeyedObjectPool.
Factory method activations within synchronized blocks were causing
performance problems in DBCP and other applications where factory
methods could block. Fixes both POOL-93 and POOL-108.
Fixes POOL-93.
Thanks to Mark Thomas.
|
psteitz |
 |
Made _testOnBorrow, _testOnReturn volatile and removed synchronization
in associated getters and setters in GenericObjectPool,
GenericKeyedObjectPool. Made getNumIdle synchronized in
StackKeyedObjectPool.
Fixes POOL-113.
|
psteitz |
 |
Fixed an error in the GenericKeyedObjectPool constructor that takes
a Config instance as a parameter. The minIdle setting in the Config
was being ignored by the constructor.
Fixes POOL-116.
|
psteitz |
 |
Made behavior on instance validation failure consistent across pools,
eliminating possible infinite loops in StackObjectPool,
StackKeyedObjectPool, SoftReferenceObjectPool when factory fails to
create valid objects.
Fixes POOL-117.
|
|
 |
When no factory has been defined, addObject now throws
IllegalStateExecption instead of NullPointerException for all pools.
|
sandymac |
 |
SoftReferenceObjectPool. Improved the accuracy of getNumIdle by
"pruning" references to objects that have been garbage collected.
|
sandymac |
 |
GenericObjectPool, GenericKeyedObjectPool, SoftReferenceObjectPool,
StackObjectPool. Eliminated IllegalStateExceptions when the following
operations are attempted on a closed pool: getNumActive, getNumIdle,
returnObject, invalidateObject. In each case, the operation is allowed
to proceed, reporting the state of the pool that is being shut down, or
destroying objects returning to the closed pool.
|
sandymac |
 |
StackObjectPool, SoftReferenceObjectPool, GenericKeyedObjectPool. Allowed
borrowObject to continue (either examining additional idle instances or
with makeObject) when an exception is encountered activating an idle
object instead of propagating the exception to the client. Also made
addObject propagate (not swallow) exceptions when passivating newly
created instances.
|
sandymac |
 |
StackKeyedObjectPool. Added validation check for objects returned
from borrowObject.
|
psteitz |
 |
BaseObjectPool, BaseKeyedObjectPool. Instead of throwing
UnsupportedOperationException, the base class implementations
of getNumIdle and getNumActive return negative values. The
base implementation of close in BaseObjectPool no longer throws
IllegalStateException when invoked on an already closed pool.
|
sandymac |