Announcement Announcement Module
Collapse
No announcement yet.
Trigger set using SchedulerFactoryBean issue with redeploy Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trigger set using SchedulerFactoryBean issue with redeploy

    Hi Guys,
    I am using spring 2.5.6 and quartz 1.6 to run some job every 3 minutes using SchedularFactoryBean and SimpleTriggerBean and every works fine. Now if i just redeploy my app without restarting the Glassfish server. I see duplicate jobs one referencing the targetObject before redeploy and one with new reference. I see the job with reference to new object instance working fine, but the job with old targetObject reference fails. It seems in the process of redeployment it serializes the job with the targetObject reference and once the app is up it deserializes and runs it. Note: If i restart it works fine i don't see the duplicate job with the old targetObject reference.

    Any idea if something can be done to solve this during redeployment?

    The configuration looks like below

    <bean id="job" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="businessLogic" />
    <property name="targetMethod" value="performCleanUp" />
    <property name="concurrent" value="false" />
    </bean>

    and then injected into the SimpleTriggerBean as jobDetail

    <bean id="jobTrigger" class="org.springframework.scheduling.quartz.Simpl eTriggerBean">
    <property name="jobDetail" ref="job" />
    ....
    </bean>

    <bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="triggers">
    <list>
    <ref bean="jobTrigger" />
    </list>
    </property>
    </bean>

    Thanks in advance.

    Naresh
Working...
X