Spring 集群石英2.x作业+;春季4.1
我已将spring与quartz集成,下面是我使用的配置:Spring 集群石英2.x作业+;春季4.1,spring,quartz-scheduler,Spring,Quartz Scheduler,我已将spring与quartz集成,下面是我使用的配置: <bean id="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="dataSource"> <ref bean="jndiDataSource"/> </property>
<bean id="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="dataSource">
<ref bean="jndiDataSource"/>
</property>
<property name="applicationContextSchedulerContextKey">
<value>applicationContext</value>
</property>
<property name="schedulerName" value="PimsJobs"/>
<property name="quartzProperties">
<props>
<prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.StdJDBCDelegate</prop>
<prop key="org.quartz.jobStore.isClustered">true</prop>
</props>
</property>
</bean>
我还看到以下日志:
36:31,747 INFO [org.springframework.scheduling.quartz.SchedulerFactoryBean] (ServerService Thread Pool -- 108) Starting Quartz Scheduler now
36:31,765 INFO [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 108) ClusterManager: detected 1 failed or resta
d instances.
36:31,766 INFO [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 108) ClusterManager: Scanning for instance "NON
USTERED"'s failed in-progress jobs.
离题但也相关:您知道不应该在单独的机器上使用Quartz群集,除非它们的时钟是同步的吗?是的,我知道@RicardoVila..谢谢提醒。我还面临一个与quartz scheduler相关的问题,其中部署在集群中的实例会引发类似的错误。
36:31,747 INFO [org.springframework.scheduling.quartz.SchedulerFactoryBean] (ServerService Thread Pool -- 108) Starting Quartz Scheduler now
36:31,765 INFO [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 108) ClusterManager: detected 1 failed or resta
d instances.
36:31,766 INFO [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 108) ClusterManager: Scanning for instance "NON
USTERED"'s failed in-progress jobs.