commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Kutzinski" <Christoph.Kutzin...@tipp24.de>
Subject AW: Order of maintenance of pool
Date Thu, 15 Feb 2007 08:50:39 GMT
Sandy McArthur wrote:
> On 2/14/07, Sharma, Siddharth <Siddharth.Sharma@staples.com> wrote:
>> I changed the code to set
>> genericConfig.softMinEvictableIdleTimeMillis=30000;
>> 
>> instead of
>> genericConfig.minEvictableIdleTimeMillis=30000;
>> 
>> But it behaves exactly the same way. It does not maintain the
>> min-idle threshold.
> 
> Hrm, could be a bug. See what happens when you don't use the Config
> object and set that parameter on the GOP instance directly. I think I
> recall squishing a Config bug or two related to it months ago.

Yeah,
really looks like a bug. This is the setConfig-method of GOP (pool 1.3):

public synchronized void setConfig(GenericObjectPool.Config conf) {
        setMaxIdle(conf.maxIdle);
        setMinIdle(conf.minIdle);
        setMaxActive(conf.maxActive);
        setMaxWait(conf.maxWait);
        setWhenExhaustedAction(conf.whenExhaustedAction);
        setTestOnBorrow(conf.testOnBorrow);
        setTestOnReturn(conf.testOnReturn);
        setTestWhileIdle(conf.testWhileIdle);
        setNumTestsPerEvictionRun(conf.numTestsPerEvictionRun);
        setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis);
        setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis);
        notifyAll();
    }

No setSoftMinEvictableIdleTimeMillis in it.

Good that I saw this thread, I'm currently switching to use softMinEvictableIdleTimeMillis,
too. And I would probably have needed some time to spot this bug. ;-)

Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message