[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Constraint about the shared set of tables between multiple distinct schedulers  XML
Forum Index -> Quartz
Author Message
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.
[Email] [MSN]
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
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.
[Email] [MSN]
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.
[Email] [MSN]
light5

ophanim
[Avatar]
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
[WWW]
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team