Configuring JobStoreCMT
The JobStoreCMT provides an alternate JobStore that can work with a relational database. You can choose the JobStoreCMT by selecting it with the org.quartz.jobStore.class property:
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
When using the JobStoreCMT, a few additional properties can be set. These are shown in Table A.5.
Name |
Required |
Type |
Default Value |
---|---|---|---|
org.quartz.jobStore.nonManagedTXDataSource |
Yes |
String |
null |
org.quartz.jobStore.dontSetNonManagedTX-ConnectionAutoCommitFalse |
No |
Boolean |
false |
org.quartz.jobStore.txIsolationLevelReadCommitted |
No |
Boolean |
false |
org.quartz.jobStore.nonManagedTXDataSource
JobStoreCMT requires a (second) datasource that contains connections that will not be part of container-managed transactions. The value of this property must be the name of one of the datasources defined in the configuration properties file. This datasource must contain non-CMT connectionsin other words, connections for which it is legal for Quartz to directly call commit() and rollback() on.
org.quartz.jobStore.dontSetNonManagedTXConnectionAutoCommitFalse
This is the same as org.quartz.jobStore.dontSetAutoCommitFalse, except that it applies to the nonManagedTXDataSource.
org.quartz.jobStore.txIsolationLevelReadCommitted
When set to true, this property tells Quartz to call setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED) on the non-managed JDBC connections. This can be helpful to prevent lock timeouts with some databases (such as DB2) under high load and long-lasting transactions.
For more information on JDBC JobStores, see Chapter 6, "JobStores and Persistence."
Configuring Quartz Datasources
|