https://issues.apache.org/bugzilla/show_bug.cgi?id=56775

            Bug ID: 56775
           Summary: PoolCleanerTime schedule issue
           Product: Tomcat Modules
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
          Assignee: dev@tomcat.apache.org
          Reporter: nei...@gmail.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to