As of Spring 3.0 the ScheduledTimerTask is deprecated and I can\'t understand how to upgrade to org.springframework.scheduling.concurrent.
Use org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean
in place of org.springframework.scheduling.timer.TimerFactoryBean
and use org.springframework.scheduling.concurrent.ScheduledExecutorTask
in place of org.springframework.scheduling.timer.ScheduledTimerTask
. You will need to adjust the property names and values as needed but, that should be pretty self evident.
Optionally, you could refactor your com.example.OnlineTimerTask
to not extend java.util.TimeTask
as the ScheduledTimerTask only requires a runnable.