|Summary:||PoolCleanerTime schedule issue|
|Product:||Tomcat Modules||Reporter:||Joohee Kang <neigie>|
|Component:||jdbc-pool||Assignee:||Tomcat Developers Mailing List <dev>|
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.