I have seen there are some similar questions; but most of them have duplicated bean that causes this issue. Despite that there is no configuration duplication in my application context definition, my scheduled timer is also executed twice.
Here is my definition in applicationContext.xml
. Just enabled annotation driven tasks.
<task:annotation-driven />
And here is my timer service:
@Component
public class SessionTimer {
@Scheduled(fixedDelay = 30000)
public void killSession() {
// business processes
logger.debug("Current time: " + RIAUtil.sdfTimestampWithSeconds.format(now));
}
}
Any ideas behind this issue?