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.
@author Rodney Waldhoff @author Sandy McArthur @version $Revision: 962893 $ $Date: 2010-07-10 13:37:27 -0400 (Sat, 10 Jul 2010) $ @see PoolableObjectFactory @see ObjectPoolFactory @see KeyedObjectPool @see BaseObjectPool @since Pool 1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|