Quartz Configuration Reference

Configuration of Quartz is typically done through the use of a properties file, in conjunction with the use of StdSchedulerFactory (which consumes the configuration file and instantiates a scheduler).

By default, StdSchedulerFactory load a properties file named “quartz.properties” from the ‘current working directory’. If that fails, then the “quartz.properties” file located (as a resource) in the org/quartz package is loaded. If you wish to use a file other than these defaults, you must define the system property ‘org.quartz.properties’ to point to the file you want.

Alternatively, you can explicitly initialize the factory by calling one of the initialize(xx) methods before calling getScheduler() on the StdSchedulerFactory.

Instances of the specified JobStore, ThreadPool, and other SPI classes will be created by name, and then any additional properties specified for them in the config file will be set on the instance by calling an equivalent ‘set’ method. For example if the properties file contains the property ‘org.quartz.jobStore.myProp = 10’ then after the JobStore class has been instantiated, the method ‘setMyProp()’ will be called on it. Type conversion to primitive Java types (int, long, float, double, boolean, and String) are performed before calling the property’s setter method.

One property can reference another property’s value by specifying a value following the convention of “$@other.property.name”, for example, to reference the scheduler’s instance name as the value for some other property, you would use “$@org.quartz.scheduler.instanceName”.

The properties for configuring various aspect of a scheduler are described in these sub-documents:

Choose a topic:

  1. Main Configuration (configuration of primary scheduler settings, transactions)
  2. Configuration of ThreadPool (tune resources for job execution)
  3. Configuration of Listeners (your application can receive notification of scheduled events)
  4. Configuration of Plug-Ins (add functionality to your scheduler)
  5. Configuration of RMI Server and Client (use a Quartz instance from a remote process)
  6. Configuration of RAMJobStore (store jobs and triggers in memory)
  7. Configuration of JDBC-JobStoreTX (store jobs and triggers in a database via JDBC)
  8. Configuration of JDBC-JobStoreCMT (JDBC with JTA container-managed transactions)
  9. Configuration of DataSources (for use by the JDBC-JobStores)
  10. Configuration of Database Clustering (achieve fail-over and load-balancing with JDBC-JobStore)
  11. Configuration of TerracottaJobStore (Clustering without a database!)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值