Hello,
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 :
<mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler,schedule=WSAsyncEJBClient"> <classpath codebase="deploy/WSAsyncEJBClient" archives="WSAsyncEJBClient.jar"/> <attribute name="StartAtStartup">false</attribute> ... </mbean >