Returns an object to a keyed pool.
For the pool to function correctly, the object instance must have been borrowed from the pool (under the same key) and not yet returned. Repeated returnObject
calls on the same object/key pair (with no borrowObject
calls in between) will result in multiple references to the object in the idle instance pool.
If {@link #getMaxIdle() maxIdle} is set to a positive value and the number of idle instances under the givenkey has reached this value, the returning instance is destroyed.
If {@link #getTestOnReturn() testOnReturn} == true, the returning instance is validated before being returnedto the idle instance pool under the given key. In this case, if validation fails, the instance is destroyed.
@param key pool key @param obj instance to return to the keyed pool @throws Exception
|
|
|
|
|
|