2 Replies Latest reply on Feb 19, 2002 11:26 PM by Hiram Chirino

    Scheduler in run-time

    David Skarka Newbie

      Hello,

      I constructed scheduler class like as
      Scheduler mSch= new Scheduler(....) object in my app.
      I tried mSch.start(), but failed.
      I tried mSch.startSchedule(), but failed.

      Any suggestion?

      Thanks.

        • 1. Re: Scheduler in run-time
          Pawel Jachowicz Newbie

          Hi,

          I have a similar dilemma. I implemented the following to try to start a certain schedule during runtime:

          Scheduler newScheduler = new Scheduler(
          "server=Scheduler",
          "org.jboss.util.Scheduler$SchedulableExample",
          "Run-time test,2002",
          "java.lang.String,int",
          0,
          5000,
          20);
          try{
          newScheduler.start();
          } catch (Exception e){
          e.printStackTrace();
          }

          and fiddled around with the first parameter by trying out "service=Scheduler" as well as preceding this with a ":" among a multitude of other combinations. I always get the following error:

          JBoss Scheduler Service 'scheduler:server=Scheduler' bound to scheduler:server=Scheduler

          java.lang.NullPointerException:

          at org.jboss.util.Scheduler.startService(Scheduler.java:607)

          at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)

          From the above, I reckon that the MBean server is unknown, however JBoss 2.4.4 is running and the time service, as well as other services have been started. Should the jboss.jcml file start the scheduler service, regardless of whether I am trying to do this during run-time?

          Any comments would be greatly appreciated.

          Pawel

          • 2. Re: Scheduler in run-time
            Hiram Chirino Expert

            Your post is off topic, please move to anoother forum.
            This forum is for JMS and JBossMQ topics.