2 Replies Latest reply on Aug 2, 2007 6:02 AM by v ck

    jboss scheduler

    v ck Newbie


      am using jboss scheduler to schedule an mbean.
      the method am trying to schedule uses another mbean method(@depends)
      but when this method is sceduled, the second mbean method throws a null pointer.

      here s the scenario

      @LocalBinding(jndiBinding = "xx/yy/local")
      @RemoteBinding(jndiBinding = "xx/yy/remote")
      @Service(objectName = "xx:service=yy")
      @Depends( { "aa:service=Environment" })
      public class MyClass implements Schedulable {

      private Environment e;

      public mySchedulableMethod() {
      //calls method on Environment
      e.something(); //this throws null pointer


      any ideas??

        • 1. Re: jboss scheduler
          v ck Newbie

          sorry , My bad!
          my xml configuration in jboss-service.xml was incorrect.

          MM/dd/yyyy kk:mm:ss
          08/01/2007 23:59:00

          I had used attribute "SchedulableClass" instead of SchedulableBean.

          silly me!

          • 2. Re: jboss scheduler
            v ck Newbie

            oops, it doesnt dissplay the xml snippet properly...here goes again

            mbean code="org.jboss.varia.scheduler.Scheduler"
            attribute name="StartAtStartup">false</attribute
            attribute name="SchedulableMBean">xx:service=yy</attribute
            attribute name="SchedulableMBeanMethod">mySchedulableMethod()</attribute
            attribute name="DateFormat">MM/dd/yyyy kk:mm:ss</attribute
            attribute name="InitialStartDate">08/01/2007 23:59:00</attribute
            attribute name="SchedulePeriod">10000</attribute
            attribute name="InitialRepetitions">1</attribute