|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.quartz.examples.example13.ClusterExample
public class ClusterExample
Used to test/show the clustering features of JDBCJobStore (JobStoreTX or JobStoreCMT).
All instances MUST use a different properties file, because their instance Ids must be different, however all other properties should be the same.
If you want it to clear out existing jobs & triggers, pass a command-line argument called "clearJobs".
You should probably start with a "fresh" set of tables (assuming you may have some data lingering in it from other tests), since mixing data from a non-clustered setup with a clustered one can be bad.
Try killing one of the cluster instances while they are running, and see that the remaining instance(s) recover the in-progress jobs. Note that detection of the failure may take up to 15 or so seconds with the default settings.
Also try running it with/without the shutdown-hook plugin registered with the scheduler. (org.quartz.plugins.management.ShutdownHookPlugin).
Note: Never run clustering on separate machines, unless their clocks are synchronized using some form of time-sync service (daemon).
DumbRecoveryJob
Constructor Summary | |
---|---|
ClusterExample()
|
Method Summary | |
---|---|
void |
cleanUp(Scheduler inScheduler)
|
static void |
main(String[] args)
|
void |
run(boolean inClearJobs,
boolean inScheduleJobs)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusterExample()
Method Detail |
---|
public void cleanUp(Scheduler inScheduler) throws Exception
Exception
public void run(boolean inClearJobs, boolean inScheduleJobs) throws Exception
Exception
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |