3 Replies Latest reply on Sep 13, 2011 12:28 PM by gilby

    Quartz Job MDBs

    gilby

      I'm migrating an app from JBoss AS 5 to AS 7.  The app defines quite a few Quartz jobs as Message Driven Beans that utilize the

      quartz-ra.rar resource adapter.  After discovering that Quartz is no longer bundled in AS 7, I set out to deploy the quartz-ra.rar that we had been using in 5.1.  Although I was able to, JBoss 7.0.1.Final still failed to create the Quartz MDBs:

       

      Caused by: java.lang.NullPointerException

                at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:83)

                at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:78)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

       

      Is there a way to get these Quartz MDBs to work in 7.0.1.Final?  If not, are there plans to support them in the future, or will this Quartz functionality be replaced by the upcoming EJB Timer impl (https://issues.jboss.org/browse/AS7-474)?

       

      I suppose in the mean time, I can change the MDBs to plain-old Quartz Job impls and kick them off with a startup bean (see http://stackoverflow.com/questions/6740924/how-to-enable-quartz-scheduling-in-jboss-as-7-0)...

        • 1. Re: Quartz Job MDBs
          gonne

          Hi Allen,

           

          I would suggest to change the MDBs to singletons (EJB3.1) and use the EJB3.1 Timer Service of JEE6. The migration should be quite simple if you do not rely too much on quartz.

          Have a look at http://blogs.oracle.com/arungupta/entry/totd_146_understanding_the_ejb

           

          Regards,

          Gonne

          1 of 1 people found this helpful
          • 2. Re: Quartz Job MDBs
            jaikiran

            Allen Gilbert wrote:

             

            I'm migrating an app from JBoss AS 5 to AS 7.  The app defines quite a few Quartz jobs as Message Driven Beans that utilize the

            quartz-ra.rar resource adapter.  After discovering that Quartz is no longer bundled in AS 7, I set out to deploy the quartz-ra.rar that we had been using in 5.1.  Although I was able to, JBoss 7.0.1.Final still failed to create the Quartz MDBs:

             

            Caused by: java.lang.NullPointerException

                      at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:83)

                      at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:78)

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

             

            If that NPE is reproducible against latest nightly build, can you please file a JIRA?

             

             

            Allen Gilbert wrote:

             

            If not, are there plans to support them in the future, or will this Quartz functionality be replaced by the upcoming EJB Timer impl

            TimerService is already available in 7.0.1. So you should be able to use that. We don't have plans for Quartz integration, as far as I know.

            • 3. Re: Quartz Job MDBs
              gilby

              Jaikiran,

               

              Thanks for the info.  I was able to get a timer to work via @Schedule.  However, I am curious: how does JBoss 7's implementation of the Timer Service work in a clustered environment?  It seems that in other containers, persistent timers are only executed on one server in a cluster (which is what we want).  I haven't found anything in the EJB 3.1 spec that discusses this yet, but I'll keep looking...

               

              -Allen