2 Replies Latest reply on Nov 8, 2013 4:03 AM by yasserameen

    Is Quartz already cluster aware?

    a.novarini

      Hello all,

       

      I had a quick search on the forum, so apologize if I didn't see a similar topic about it.

       

      I'm working on an application deployed on JBoss 5.1, and developers now need to move it in a cluster environment.

      One of the issues they're facing is the scheduling, because the scheduled ejbs have to be clustered but they must share the same scheduler, so that the ejbs are triggered only on one node and not on every node.

       

      I was told quartz is already configured to work in a cluster, and that the only thing I have to do is to configure the DefaultDS to point to an external db instead of the local hsqldb.

       

      My concern is - before picking the wrong road - that as JBoss starts, with the 'all' configuration set, in the log I see the following lines:

       

      [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
      17:33:40,715 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
      17:33:40,716 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.

       

      This worries me because, unless the cluster configuration overwrites quartz configuration after it prints these lines, quartz seems rely on the quartz.properties.

       

      Is this a real concern or this is exactly the reality and I have to configure the scheduler as written?

       

      Thanks in advance

      Ale

        • 1. Re: Is Quartz already cluster aware?
          a.novarini

          This is what I got since having asked the question:

           

          The clustered service is the jboss.ejb:service=EJBTimerService, which relies on the Quartz scheduler; so basically you have to check for the Timer Service, the one that is clustered.

           

          The Quartz scheduler doesn't need to be configured at all, if not for other specific use cases that I haven't met yet.

          For solving the problem I explained, we simply configured the scheduled bean to depend to the HASingletonDeployer service, type Barrier, so that our bean is deployed as singleton on just one node at a time.

           

          http://community.jboss.org/message/574077

           

          Thanks

          Ale

          • 2. Re: Is Quartz already cluster aware?
            yasserameen

            Hi Alessandro,

             

            I have the same issue and the same concerns :

             

            17:33:40,716 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.



            Did you fix that?


            Thanks,

            Yasser Ameen