0 Replies Latest reply on Apr 27, 2007 11:35 AM by nikolajs1968

    Accessing Scheduler throgh JNDI

    nikolajs1968

      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">


      false
      ...
      </mbean

      I wonder if JNDI name should match mbean name, or something else.

      Thanks,
      Nik