2013-06-12 64 views
1

我们有2个应用程序使用石英进行调度。我们的应用程序的quartz.properties如下:在同一个服务器实例和同一个作业库上的多个Quartz实例

org.quartz.scheduler.instanceName = sr22QuartzScheduler 
org.quartz.scheduler.instanceId = AUTO 
org.quartz.scheduler.skipUpdateCheck = true 

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool 
org.quartz.threadPool.threadCount = 2 
org.quartz.threadPool.threadPriority = 5 

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX 
org.quartz.jobStore.isClustered = true 
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate 
org.quartz.jobStore.useProperties = false 
org.quartz.jobStore.dataSource = quartzDS 
org.quartz.jobStore.tablePrefix = QRTZ_ 
org.quartz.jobStore.clusterCheckinInterval = 20000 
org.quartz.scheduler.idleWaitTime=1000 
#org.quartz.jobStore.acquireTriggersWithinLock=true 
#Adding unusually high misfire threshold as we dont want to handle misfires 
org.quartz.jobStore.misfireThreshold = 50000000 
#org.quartz.jobStore.maxMisfiresToHandleAtATime = 0 

org.quartz.dataSource.quartzDS.jndiURL= java:jdbc/quartzDS 

org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin 
org.quartz.plugin.shutdownhook.cleanShutdown = false 

#org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingTriggerHistoryPlugin 
#org.quartz.plugin.triggHistory.triggerFiredMessage = Trigger \{1\}.\{0\} fired job \{6\}.\{5\} at: \{4, date, HH:mm:ss MM/dd/yyyy} 
#org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger \{1\}.\{0\} completed firing job \{6\}.\{5\} at \{4, date, HH:mm:ss MM/dd/yyyy\} 

其他应用程序具有相同的配置,但具有不同的实例名。

这两个应用程序都将在同一组服务器实例上运行。它们都使用与数据库中的Quartz Job存储相同的一组表。

现在的问题是:

如果这两个应用程序的同时运行时,触发没有正确路由。来自application1的触发器被路由到application2,反之亦然。这是随机发生的。

应用程序应该在同一个数据库中使用不同的quatrz表集合吗?我们应该为每个服务器只有一个石英调度器实例用于多个应用程序?

我看到石英的随机行为。我们的设置有什么问题吗?

顺便说一句,我们正在使用石英1.8。

任何帮助表示赞赏。

谢谢, Sri Harsha Yenuganti。

回答

0

夸脱2.0及以上版本支持此功能。

1
"The other application have the same configuration but with a different instanceName." 

要启用聚类:

  • 使用仅一个SINGLE调度实例名称(但具有不同的实例ID)

  • 点到单个组表

相关问题