0 Replies Latest reply on May 21, 2007 10:49 AM by Michael Ruflin

    EJB3 + registering Quartz jobs without using quartz-ra.rar

    Michael Ruflin Newbie


      I'm trying to get an application using quartz running in a clustered environment. The actual jobs call a method of EJB3 objects.

      I first went the way using the ResourceAdapter "quartz-ra", but can't bring quartz to work correctly in a clustered environment. In my case quartz should only run on a single node. Having tried deploy-hasingleton without success, the best way I see to use quartz on a single node only would be following:

      1. Use RAMJobStore. This avoids any problems regarding correctly set clocks and would simplify the configuration. Short out-times in case of a server error are acceptable

      2. deploy quartz as a jboss-service and add


      to the jboss-service.xml file. This will deploy quartz on all nodes, but the scheduler is started on only one of them.

      3. Register the jobs on all nodes. As quartz is deployed everywhere I won't have the problem of not found resources.

      The advantage of this way would be

      1) no jdbc for registering jobs, thus easier setup
      2) application could be deployed in "farm/", redeployment of all nodes would therefore be automatic.

      I have two questions regarding this way though:

      1) how can I register the jobs now? EJB+PostConstruct (ugly)? Does quartz provide something for such a case?
      2) did I completely misunderstand something and is what I try to do just plain wrong?