2011-08-20 97 views
0

如何创建quartz.properties文件,以便已声明具有给定属性的调度程序编号并使用StdSchedulerFactory getScheduler("schedulername")方法访问它们?带配置调度程序的石英

org.quartz.scheduler.instanceName = MyScheduler1 
org.quartz.threadPool.threadCount = 3 
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore 

org.quartz.scheduler.instanceName = MyScheduler2 
org.quartz.threadPool.threadCount = 1 
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore 
+0

每个调度器工厂都需要一个conf文件并且总是返回相同的调度器,所以我必须用新的配置创建新的工厂并获取调度器。 – ayengin

回答

1

不,每个调度程序都需要它自己的配置属性。

+0

每个调度程序工厂都需要它的配置文件,一个调度程序工厂总是返回相同的调度程序。我正确的。 – ayengin

+0

是的。并且两个(或更多)调度程序工厂被赋予了相同的属性(或者至少定义了具有相同名称的调度程序的属性)将始终返回相同的调度程序。 – jhouse