Bug 56775 - PoolCleanerTime schedule issue
Summary: PoolCleanerTime schedule issue
Status: NEW
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2014-07-28 06:32 UTC by Joohee Kang
Modified: 2014-07-28 06:32 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Joohee Kang 2014-07-28 06:32:24 UTC
Hi, I'm using tomcat-jdbc-7.0.50.jar instead common-dbcp. 

We expected to check idle connections every "timeBetweenEvictionRunsMillis".
When poolCleaner thread is exeucted first, it seemed to be exeucted on time. 
But after first time, poolCleaner is executed after "timeBetweenEvictionRunsMillis" * 2 times. 

Is it intended? I'm not sure...

I think the reason is because of this code below.  

ConnectionPool.java : 1290 line
poolCleanTimer.scheduleAtFixedRate(cleaner, cleaner.sleepTime,cleaner.sleepTime);

As you see, when you call scheduleAtFixedRate method of Timer class, "period and delay" of poolCleaner timerTask set same value of "sleepTime" that equals "timeBetweenEvictionRunsMillis". So total delay time of Timer is two time of "timeBetweenEvictionRunsMillis". 

Please tell me why you guyz call scheduledAtFixedRate method with these arguments and whether it's a bug or not.