Return an instance to the pool. By contract, <code>obj</code>
<strong>must</strong> have been obtained using
{@link #borrowObject borrowObject} or a related method as defined in an
implementation or sub-interface using a <code>key</code> that is
equivalent to the one used to borrow the instance in the first place.
@param key the key used to obtain the object
@param obj a {@link #borrowObject borrowed} instance to be returned.
@throws IllegalStateException
if an attempt is made to return an object to the pool that
is in any state other than allocated (i.e. borrowed).
Attempting to return an object more than once or attempting
to return an object that was never borrowed from the pool
will trigger this exception.
@throws Exception if an instance cannot be returned to the pool
Return an instance to the pool. By contract, <code>obj</code> <strong>must</strong> have been obtained using {@link #borrowObject borrowObject} or a related method as defined in an implementation or sub-interface using a <code>key</code> that is equivalent to the one used to borrow the instance in the first place.
@param key the key used to obtain the object @param obj a {@link #borrowObject borrowed} instance to be returned.
@throws IllegalStateException if an attempt is made to return an object to the pool that is in any state other than allocated (i.e. borrowed). Attempting to return an object more than once or attempting to return an object that was never borrowed from the pool will trigger this exception.
@throws Exception if an instance cannot be returned to the pool