Chapter 31. Configuring Quartz timer service
When you run KIE Server in a cluster you can configure the Quartz timer service.
Before you configure a database on your application server, you must prepare the database for Quartz to create Quartz tables, which will hold the timer data, and the Quartz definition file.
Prerequisites
- A supported non-JTA data source is connected to your application server, for example a PostgreSQL data source.
Procedure
Create Quartz tables in your database to enable timer events to synchronize using the DDL script for your database.
The DDL script is available in the extracted supplementary ZIP archive in
QUARTZ_HOME/docs/dbTables.NoteScripts containing the word
dropsuch asquartz_tables_drop_db2.sqldrop the Quartz table before creating it.Create the Quartz configuration file
quartz-definition.propertiesin theJBOSS_HOME/MODE/configuration/directory and add the following example content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantThe recommended interval for cluster discovery is 20 seconds and is set in the
org.quartz.jobStore.clusterCheckinIntervalattribute of thequartz-definition.propertiesfile. Consider the performance impact on your system and modify the settings as necessary.-
Provide the absolute path to your
quartz-definition.propertiesfile in theorg.quartz.propertiesproperty. Optional: To configure the number of retries and delay for the Quartz trigger, update the following system properties:
-
org.jbpm.timer.quartz.retries(default value is 5) -
org.jbpm.timer.quartz.delayin milliseconds (default value is 1000)
-
By default, Quartz requires two data sources:
- Managed data source to participate in the transaction of the process engine.
- Unmanaged data source to look up timers to trigger without any transaction handling
Red Hat Process Automation Manager business applications assume that the Quartz database (schema) will be co-located with Red Hat Process Automation Manager tables and therefore produce data sources used for transactional operations for Quartz.
The other (non transactional) data source must be configured but it should point to the same database as the main data source.