// suppose that it took the timer runner thread a
// very long time to execute the timers.
// then the repeat action eligibleDate could already have passed.
while (eligibleDate.getTime() <= System.currentTimeMillis()) {
eligibleDate =
businessCalendar.add(eligibleDate, new Duration(repeat));
}
// same for the dueDate which should be after the eligibleDate
while (dueDate.getTime() <= eligibleDate.getTime()) {
dueDate = businessCalendar.add(dueDate, new Duration(repeat));
}
log.finest("updated timer '"+this+"' for repetition in '"+
(eligibleDate.getTime()-System.currentTimeMillis())+"' millis" +
" with due date in " +
(dueDate.getTime()-System.currentTimeMillis())+"' millis");