| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/06/2012 00:49:19
|
wangyin
neo
Joined: 07/06/2012 00:42:06
Messages: 9
Location: BeiJing China
Offline
|
since 2.x, quartz has a new feature that support multiple distinct scheduler instances share one set of tables,this is what I look for.
If I apply the feature should I specify name for every scheduler instead of automatic generation?
Thanks for any reply.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/19/2012 04:46:29
|
gyan10
ophanim
Joined: 06/28/2011 23:15:25
Messages: 697
Offline
|
you can create as many schedulers as you like within any application, but they must have unique scheduler names (typically defined in the quartz.properties file). This means that you'll need to have multiple properties files, which means that you'll need to specify them as you initialize the StdSchedulerFactory (as it only defaults to finding "quartz.properties").
|
Gyan Awasthi
Terracotta -A Software AG company |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/19/2012 06:59:32
|
wangyin
neo
Joined: 07/06/2012 00:42:06
Messages: 9
Location: BeiJing China
Offline
|
if so I guess we will lose the ability of failover and load balance?because every scheduler only fires its own trigger.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/22/2012 07:09:08
|
wangyin
neo
Joined: 07/06/2012 00:42:06
Messages: 9
Location: BeiJing China
Offline
|
After reading source code,I'm clear about the mechanism about sharing the same set of tables with multiple schedulers.
The key point is the scheduler name, Instance name in file quartz.properties,schedulers with the same name will scan and fire their own triggers.
So what I guess above is not correct, schedulers with the same name have the ability of failover and load balance.
By the way, it seems that InstanceName is useless in quartz 1.x while InstanceId is important when clustering.
Scheduler name,InstanceName and InstanceId always make users confused.
I hope someone could confirm my presumption above.
Thanks.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/25/2012 08:50:59
|
light5
ophanim
Joined: 01/14/2011 20:32:56
Messages: 513
Offline
|
wangyin, your last presumption is mostly correct.
I don't think it's that confusing. You may think of scheduler name= instanceName, and they are unique per one cluster (a logical scheduler), while scheduler instanceId is unique per each scheduler node in a cluster. Think parent to children relationship might help little bit.
All of these are clearly documented in the quartz reference, and one should able to configure this without even reading the code.
|
Zemian Deng
---------------
Looking for a web UI to manage Quartz?
Try http://code.google.com/p/myschedule |
|
|
 |
|
|