commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Eamon (JIRA)" <>
Subject [jira] [Commented] (POOL-99) Test for idle time exceeded in borrowObject
Date Mon, 15 Aug 2011 16:23:27 GMT


Rob Eamon commented on POOL-99:

In some cases for object pools, when the object idle time exceeds a threshold is it no longer
a valid/usable object (e.g. a DB connection). Pool clients need to be able to determine if
an object has been idle for more than X seconds so that such objects will not be used (they
are no longer valid and will cause exceptions to be thrown). Either the pool itself should
enforce it via settings or provide the information necessary for the pool client to do it
in testOnBorrow.

> Test  for idle time exceeded in borrowObject
> --------------------------------------------
>                 Key: POOL-99
>                 URL:
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Rob Eamon
>            Priority: Minor
>             Fix For: 2.0
> For GenericObjectPool, the evictor thread performs a calculation to determine if an idle
object as "expired." If it has, the object is destroyed.
> Would like borrowObject to perform the same test and destroy behavior.
> I explored using the testOnBorrow facility but the time that the object went idle is
not available. Only the pool has access to the ObjectTimestampPair object that is used to
record the time that the object was placed in the pool. I explored placing a timestamp in
the pooled object and can do that but it would seem better if the pool managed that test itself.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message