You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Nader Mirzadeh <n....@bellid.com> on 2009/01/15 13:25:05 UTC
Idle Time
Commons-Pool v1.4: GenericObjectPool/GenericKeyedObjectPoo
The time-stamp is set in GenericKeyedObjectPool.ObjectTimestampPair.tstamp at the creation time of a pooled object, and it is never updated. The idle time is calculated in the evict() method, and that time is always larger than the actual idle time of the object sitting in the pool. Hence, objects are removed from the pool while they are eligible for reuse (according to the configuration). I believe the time-stamp has to be updated whenever an object is returned to the pool.
-nader
Re: Idle Time
Posted by Phil Steitz <ph...@gmail.com>.
Nader Mirzadeh wrote:
> Commons-Pool v1.4: GenericObjectPool/GenericKeyedObjectPoo
> The time-stamp is set in GenericKeyedObjectPool.ObjectTimestampPair.tstamp at the creation time of a pooled object, and it is never updated. The idle time is calculated in the evict() method, and that time is always larger than the actual idle time of the object sitting in the pool. Hence, objects are removed from the pool while they are eligible for reuse (according to the configuration). I believe the time-stamp has to be updated whenever an object is returned to the pool.
>
ObjectITimeStampPairs are immutable by design. Each time an object is
returned to the pool, it gets a new ObjectTimeStampPair wrapper, stamped
with the time that it is added to the pool of idle objects. If you are
seeing incorrect behavior (objects being prematurely timed out), please
open a JIRA ticket here:
http://commons.apache.org/pool/issue-tracking.html
Thanks!
Phil
> -nader
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org