Don't use the scheduleAtFixedRate method in our scheduler as we
don't really have a need for real time task execution, just use
the fixed delay scheduler so that jobs don't stack up.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1174951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-09-23 18:48:19 +00:00
parent 2db7cbf436
commit 1453c53105
1 changed files with 14 additions and 14 deletions

View File

@ -36,12 +36,12 @@ public final class Scheduler extends ServiceSupport {
public void executePeriodically(final Runnable task, long period) {
TimerTask timerTask = new SchedulerTimerTask(task);
timer.scheduleAtFixedRate(timerTask, period, period);
timer.schedule(timerTask, period, period);
timerTasks.put(task, timerTask);
}
/*
* execute on rough schedual based on termination of last execution. There is no
* execute on rough schedule based on termination of last execution. There is no
* compensation (two runs in quick succession) for delays
*/
public synchronized void schedualPeriodically(final Runnable task, long period) {