Configuration

Role Configuration

First you have to instantiate the Quartz service.

<role
  name="org.apache.fulcrum.quartz.QuartzScheduler"
  shorthand="quartz"
  default-class="org.apache.fulcrum.quartz.impl.QuartzSchedulerImpl"
/>
      

Component Configuration

Item Datatype Cardinality Description
configuration Complex [0|1] Contains the Quartz configuration either as property file or a set of properties.
configuration/propertyFile String [0|1] Contains the location of a Quartz configuration file. The configuration is loaded from the file system or from the classpath.
configuration/properties Complex [0|1] Contains a list of properties used for configuring Quartz
configuration/properties/parameter String Simple Contains a single configuration parameter consisting of 'name' and 'value' attribute.

Component Configuration Example 1

A simple component configuration based on the XML configuration file

<quartz>
  <configuration>
    <properties>
      <parameter 
        name="org.quartz.scheduler.instanceName" 
        value="TestScheduler"
      />
      <parameter 
        name="org.quartz.scheduler.instanceId" 
        value="AUTO"
      />
      <parameter 
        name="org.quartz.threadPool.class" 
        value="org.quartz.simpl.SimpleThreadPool"
      />
      <parameter 
        name="org.quartz.threadPool.threadCount" 
        value="3"
      />
      <parameter 
        name="org.quartz.threadPool.threadPriority" 
        value="5"
      />
      <parameter 
        name="org.quartz.jobStore.misfireThreshold" 
        value="60000"
      />
      <parameter 
        name="org.quartz.jobStore.class" 
        value="org.quartz.simpl.RAMJobStore"
      />
      <parameter 
        name="org.quartz.plugin.jobInitializer.class" 
        value="org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin"
      />
      <parameter 
        name="org.quartz.plugin.jobInitializer.fileNames" 
        value="./src/test/quartz.xml"
      />
      <parameter 
        name="org.quartz.plugin.jobInitializer.failOnFileNotFound" 
        value="true"
      />
      <parameter 
        name="org.quartz.plugin.jobInitializer.scanInterval" 
        value="120"
      />
      <parameter 
        name="org.quartz.plugin.jobInitializer.wrapInUserTransaction" 
        value="false"
      />
    </properties>
  </configuration>
</quartz>
        

Component Configuration Example 2

A component configuration using an external property file

<quartz>
  <configuration>
    <propertyFile>./src/test/quartz.properties</propertyFile>
  </configuration>  
</quartz>