I have two different applications which has different spring quartz jobs configured. First application has 2 jobs and second application has 1 job. And I am pointing to same oracle database schema from both applications. Since oracle data source is same, all three job triggers are inserted into QRTZ_CRON_TRIGGERS. But if I start second application, it starts triggering other applications job and failed with issue no class found since application1 job classes are not in second application. Please help if I am doing something wrong here.
First application has following configuration:
<bean id="syncScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="dataSource">
<ref bean="oracleDatasource" />
</property>
<property name="quartzProperties">
<props>
<prop key="org.quartz.scheduler.instanceName">SyncScheduler</prop>
<prop key="org.quartz.jobStore.isClustered">true</prop>
<prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.oracle.OracleDelegate</prop>
<prop key="org.quartz.scheduler.instanceId">AUTO</prop>
<prop key="org.quartz.jobStore.clusterCheckinInterval">60000</prop>
<prop key="org.quartz.jobStore.misfireThreshold">600000</prop>
<prop key="org.quartz.scheduler.idleWaitTime">3000000</prop>
<prop key="org.quartz.jobStore.selectWithLockSQL">SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?</prop>
<prop key="org.quartz.jobStore.tablePrefix">notification</prop>
<!-- <prop key="org.quartz.threadPool.threadCount">3</prop> -->
</props>
</property>
<property name="jobDetails">
<list>
<ref bean="app1Job1" />
<ref bean="app1Job2" />
</list>
</property>
<property name="triggers">
<list>
<ref bean="app1Job1Trigger1" />
<ref bean="app1Job1Trigger2" />
</list>
</property>
</bean>
And Other application has 1 job but this app is also pointing to same oracle data source which is 'oracleDatasource':
<bean id="syncScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="dataSource">
<ref bean="oracleDatasource" />
</property>
<property name="quartzProperties">
<props>
<prop key="org.quartz.scheduler.instanceName">SyncScheduler</prop>
<prop key="org.quartz.jobStore.isClustered">true</prop>
<prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.oracle.OracleDelegate</prop>
<prop key="org.quartz.scheduler.instanceId">AUTO</prop>
<prop key="org.quartz.jobStore.clusterCheckinInterval">60000</prop>
<prop key="org.quartz.jobStore.misfireThreshold">600000</prop>
<prop key="org.quartz.scheduler.idleWaitTime">3000000</prop>
<prop key="org.quartz.jobStore.selectWithLockSQL">SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?</prop>
<prop key="org.quartz.jobStore.tablePrefix">notification</prop>
<!-- <prop key="org.quartz.threadPool.threadCount">3</prop> -->
</props>
</property>
<property name="jobDetails">
<list>
<ref bean="app2Job1" />
</list>
</property>
<property name="triggers">
<list>
<ref bean="app2Job1Trigger1" />
</list>
</property>