-
Jan 17th, 2006, 01:30 AM
#1
Regarding TimerTask
Hi,
i have a TimerTask extended class. and i want to execute its run method after every 50 second. But it runs only once as i have logged the run method.
Follwing is my xml file code:
<bean id="scheduledTask" class="org.springframework.scheduling.timer.Schedu ledTimerTask">
<!-- wait 10 seconds before starting repeated execution -->
<property name="delay" value="10000"/>
<!-- run every 50 seconds -->
<property name="period" value="5000"/>
<property name="timerTask" ref="contentSendScheduler"/>
</bean>
<bean id="contentSendScheduler" class="com.jmobiles.utilities.ContentSendScheduler ">
<property name="contentSendDAO"><ref bean="contentSendDAO"/></property>
<property name="contentService"><ref bean="contentService"/></property>
<property name="userService"><ref bean="userService"/></property>
</bean>
<bean id="timerFactory" class="org.springframework.scheduling.timer.TimerF actoryBean">
<property name="scheduledTimerTasks">
<list>
<ref bean="scheduledTask"/>
</list>
</property>
</bean>
Can anyone help me?
thanx in Advance 
Regards,
Shahzad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules