You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Thomas (JIRA)" <ji...@apache.org> on 2011/08/14 21:26:27 UTC
[jira] [Resolved] (POOL-99) Test for idle time exceeded in
borrowObject
[ https://issues.apache.org/jira/browse/POOL-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Thomas resolved POOL-99.
-----------------------------
Resolution: Won't Fix
The idle time feature is based on the assumption that objects are expensive to keep in the pool if there is little chance of them being used. It is normally used to prune back the size of the idle object pool after a temporary usage spike. It is not intended to guarantee that an object has not been idle for more than x seconds.
Given that object creation is also assumed to be expensive (after all that is why a pool is being used) destroying a valid object only to then create another one strikes me as the wrong thing to do.
> Test for idle time exceeded in borrowObject
> --------------------------------------------
>
> Key: POOL-99
> URL: https://issues.apache.org/jira/browse/POOL-99
> 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: http://www.atlassian.com/software/jira