1 Reply Latest reply on May 11, 2006 1:54 AM by Ben Wang

    Scheduler Problem in Clustered Environment

    Jinsong Yang Newbie

      Hi -
      I have a scheduler MBean deployed in a two node cluster, and I need to change the schedule properties at runtime. The problem is that when I change the properties (e.g. schedule period), the change is not sync-ed between the two nodes - One of the node is still running the scheduled task using the old values. Is there anything I can do to fix this?

      Code:

      String intervalStr = request.getParameter("interval");
      long interval = Long.parseLong(intervalStr);
      MBeanServer server = MBeanServerLocator.locateJBoss();
      SchedulerMBean scheduler = (SchedulerMBean)MBeanProxyExt.create(SchedulerMBean.class, "jboss.scheduler:service=CDSScheduler", server);

      scheduler.setSchedulePeriod(interval);