3 Replies Latest reply on Aug 10, 2007 12:18 PM by alrubinger

    Quartz Configuration not read from Properties in quartz-serv

    alrubinger

      So this isn't straight EJB3, but because of the close ties between this project and the Quartz RA Adaptor, etc, thought someone could shed some light.

      I'm deploying a quartz-service.xml to create MBean org.quartz.ee.jmx.jboss.QuartzService, and this contains the following section:

      <!--
      Initialized the SchedulerFactory with the contents
      of the given Properties object.
      -->
      <attribute name="Properties">
      # Default Properties file for use by StdSchedulerFactory
      # to create a Quartz Scheduler Instance, if a different
      # properties file is not explicitly specified.
      #
      
       org.quartz.scheduler.instanceName = DefaultQuartzScheduler
       org.quartz.scheduler.rmi.export = false
       org.quartz.scheduler.rmi.proxy = false
       org.quartz.scheduler.xaTransacted = false
      
       org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
       org.quartz.threadPool.threadCount = 5
       org.quartz.threadPool.threadPriority = 4
      
      ...ETC
      
      </attribute>


      ..but a simple ThreadDump shows that 10 Threads are created as opposed to the specified 5. I've got a lot of jobs and require 50 Threads, but these properties seem to be ignored.

      A quick glance at the source for the MBean doesn't show any parsing of the XML for these properties:

      http://fisheye5.cenqua.com/browse/~raw,r=1.9/quartz/src/jboss/org/quartz/ee/jmx/jboss/QuartzService.java

      ...anyone know how I can configure Quartz using the *-service.xml file?

      Using JBoss 4.0.5-GA w/ EJB3 RC9 Patch 1.

      Thanks in advance.

      S,
      ALR

        • 1. Re: Quartz Configuration not read from Properties in quartz-
          alrubinger

          Ah, some additional logging reveals this:

          2007-08-09 03:00:45,619 INFO [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
          2007-08-09 03:00:45,619 INFO [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 1.5.2


          ...so, more succinctly - how can I override this default properties file in the JAR with the Properties specified in the quartz-service.xml file?

          S,
          ALR

          • 2. Re: Quartz Configuration not read from Properties in quartz-
            jc7442

            You can change the property file by setting the system property "org.quartz.properties".

            If add this prop in run.bat it should works (not try) but that's ugly.

            I don't know hawo to change that in xml.

            • 3. Re: Quartz Configuration not read from Properties in quartz-
              alrubinger

              Actually, that's less ugly than my current temporary solution of having altered the "quartz.properties" file in the Quartz JAR, re-JARring it. I'll most likely edit run.conf (instead of run.bat, thanks for the suggestion) to add the property to the java runtime.

              Will have to look into a more updated version of the MBean (in TRUNK) and see what's involved in getting those properties loaded from the *-service.xml file will file a JIRA and try for a fix if its not already in place.

              S,
              ALR