Apache Commons logo Commons Pool

Apache Commons Pool Release Notes

Release History

Version Date Description
2.8.0 2019-12-05 This is a maintenance release (Java 8).
2.7.0 2019-07-25 This is a feature release (Java 8).
2.6.2 2019-03-05 This is a maintenance release (Java 7).
2.6.1 2019-02-08 This is a maintenance release (Java 7).
2.6.0 2018-07-06 This is a maintenance release (Java 7).
2.5.0 2017-12-16 This is a minor release (Java 7).
2.4.3 2017-10-24 This is a patch release, including bug fixes only (Java 6).
2.4.2 2015-08-01 This is a patch release, including bug fixes only (Java 6).
2.4.1 2015-05-30 This is a patch release (Java 6), replacing a defective binary jar in version 2.4. Other than the build configuration, the source distribution for version 2.4.1 is identical to version 2.4.
2.4 2015-05-27 This is a maintenance release that includes bug fixes and minor enhancements (Java 6).
2.3 2014-12-30 This is a maintenance release that includes bug fixes and minor enhancements (Java 6).
2.2 2014-02-24 This is a maintenance release (Java 6) that adds a new testOnCreate configuration option and fixes a small number of bugs.
2.1 2013-12-30 This is a maintenance release (Java 6) that includes a small number of new features as well as including bugfixes and test case improvements.
2.0 2013-11-11 This is a major new release (Java 6) that provides significant performance improvements in high concurrency environments. Pools now provide a mechanism for tracking objects that have been borrowed from the pool but not returned. There have been numerous API changes to support these and other new features as well as to clarify behaviour and improve consistency across the API. This release requires JDK level 1.6 or above.
1.6 2012-01-07 Adds generics (Java 5).
1.5.7 2011-12-20 This is a patch release, including bugfixes only.
1.5.6 2011-04-03 This is a patch release, including bugfixes only.
1.5.5 2010-09-10 This is a patch release, including bugfixes, documentation improvements and some deprecations in preparation for pool 2.0.
1.5.4 2009-11-20 This is a patch release containing a fix for POOL-152, a regression introduced in version 1.5.
1.5.3 2009-09-21 This is a patch release containing a fix for POOL-149, a regression introduced in version 1.5.
1.5.2 2009-07-12 This is a patch release containing fixes for POOL-146 and POOL-147, regressions introduced in version 1.5.
1.5.1 2009-06-16 This is a patch release containing a fix for POOL-144, a regression introduced in version 1.5.
1.5 2009-06-10 This is a maintenance release including several important bug fixes. This release is source and binary compatible with versions 1.3 and 1.4 of commons pool. In addition to resolving some important concurrency-related bugs (POOL-135, POOL-125, POOL-29 POOL-107) this release implements a fairness algorithm to ensure that threads waiting for available object instances from GenericObjectPools and GenericKeyedObjectPools are served in request arrival order.
1.4 2008-01-15 This is a maintenance release including numerous bug fixes. This release is source and binary compatible with version 1.3 of commons pool, but there are some behavior changes introduced to resolve bugs, remove ambiguity or improve robustness. Among these are the change in default behavior of GenericObjectPool and GenericKeyedObjectPool from FIFO back to LIFO queues (as in 1.2 and earlier). The LIFO/FIFO behavior is now configurable. Some of the extra synchronization included in version 1.3 was removed / refactored to improve performance. The javadoc has also been made more complete and explicit. See the detailed list of changes below for specifics on fixed bugs and behavior changes in Commons Pool 1.4. This version of Commons Pool depends only on JDK version 1.3 or higher. Classes implementing pools are all intended to be threadsafe.
1.3 2006-04-06 1.x bugfix release
1.2 2004-06-07 bugfixes
1.1 2003-10-20 bugfixes
1.0.1 2002-08-12  
1.0 2002-05-04  

Release 2.8.0 – 2019-12-05

Type Changes By
Fix org.apache.commons.pool2.impl.GenericKeyedObjectPool.returnObject(K, T) should throw IllegalStateException instead of NullPointerException when a key is not found in the pool map. Fixes POOL-374. Thanks to Gary Gregory, Phil Steitz. ggregory
Update Update optional library cglib from 3.2.12 to 3.3.0. Fixes POOL-375. Thanks to Gary Gregory. ggregory
Fix Fixed regression from original fix for POOL-356 which could result in NPE when destroying objects. Fixes POOL-376. Thanks to Sazzadul Hoque, Phil Steitz. psteitz
Fix Eliminated NPE / ISE exceptions due to keyed pools being prematurely removed. Fixes POOL-326. Thanks to Phil Steitz. psteitz
Update Update site build from Apache Commons BCEL 6.3.1 to 6.4.1. Thanks to Gary Gregory. ggregory
Update Update optional library org.ow2.asm:asm-util from 7.1 to 7.2. Fixes POOL-377. Thanks to Gary Gregory. ggregory
Add Deprecate PoolUtils.prefill(ObjectPool, int) in favor of ObjectPool.addObjects(int). Fixes POOL-378. Thanks to Gary Gregory. ggregory
Add Deprecate PoolUtils.prefill(KeyedObjectPool, K, int) in favor of KeyedObjectPool.addObjects(K, int). Fixes POOL-379. Thanks to Gary Gregory. ggregory
Add Deprecate PoolUtils.prefill(KeyedObjectPool, Collection, int) in favor of KeyedObjectPool.addObjects(Collection, int). Fixes POOL-380. Thanks to Gary Gregory. ggregory
Fix Close BufferedOutputStream in test before calling toString on underlying BufferedOutputStream #26. Thanks to emopers. ggregory
Fix [Javadoc] Add missing @throws comment in SoftReferenceObjectPool. #28. Thanks to Prodigysov. ggregory

Release 2.7.0 – 2019-07-25

Type Changes By
Update Update from Java 7 to Java 8. Fixes POOL-364. Thanks to Gary Gregory. ggregory
Update Update ASM from 7.0 to 7.1. Fixes POOL-365. Thanks to Gary Gregory. ggregory
Update Update optional library cglib from 3.2.10 to 3.2.12. Fixes POOL-366. Thanks to Gary Gregory. ggregory
Update Fix typo in package private method name stopEvitor() -> stopEvictor() #22. Fixes POOL-367. Thanks to Per Lundberg. ggregory
Fix Move validation for newly created objects into create(). Fixes #23. Fixes POOL-361. Thanks to Pablo, Phil Steitz, Bruno P. Kinoshita. ggregory
Add Add org.apache.commons.pool2.PooledObject#getBorrowedCount(). Fixes POOL-370. Thanks to Mark Thomas, Gary Gregory. ggregory
Add Add org.apache.commons.pool2.PooledObject#setRequireFullStackTrace(boolean). Fixes POOL-371. Thanks to Matt Sicker, Gary Gregory. ggregory
Fix CallStackUtils mishandles security manager check part 1. Fixes POOL-352. Thanks to Volker Kleinschmidt. ggregory

Release 2.6.2 – 2019-03-05

Type Changes By
Fix Always null out org.apache.commons.pool2.impl.BaseGenericObjectPool.evictionIterator to match org.apache.commons.pool2.impl.BaseGenericObjectPool.evictor. Fixes POOL-362. ggregory
Fix Evictor Thread prevents Spring Context shutdown in standalone app. Fixes POOL-363. Thanks to Josh Landin. ggregory
Fix The commons-pool-evictor-thread should run as a Deamon. Fixes POOL-348. Thanks to Josh Landin. ggregory

Release 2.6.1 – 2019-02-08

Type Changes By
Fix Correct validateObject with concurrent borrowObject. Fixes POOL-340. Thanks to Pavel Kolesov. struberg
Fix Fix deadlock on massive concurrent requests. Fixes POOL-356. struberg
Update Update optional library cglib from 3.2.6 to 3.2.9. Fixes POOL-345. ggregory
Update Move common configuration setter to BaseGenericObjectPool #9. Fixes POOL-346. Thanks to Michael Chen. ggregory
Fix Method borrowObject waits for maxWaitMillis over in pool full. Fixes POOL-347. Thanks to Shunsuke Nakamura. ggregory
Update Update optional library asm-util from 6.2 to 7.0. Fixes POOL-349. ggregory
Fix NullPointerException closing multiple GenericObjectPools. Fixes POOL-359. Thanks to Michael Wintermeyer, Gary Gregory. ggregory
Update Update optional library cglib from 3.2.9 to 3.2.10. Fixes POOL-360. ggregory
Fix Threading issue, NullPointerException and IllegalStateException in GenericKeyedObjectPool. Fixes POOL-326. Thanks to Chris Allison, Phil Steitz. ggregory
Fix CallStackUtils mishandles security manager check (partial fix.). Fixes POOL-352. Thanks to Volker Kleinschmidt, Gary Gregory. ggregory

Release 2.6.0 – 2018-07-06

Type Changes By
Update GenericObjectPool's borrowObject lock if create() fails with Error. Fixes POOL-336. Thanks to Wolfgang Glas. ggregory
Update Update optional library cglib from 3.2.5 to 3.2.6. Fixes POOL-339. ggregory
Fix Ensure cancelled eviction tasks are removed from scheduler. Fixes POOL-337. Thanks to Reinald Verheij. markt
Update Update optional library asm-util from 6.0 to 6.1.1. Fixes POOL-341. ggregory
Update Update optional library asm-util from 6.1.1 to 6.2. Fixes POOL-342. ggregory
Fix GenericObjectPool constructor may throw an exception under OSGi. Fixes POOL-338. Thanks to Michael C, Gary Gregory. ggregory
Fix org.apache.commons.pool2.impl.GenericObjectPool.getFactoryType() throws java.lang.ClassCastException. Fixes POOL-324. Thanks to Jay Xu, Gary Gregory. ggregory
Fix Delete repeated call startEvictor. Fixes POOL-344. Thanks to Yulin Wang. ggregory

Release 2.5.0 – 2017-12-16

Type Changes By
Update Update from Java 6 to 7. Fixes POOL-331. ggregory
Drop Ant build. Fixes POOL-330. ggregory
Add ObjectPool and KeyedObject pool should extend Closeable. Fixes POOL-332. ggregory
Update Update optional dependency asm-util from 5.2 to 6.0. Fixes POOL-333. ggregory
Update org.apache.commons.pool2.impl.ThrowableCallStack.Snapshot is missing serialVersionUID. Fixes POOL-334. ggregory
Add Make abandoned logging stack trace requirements configurable. This also reverts the default behavior introduced by POOL-320. Fixes POOL-335. mattsicker
Add Make abandoned logging stack trace requirements configurable. This also reverts the default behavior introduced by POOL-320. Fixes POOL-335. mattsicker

Release 2.4.3 – 2017-10-24

Type Changes By
Fix Documentation with repeated words (sources, tests, and examples). Fixes POOL-328. Thanks to Lorenzo Solano Martinez. ggregory
Fix Correction of default value of softMinEvictableIdleTimeMillis in BaseObjectPoolConfig. Fixes POOL-317. Thanks to KeiichiFujino. ggregory
Fix Fix misspellings from "destory" to "destroy". Fixes POOL-309. Thanks to jolestar, Roopam Patekar. ggregory
Fix Ensure BaseGenericObjectPool.IdentityWrapper#equals() follows the expected contract for equals(). Fixes POOL-306. Thanks to Adrian Crum. markt
Fix Ensure that threads do not block indefinitely if more than maxTotal threads try to borrow an object at the same time and the factory fails to create any objects. Fixes POOL-303. markt
Update Small refactoring of borrowObject() to reduce code duplication. Fixes POOL-280. Thanks to Jacopo Cappellato. markt
Update Replace inefficient use of keySet with entrySet in GKOP. Fixes POOL-307. Thanks to Anthony Whitford. markt
Fix Ensure that threads using GKOP do not block indefinitely if more than maxTotal threads try to borrow objects with different keys at the same time and the factory destroys objects on return. Fixes POOL-310. Thanks to Ivan Iliev. markt
Fix Ensure that any class name used for evictionPolicyClassName represents a class that implements EvictionPolicy. markt
Fix Add a configurable delay (default 10 seconds) to wait when shutting down an Evictor to allow the associated thread time to complete any current evictions and to terminate. Fixes POOL-315. Thanks to KeiichiFujino. markt
Fix Ensure that a call to GKOP preparePool() takes account of other threads that might create objects concurrently, particularly the Evictor. markt
Add Use more efficient stack walking mechanisms for usage tracking when possible. Fixes POOL-320. mattsicker
Update Update optional cglib library from 3.1 to 3.2.5. Fixes POOL-322. ggregory
Update Update optional OW2 ASM from 5.0.4 to 5.2. Fixes POOL-323. ggregory

Release 2.4.2 – 2015-08-01

Type Changes By
Fix Changed default jmxNameBase in BaseObjectPoolConfig to the correct (null) default. Fixes POOL-298. psteitz
Fix Added PrintWriter flush to DefaultPooledObject's printStackTrace method. Fixes POOL-300. psteitz

Release 2.4.1 – 2015-05-30

Type Changes By
Fix Reverted cobertura plugin update that caused binary jar corruption. Fixes POOL-297. psteitz

Release 2.4 – 2015-05-27

Type Changes By
Fix Fixed capacity leak when an object is offered from a GenericKeyedObjectPool while it is being validated by the evictor. Fixes POOL-287. Thanks to Caleb Spare and Thomas Neidhart. psteitz
Fix Eliminated the requirement that objects managed by GenericObjectPool or GenericKeyedObjectPool be discernible by equals. Prior to this fix, equal but distinct object instances could not be stored in the same pool. Fixes POOL-283. psteitz
Fix Eliminated the requirement that object equality and hashcodes do not change while objects are under management by GenericObjectPool or GenericKeyedObjectPool. Fixes POOL-284. psteitz
Fix Fixed class loading for custom EvictionPolicy implementations that may not be present in the class loader hierarchy of the Pool classes by falling back to the class loader of the current class. Fixes POOL-289. Thanks to Luke Winkenbach. markt
Fix Ensured that when an instance that has already been returned to a pool is returned again, the expected IllegalStateException is generated before the returning object is re-validated or re-passivated. Fixes POOL-285. psteitz
Add Added preparePool method to GenericObjectPool. Fixes POOL-286. psteitz
Update Update asm-util from 5.0.3 to 5.0.4. Fixes POOL-296. ggregory
Update Exposed getEvictionPolicy as protected in BaseGenericObjectPool. Fixes POOL-293. psteitz

Release 2.3 – 2014-12-30

Type Changes By
Fix Eliminated possibility that DefaultPoolObject#getIdleTimeMillis() could return a negative value. Use by pool implementations would not hit this bug. Fixes POOL-279. Thanks to Jacopo Cappellato. psteitz
Fix Made wrapped BaseProxyHandler.pooledObject volatile. Fixes POOL-275. psteitz
Fix Replace synchronisation with lock-free maxBorrowWaitTimeMillis to increase scalability. Fixes POOL-277. Thanks to Lucas Pouzac. ecki
Fix Ensure that objects are not validated on borrow when testOnBorrow is set to false, testOnCreate is set to true and the pool is exhausted at the point borrowObject() is called. Fixes POOL-276. markt
Fix Fixed error in GenericKeyedObjectPool constructor causing minEvictableIdleTimeMillis to be used in place of timeBetweenEvictionRunsMillis in eviction timer setup when a GenericKeyedObjectPoolConfig instance is supplied to the constructor. Fixes POOL-270. Thanks to Michael Berman. psteitz
Fix Fix a threading issue that meant that concurrent calls to close() and returnObject() could result in some returned objects not being destroyed. Fixes POOL-263. markt
Add Made fairness configurable for GenericObjectPool, GenericKeyedObjectPool. Fixes POOL-262. psteitz
Fix Correctly mark cglib as an optional dependency and ensure that the OSGi manifest information reflects that. Fixes POOL-261. markt
Fix Improve performance of statistics collection for pools that extend BaseGenericObjectPool. markt
Fix Made client wait time statistics accurate when pools are configured to block indefinitely. Also modified computation to include latency clients experience due to waiting on factory methods. Fixes POOL-259. psteitz
Update Update cglib to 3.1 from 3.0. Fixes POOL-273. ggregory
Update Update asm-util to 5.0.3 from 4.0. Fixes POOL-274. ggregory
Fix Prevent potential memory leaks when the Pool is dereferenced without being closed. markt
Fix Prevent potential memory leaks with using an Evictor in a container environment. markt
Fix Protect against a user provided eviction policy throwing an exception and stopping the Evictor thread. markt
Fix Use the thread context class loader to load custom eviction policies. This allows application provided eviction policies to be used in a container environment when the pooling implementation is provided by the container. markt
Fix Fix a potential infinite loop in the underlying Deque implementation. Fixes POOL-281. markt

Release 2.2 – 2014-02-24

Type Changes By
Fix Ensure that if an attempt is made to return an object multiple times that the current active and idle object counts are not corrupted. Fixes POOL-248. Thanks to Warren Chen. markt
Fix Fix Javadoc issues when building docs with Java 8. Fixes POOL-249. Thanks to Ville Skyttä. markt
Fix Fix the remaining Javadoc warnings. markt
Add Add a new validation configuration option testOnCreate that tests an object immediately after it is created. markt

Release 2.1 – 2013-12-30

Type Changes By
Fix Added missing create counter decrement in GenericKeyedObjectPool create method on factory exception path. Prior to this fix, exceptions thrown by factory makeObject calls could leak per key capacity. Fixes POOL-243. Thanks to Michal Sabo. psteitz
Fix Ensured that blocked threads waiting on a depleted pool get served when objects are destroyed due to validation or passivation failures in returnObject or when a checked out instance is invalidated. Fixes POOL-240. Thanks to Dan McNulty. psteitz
Add Expand the coverage of the unit tests. Fixes POOL-241. Thanks to Bruno P. Kinoshita. markt
Add Provide more control over the names under which Pools are registered in JMX so components using the pools can register the pools they use under a related name. markt
Add Include the number of times an object has been borrowed from the Pool when the DefaultPooledObject wrapper is used and expose this property via JMX. markt
Fix Remove a duplicate null check and fix some typos in PoolUtils. Fixes POOL-245. Thanks to Bruno P. Kinoshita. markt
Fix Make the toString() method of ErodingKeyedObjectPool consistent with the other pools. Fixes POOL-246. Thanks to Bruno P. Kinoshita. markt
Add Further expansion of the coverage of the unit tests. Fixes POOL-245. Thanks to Bruno P. Kinoshita. markt

Release 2.0 – 2013-11-11

Type Changes By
Add Add support for proxy wrappers to ObjectPool and KeyedObjectPool. The primary advantage of these wrappers is that use of pooled objects is prevented after they have been returned to the pool. Fixes POOL-211. Thanks to Brad Koehn. markt
Update Added abandoned object removal (moved from DBCP) to GenericObjectPool. Fixes POOL-229. psteitz
Fix PooledObject.state does not need to be volatile. Fixes POOL-221. markt
Fix Suppress a FindBugs warning. Fixes POOL-220. markt
Update Use an IODH for PoolUtils.MIN_IDLE_TIMER. Fixes POOL-217. Thanks to sebb. markt
Update GenericKeyedObjectPool.ensureMinIdle(K) does not need to check getMinIdlePerKey(). Fixes POOL-216. markt
Fix GenericKeyedObjectPool - multiple mutable fields not published safely. Fixes POOL-215. markt
Fix GenericObjectPool.evictionPolicy not thread-safe. Fixes POOL-214. markt
Fix GenericObjectPool allows maxIdle < minIdle. Fixes POOL-212. markt
Fix GenericKeyedObjectPool.clear() has unnecessary null check of objectDequeue. Fixes POOL-207. markt
Fix Classes Generic[Keyed]ObjectPoolConfig are generic - but why?. Fixes POOL-201. markt
Fix GOP/GKOP don't consistently use getters to access fields. Fixes POOL-200. markt
Fix GOP/GKOP evict() method is not synchronised and is not thread-safe. Fixes POOL-199. markt
Fix PooledObject: risky init of lastBorrowTime & lastReturnTime. Fixes POOL-197. markt
Fix PooledObject.getActiveTimeMillis() does not synch. access to lastReturnTime and lastBorrowTime. Fixes POOL-196. markt
Update Replace synchronized blocks in PoolUtils with Read/Write locks. Fixes POOL-194. simonetripodi
Update Support Java 1.5 Generics. Fixes POOL-83. simonetripodi
Update Developer documentation and examples have to be updated once the 2.0 repackaging has been done. Fixes POOL-186. simonetripodi
Update Switch GOP to use a pooling mechanism based on java.util.concurrent and a LinkedBlockingQueue implementation from Apache Harmony (originally by Doug Lea and the JSR-166 expert group). markt
Update Make deprecated protected attributes private, requiring that access is via the appropriate getters. markt
Update Code clean-up. Add missing @Override annotations, remove unused code, remove deprecated code and unnecessary code. markt
Update Introduce an Enum (WhenExhaustedAction) to control pool behaviour when no more objects are available to allocate. markt
Update Remove WhenExhuastedAction.GROW since it is equivalent to WhenExhuastedAction.FAIL with a maxActive value of Integer.MAX_VALUE. markt
Fix Remove confusing method PoolUtils.ErodingKeyedObjectPool.numIdle(K key). Fixes POOL-188. Thanks to sebb. markt
Update Guard against multiple returns of the same object to the pool and ensure that only objects borrowed from the pool are returned to it. Fixes POOL-155. markt
Fix Ensure GKOP.preparePool() throws an exception if no factory has been defined. Fixes POOL-150. markt
Fix Add the ability to specify a per call wait time when borrowing an object. Fixes POOL-134. markt
Fix Provide a name for the eviction timer thread. Fixes POOL-121. markt
Update Remove setFactory() method from GOP. markt
Fix Reduce duplication in configuration code. Fixes POOL-173. markt
Fix Re-factor common code into common base classes. Fixes POOL-178. markt
Update Expose GOP and GKOP attributes via JMX. Fixes POOL-172. markt
Update Add additional attributes (also accessible via JMX) for monitoring. Fixes POOL-98. markt
Update Change meaning of zero for maxWait to a maximum wait of zero milliseconds rather than the unexpected infinite wait. markt
Fix Allow custom eviction policies to be defined. Fixes POOL-100. markt
Add Add support for proxy wrappers for ObjectPool and KeyedObjectPool. The primary advantage of using these wrappers is that use of pooled objects is prevented after they have been returned to the pool. Fixes POOL-211. Thanks to Brad Koehn. markt

Release 1.6 – 2012-01-07

Type Changes By
Add Support Java 1.5 Generics in version 1.x. Fixes POOL-208. ggregory

Release 1.5.7 – 2011-12-20

Type Changes By
Fix Awaken threads waiting on borrowObject when a pool has been closed and have them throw IllegalStateException. Prior to the fix for this issue, threads waiting in borrowObject when close was invoked on GOP or GKOP would block indefinitely. Fixes POOL-189. Thanks to Bill Speirs. psteitz
Fix Corrected total internal processing counter update in destroy. Prior to the fix for this issue, clear(key) was leaking capacity associated with elements in the pool being cleared. Fixes POOL-192. Thanks to Helge Dannenberg. psteitz

Release 1.5.6 – 2011-04-03

Type Changes By
Fix Correctly handle an InterruptedException when waiting for an object from the pool. Fixes POOL-179. Thanks to Axel Grossmann. markt
Fix Only stop tracking objects for a key when there are no idle objects, no active objects and no objects being processed. Fixes POOL-180. markt
Update Make BaseObjectPool.isClosed() public. Fixes POOL-181. markt
Fix Correct bug that could lead to inappropriate pool starvation when evict() and borrowObject() are called concurrently. Fixes POOL-184. Thanks to Adrian Nistor. markt
Fix Fix performance issues when object destruction has latency. Thanks to psteitz. markt

Release 1.5.5 – 2010-09-10

Type Changes By
Update In preparation for pool 2.0, deprecated direct access to protected fields and setFactory methods. In pool 2.0, pool object factories will be immutable. Fixes POOL-169. psteitz
Fix Made GenericKeyedObjectPool._minIdle volatile. Fixes POOL-158. psteitz
Fix Made the default context class loader for the eviction thread the same loader that loads the library to prevent memory leaks in multiple class loader environments. Fixes POOL-161. markt
Update GenericKeyedObjectPool.destroy could use entrySet() rather than keySet() followed by get(). Fixes POOL-166. sebb
Fix GenericObjectPool and GenericKeyedObjectPool setFactory methods destroy idle instances in the pool by contract. Prior to the fix for this issue, newly set factories were being used to destroy idle instances, rather than the factories used to create them. The setFactory methods have also been deprecated, to be removed in version 2.0. Fixes POOL-157. Thanks to David Hu. psteitz
Update ObjectPool classes can ignore Throwable. Added consistent handling for Throwables that are normally swallowed including always re-throwing certain Throwables (e.g. ThreadDeath). Fixes POOL-156. sebb
Fix When waiting threads are interrupted, GOP, GKOP may leak capacity. Fixes POOL-162. markt
Fix Documentation for the close method in GenericObjectPool and GenericKeyedObjectPool incorrectly states that this method does not clear the pool. Fixes POOL-154. Thanks to Glen Mazza. psteitz

Release 1.5.4 – 2009-11-20

Type Changes By
Fix GenericObjectPool can block forever in borrowObject when the pool is exhausted and a newly created object fails validation. When borrowing an object if a new object is created but validate fails, the latch should not be returned to the queue as an exception will be thrown. Fixes POOL-152. Thanks to Bushov Alexander. markt

Release 1.5.3 – 2009-09-21

Type Changes By
Fix Fix case where a thread could end up waiting indefinitely even if objects were available. Also fixes a couple of leaks in the internal processing object count that could lead to pool exhaustion. Fixes POOL-149. Thanks to Shuyang Zhou. markt

Release 1.5.2 – 2009-07-12

Type Changes By
Fix Handle the case where one key has reached maxActive but other keys have not. Prior to the fix for this issue, threads waiting on objects from keyed pools still having instances available could be blocked by a thread requesting an instance from an exhausted pool. Fixes POOL-146. markt
Fix Fix case where a thread could end up waiting indefinitely even if objects were available. Fixes POOL-147. Thanks to Giambattista Bloisi. markt
Fix Ensure that the GenericKeyedObjectPool idle object evictor does not visit the same instance more than once per eviction run. Fixes POOL-145. markt

Release 1.5.1 – 2009-06-16

Type Changes By
Fix When exhausted action is set to WHEN_EXHAUSTED_BLOCK, maxwait is positive and client threads time out waiting for idle objects, capacity can be "leaked" from GenericObjectPools and GeneritCkeyedObjectPools. Fixes POOL-144. markt

Release 1.5 – 2009-06-10

Type Changes By
Fix StackKeyedObjectPool.getNumActive() needs to be synchronized. Fixes POOL-139. Thanks to Sebastian Bazley. markt
Fix Inconsistent synchronization in GenericObjectPool; constant fields should be final. Fixes POOL-137. Thanks to Sebastian Bazley. markt
Fix GenericObjectPool not FIFO with respect to borrowing threads. Fixes POOL-75. Thanks to Takayuki Kaneko and Gordon Mohr. markt
Fix _numActive > _maxActive under load. Fixes POOL-135. markt
Fix Insufficient control over concurrent access to pooled objects by Evictor, client threads. Fixes POOL-125. markt
Fix Number of connections created has crossed more than maxActive. Fixes POOL-107. markt
Fix java.util.Timer in EvictionTimer does not recover from OutOfMemoryError in Evictor. Fixes POOL-122. markt
Fix Failed object creation may result in invalid active count in GKOP. Fixes POOL-133. markt

Release 1.4 – 2008-01-15

Type Changes By
Fix Fixed constructor which was ignoring maxTotal parameter: GenericKeyedObjectPool(KeyedPoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int maxTotal, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) sandymac
Fix Changed StackKeyedObjectPool to discard stalest, not freshest, idle object when maxSleeping is reached. sandymac
Fix Allowed blocked threads in GenericObjectPool borrowObject to be interrupted. Fixes POOL-102. Thanks to John Sumsion. psteitz
Fix 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
Fix 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
Fix 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
Fix 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
Fix Made _testOnBorrow, _testOnReturn volatile and removed synchronization in associated getters and setters in GenericObjectPool, GenericKeyedObjectPool. Made getNumIdle synchronized in StackKeyedObjectPool. Fixes POOL-113. psteitz
Fix 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
Fix 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.
Update When no factory has been defined, addObject now throws IllegalStateExecption instead of NullPointerException for all pools. sandymac
Update SoftReferenceObjectPool. Improved the accuracy of getNumIdle by "pruning" references to objects that have been garbage collected. sandymac
Update 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
Update 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
Update StackKeyedObjectPool. Added validation check for objects returned from borrowObject. psteitz
Update 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

Release 1.3 – 2006-04-06

Type Changes By
Fix A large number of bug fixes. See release notes for changes.

Release 1.2 – 2004-06-07

Type Changes By
Fix GenericKeyedObjectPoolFactory Config Constructor is incorrect dirkv
Fix Not possible to extend GenericObjectPool.returnObject() without affecting addObject() dirkv

Release 1.1 – 2003-10-20

Type Changes By
Fix A lot of corner cases were fixed
Fix Performance improvement by optimizing pool synchronization, the critical code paths were optimized by reducing pool synchronization but we also added more synchronization where needed
Fix New minIdle feature: the minimum number of objects allowed in the pool before the evictor thread (if active) spawns new objects. (Note no objects are created when: numActive + numIdle >= maxActive)
Fix New maxTotal feature: a cap on the total number of instances controlled by a pool. Only for GenericKeyedObjectPool where maxActive is a cap on the number of active instances from the pool (per key).
Fix UML Class and sequence diagrams
Fix See bugzilla for more changes

Release 1.0.1 – 2002-08-12

Type Changes By
Fix No change log available.

Release 1.0 – 2002-05-04

Type Changes By
Add No change log available.