The case engine scheduler will share the Quartz scheduler instance with the basic/advanced scheduler, so if you already configured Quartz for the basic/advanced scheduler, you just need to enable the case-engine profile and you can skip the remainder of this guide. |
Steps:
bootstrap.properties
. More information on how to configure the application using Spring Profiles can be found here: External application configuration with Spring Profiles.application-case-engine.properties
file in the configuration location if it does not yet exist. This properties file is added in the Steps 3 and 4 are applicable only if Quartz triggers and jobs are stored in a database instead of in memory. |
Every Quartz configuration property has to be specified in application-case-engine.properties for the Runtime. |
Quartz is configured using a set of properties. Quartz uses a job store in order to persist jobs details, triggers and other job related information. We support two types of job stores:
This is the default configuration for Java environments. |
By default memory mode is enabled which should be used only for demos and standalone development. For recommended settings please check the database settings. For memory the following setting should be set in the application-case-engine.properties.
spring.quartz.job-store-type = memory |
Scripts to create the required database content are provided for the following databases:
Create the Quartz database with respect to the database used (either Oracle or MSSQL). In the Blueriq release zip there is a case-engine-scheduler-quartz directory that contains SQL scripts. Use your favorite database tool to run those scripts against the database server.
|
To enable the JDBC Connection the profile must enabled and the following properties have to be used:
spring.quartz.job-store-type = jdbc spring.quartz.properties.org.quartz.jobStore.tablePrefix = QRTZ_ # For MSSQL, use a driver delegate #spring.quartz.properties.org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate |
JDBCJobStore’s “table prefix” property is a string equal to the prefix given to Quartz’s tables that were created in your database. You can have multiple sets of Quartz’s tables within the same database if they use different table prefixes.
When changing the org.quartz.jobStore.tablePrefix, please change the SQL create scripts accordingly. |
The datasource can be specified directly using the external datasources, or via JNDI.
Enable the profile and add the following properties to the
:
blueriq.datasource.scheduler-quartz.driverClassName = com.microsoft.sqlserver.jdbc.SQLServerDriver blueriq.dataSource.scheduler-quartz.url = jdbc:sqlserver://<server_url>:<port>;databaseName=<database_name>;instance=<instance_name> blueriq.datasource.scheduler-quartz.username = <user> blueriq.datasource.scheduler-quartz.password = <password> |
blueriq.datasource.scheduler-quartz.driverClassName = oracle.jdbc.driver.OracleDriver blueriq.dataSource.scheduler-quartz.url = jdbc:oracle:thin:@<server_url>:<port>:xe blueriq.datasource.scheduler-quartz.username = <user> blueriq.datasource.scheduler-quartz.password = <password> |
To enable JNDI Connection enable the profile and add the following properties to the
:
// JBoss Example provided that the jndi name is set to java:jboss/jdbc/quartzdb blueriq.datasource.scheduler-quartz.jndiName = java:jboss/jdbc/quartzdb // Tomcat Example provided that the jndi name is set to jdbc/quartzdb blueriq.datasource.scheduler-quartz.jndiName = java:/comp/env/jdbc/quartzdb |
When the database is configured, we recommend to also configure the thread pool. Each DCM project gets its own trigger. It is recommended to have a thread per DCM project. For example if you have 3 DCM projects you should set the threadCount to 3.
Please check that the threadCount does not exceed the number of available database connections (or connections in the database connection pool). The quartz documentation suggests the following: provided that the database allows X connections, then the threadCount must be set to X - 3.
Below are the default thread Pool properties:
spring.quartz.properties.org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool spring.quartz.properties.org.quartz.threadPool.threadCount = 2 |
For more information and properties related to Quartz ThreadPool, please visit ThreadPool Configuration |
There are many configuration properties for clustering, see the Quartz documentation. To enable clustering, specify at least these properties:
spring.quartz.properties.org.quartz.jobStore.isClustered = true spring.quartz.properties.org.quartz.scheduler.instanceName = MyClusteredScheduler # Have Quartz generate an instanceId for each node in the cluster spring.quartz.properties.org.quartz.scheduler.instanceId = AUTO |
For more information on quartz configurations, please visit: Quartz-Scheduler.org. |