I am facing some problem while running multiple notification tasks.
Here is the brief about the problem :
I am having two XML files for notification one will call notification1 and another will call the notification2,notification1 is invoked after 20 sec and notification2 is invoked after every 10 sec, at every 10 sec interval the notification2 is invoked properly but during the 20 sec interval it is invoked twice and notification1 is not invoked.
Is there anything wrong I am doing in my XML ?
Note: 1. Can anyone give idea about the Bean Overriding.
2. I am writting both the XML file in the SpringContext
3. Both the Notification1 and Notification2 extends same abstract class
XML1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN/EN" "http://www.springframework.org/dtd/spring-beans.dtd" >
<beans default-autowire="byName">
<bean id="quartzScheduler"
class="org.springframework.scheduling.quartz.Sched ulerFactoryBean" lazy-init="default" autowire="default" dependency-check="default">
<property name="schedulerName">
<value>notification1.quartzScheduler</value>
</property>
<property name="triggers">
<list />
</property>
</bean>
<bean id="job1" init-method="start"
class="demo.Notification1" lazy-init="default" autowire="default" dependency-check="default">
<property name="cronExpression">
<!-- run the refresh every ten sec -->
<value>0/10 * * * * ?</value>
</property>
<property name="jobDetail">
<bean
class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
<property name="targetObject"
ref="job1" />
<property name="targetMethod" value="executeOnSchedule" />
<property name="concurrent" value="false" />
</bean>
</property>
</bean>
</beans>
XML2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN/EN" "http://www.springframework.org/dtd/spring-beans.dtd" >
<beans default-autowire="byName">
<bean id="quartzScheduler"
class="org.springframework.scheduling.quartz.Sched ulerFactoryBean" lazy-init="default" autowire="default" dependency-check="default">
<property name="schedulerName">
<value>notification2.quartzScheduler</value>
</property>
<property name="triggers">
<list />
</property>
</bean>
<bean id="job2" init-method="start"
class="demo.Notification2" lazy-init="default" autowire="default" dependency-check="default">
<property name="cronExpression">
<!-- run the refresh every twenty sec -->
<value>0/20 * * * * ?</value>
</property>
<property name="jobDetail">
<bean
class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
<property name="targetObject"
ref="job1" />
<property name="targetMethod" value="executeOnSchedule" />
<property name="concurrent" value="false" />
</bean>
</property>
</bean>
</beans>
Thanks for your valuable time.
Regards,
Ranjan

