Announcement Announcement Module
Collapse
No announcement yet.
Regarding TimerTask Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
Working...
X