Instances returned from this method will have been either newly created with {@link PoolableObjectFactory#makeObject makeObject} or will be a previously idle object andhave been activated with {@link PoolableObjectFactory#activateObject activateObject} andthen validated with {@link PoolableObjectFactory#validateObject validateObject}.
By contract, clients must return the borrowed instance using {@link #returnObject returnObject}, {@link #invalidateObject invalidateObject}, or a related method as defined in an implementation or sub-interface.
The behaviour of this method when the pool has been exhausted is not strictly specified (although it may be specified by implementations). Older versions of this method would return null
to indicate exhaustion, newer versions are encouraged to throw a {@link NoSuchElementException}.
|
|
|
|
|
|