两个实例没有在同一台机器上的Quartz调度程序中进行自动负载平衡

时间:2014-06-30 07:45:11

标签: java quartz-scheduler

虽然具有正确的石英属性(在文档中给出),但群集JobStore中的两个实例不能在同一台机器上工作。

问题似乎是没有发生负载平衡,每次都是选择作业的同一个实例(稍后启动的那个)。

=============================================== =============================

配置主计划程序属性

org.quartz.scheduler.instanceName = MyClusteredScheduler

org.quartz.scheduler.instanceId = instance1

=============================================== =============================

配置ThreadPool

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool

org.quartz.threadPool.threadCount = 25

org.quartz.threadPool.threadPriority = 5

=============================================== =============================

配置JobStore

org.quartz.jobStore.misfireThreshold = 60000

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX

org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate

org.quartz.jobStore.useProperties = false

org.quartz.jobStore.dataSource = mySQLDS

org.quartz.jobStore.tablePrefix = QRTZ _

org.quartz.jobStore.isClustered = true

org.quartz.jobStore.clusterCheckinInterval = 1000

=============================================== =============================

配置数据源

org.quartz.dataSource.mySQLDS.driver = com.mysql.jdbc.Driver

org.quartz.dataSource.mySQLDS.URL = jdbc:mysql:// localhost:3306 / quartz2

org.quartz.dataSource.mySQLDS.user = quartz2

org.quartz.dataSource.mySQLDS.password = quartz2123

org.quartz.dataSource.mySQLDS.maxConnections = 5

org.quartz.dataSource.mySQLDS.validationQuery =从双

中选择0
  
    

另一个实例的实例ID为instance2。

  

0 个答案:

没有答案