catch
(Exception e) { // invalidate the object
pool.invalidateObject(obj); // do not return the object to the pool twice
obj = null
; } finally
{ // make sure the object is returned to the pool
if
(null
!= obj) { pool.returnObject(obj); } } } catch
(Exception e) { // failed to borrow an object
} See {@link BaseObjectPool} for a simple base implementation. @param < T> Type of element pooled in this pool. @see PooledObjectFactory @see KeyedObjectPool @see BaseObjectPool @since 2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|