2 Replies Latest reply on Jun 7, 2003 12:55 PM by ivelin.ivanov

    re: Clustered Scheduler

    ivelin.ivanov

      Hello Ivelin, (see surther for you Adrian ;) )

      > I checked in the files. Please verify whether I did it correctly.

      Yes, that seems to be fine, thank you.

      > I was wondering if you would consider opening a new task for
      > enabling scheduler providers to run as singletons. It is a
      > problem that I had bumped into multiple times. Regular db

      yes

      > clean up, regular customer notifications and so on, which are
      > recurring tasks that have to run exactly once in the scope of
      > the application. One common solution is to use a scheduler
      > that runs on only one node in the cluster.

      sure

      > I was thinking something along these lines:
      >
      > Modify AbstractScheduleProvider to extend HASingletonSupport
      > instead of ServiceMBeanSupport. Then move the code from
      > startService/stopService to startSingleton/stopSingleton ...
      > and that should be it, I hope.

      Yes, that seems to be ok for a first implementation. I put Adrian in copy
      as, if I remember some discussions we had about a clustered scheduler
      service and I think that JMS events are numbered in sequence, right? So we
      have a way not to miss one of them if a node dies. More info Adrian?

      Ivelin, can you move this discussion to the clustering forums?
      (cut-and-paste your e-mail so everyone can follow)

      Cheers,


      Sacha

      > Later on we may discuss load balancing of the tasks across
      > the cluster nodes.
      >
      > -=Ivelin=-

        • 1. Re: re: Clustered Scheduler
          ivelin.ivanov

          I have implemented and tested the proposed changes. Please see the patch file attached to this message.

          • 2. Re: re: Clustered Scheduler
            ivelin.ivanov

            Just checked in code in the JBoss_3_2 branch that makes the Schedule Providers cluster aware.
            If run within a cluster, all providers with the same mbean name and same partition will coordinate among themselves and make sure that only one of them schedules.

            As an effect if you have a schedule provider build for a standalone server and you drop it in a clustered environment, it will continue to work the same way as before. It will be deployed on each node, but only one node will provide schedule to its local manager.

            There are two mbean attributes: HASingleton (boolean) and PartitionName (string) which can change the default behaviour.