// and scheduling the timer task
for (final TimerImpl activeTimer : restorableTimers) {
if (activeTimer.isAutoTimer()) {
boolean found = false;
final CalendarTimerEntity entity = (CalendarTimerEntity) activeTimer.getPersistentState();
//so we know we have an auto timer. We need to try and match it up with the auto timers.
ListIterator<ScheduleTimer> it = newAutoTimers.listIterator();
while (it.hasNext()) {
ScheduleTimer timer = it.next();
final String methodName = timer.getMethod().getName();
final String[] params = new String[timer.getMethod().getParameterTypes().length];
for (int i = 0; i < timer.getMethod().getParameterTypes().length; ++i) {
params[i] = timer.getMethod().getParameterTypes()[i].getName();
}
if (doesTimeoutMethodMatch(entity.getTimeoutMethod(), methodName, params)) {
//the timers have the same method.
//now lets make sure the schedule is the same
if (this.doesScheduleMatch(entity.getScheduleExpression(), timer.getScheduleExpression())) {
it.remove();
found = true;
break;
}
}