I’ve declared the following bean in my Spring config
<bean id='templateCacheClearingTask' class='org.springframework.scheduling.timer.ScheduledTimerTask'> <property name='delay' value='5000' /> <property name='period' value='5000' /> <property name='timerTask'> <bean class='org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean'> <property name='targetObject' ref='templateMailService' /> <property name='targetMethod' value='clearCache' /> </bean> </property> </bean>
This should cause the clearCache() method of the templateMailService bean to be invoked every 5000ms, but nothing appears to be happening. Am I missing something?
Cheers, Don
I think you need:
In addition to what you already have.