Hi
this doubt may sound dumb, but if I have an EJB with a scheduled task like
@Schedule(dayOfWeek = "*")
public void runMeDaily() {...}
and if I am in a clustered environment, is there any way to make this job
run in only one of the instances? (only once)
of course, I can set a flag somewhere and check it before the execution of
such task, so only the first cluster instance would run it, but I am
curious if it's possible using some configuration magic.
another doubt is: if I have 2 clustered tomee instances, how do I make both
point to the same scheduler? By scheduler I mean something like
Scheduler scheduler = new StdSchedulerFactory().getScheduler("myScheduler");
My feeling is that my cluster will need a centralized quartz scheduler
service somehow, so if there's some way to do that using tomee, it would be
useful for me.
TIA
Leo