I am choosing curently between TimerService and JBoss Schedulers for running repeated requests with given timeout...
I tried to use JBoss Scheduler with "StartAtStartup" = true, generally haven't found any issues, worked Ok.
The question is - can I start and stop the Scheduler programmatically ? I.e. there is a EJB which I would like to start and stop Scheduler. I assume the start() and stop() methods in org.jboss.varia.scheduler.Scheduler are doing exactly this.
The trouble is, I cannot understand how to access the Scheduler service from my EJB . I need to pass JNDI name to InitialContext, right >
new InitialContext(). lookup( some name here );
the snippet from jboss-service.xml is :
I wonder if JNDI name should match mbean name, or something else.