Hello,
I have followed the ha-singleton-service quickstart, and it works nicely.
However, I do have a "housekeeping job" bean method with, like,
@Schedule(hour = "*", minute = "*/10", second = "0", persistent = false)
that I want to run on one cluster node only, i.e. as/in a HA Singleton.
Now when I move the annotated method to the "SingletonService" class,
(i.e. the org.jboss.msc.Service class registered in the ServiceActivator)
the schedule is never picked up, and the method never runs.
When I leave the method on my @Singleton bean service class, it is scheduled on all cluster nodes.
What would be the right approach here?
Can I "stop" the @Singleton EJB on the passive nodes? Or start inactive and only activate on the active node?
Can I use @Schedule at all in such an environment?
Or do I have to resort to manually registering an Executor like the QueryingService does, not using TimerService and/or Schedule annotation?
Thanks Cheers Tom.