// minutes to seconds, then seconds to miliseconds...
Integer interval = new Integer(userInterval * 60 * 1000);
// make sure this job isn't already scheduled for some unknown reason...
// .. by "make sure", I mean blindly cancel the job registered for this user.
Timer currentTimer = siteInfo.getUserTimer(individualId);
if (currentTimer != null) {
currentTimer.cancel();
}
TimerTask currentTask = siteInfo.getUserTask(individualId);
if (currentTask != null) {
currentTask.cancel();
}
Timer newTimer = new Timer(true);
TimerTask userEmailCheck = new UserEmailCheck(individualId, session, dataSource, host);
newTimer.schedule(userEmailCheck, 300000L, interval.longValue());
siteInfo.setUserTimer(individualId, newTimer, userEmailCheck);
}
// code added for concurrent user maintinance
session.setAttribute(SessionAlive.IS_ALIVE, new SessionAlive());