Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Operating System: All
Platform: All
-
38660
Description
Attached are the pool 2.0 changes I'd like to see to the ObjectPool and the
KeyedObjectPool interfaces for the borrowObject method. The noteworthy changes are:
Added: "Instances returned from this method will have been either newly created
with PoolableObjectFactory.makeObject or will be a previously idle object and
have been activated with PoolableObjectFactory.activateObject and then validated
with PoolableObjectFactory.validateObject."
Added: That borrowed objects can be returned to the invalidateObject method too.
Added: That client code should expect a NoSuchElementException for when the pool
has been exhaused and older versions of pool have been know to return null.