You can select the JobStoreTX class by setting the class name like this:
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
Table A.4 lists the available properties for configuring a Quartz JobStore. Only a few of the properties are required, and the rest have reasonable defaults.
Name |
Required |
Type |
Default Value |
---|---|---|---|
org.quartz.jobStore.driverDelegateClass |
Yes |
String |
null |
org.quartz.jobStore.dataSource |
Yes |
String |
null |
org.quartz.jobStore.tablePrefix |
No |
String |
QRTZ_ |
org.quartz.jobStore.useProperties |
No |
Boolean |
false |
org.quartz.jobStore.misfireThreshold |
No |
Integer |
60000 |
org.quartz.jobStore.isClustered |
No |
Boolean |
false |
org.quartz.jobStore.clusterCheckinInterval |
No |
Long |
15000 |
org.quartz.jobStore.maxMisfiresToHandleAtATime |
No |
Integer |
20 |
org.quartz.jobStore.dontSetAutoCommitFalse |
No |
Boolean |
false |
org.quartz.jobStore.selectWithLockSQL |
No |
String |
"SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE" |
org.quartz.jobStore.txIsolationLevelSerializable |
No |
Boolean |
false |
org.quartz.jobStore.driverDelegateClass
Quartz can use most of the popular database platforms by using a delegate. These are the allowed values for the org.quartz.jobStore.driverDelegateClass property:
org.quartz.jobStore.dataSource
The value for this property must be the name of one the DataSources defined in the DataSource configuration section later in this appendix.
org.quartz.jobStore.tablePrefix
The 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 tables within the same database if they use different table prefixes.
org.quartz.jobStore.useProperties
The "use properties" setting instructs the JDBC JobStore that all values in JobDataMaps will be Strings and, therefore, can be stored as name-value pairs instead of storing more complex objects in their serialized form in the BLOB column. This can be helpful because you avoid the class-versioning issues that can arise from serializing your non-String classes into a BLOB.
org.quartz.jobStore.misfireThreshold
Set this property to the number of milliseconds the Scheduler will tolerate a trigger to pass its next-fire time before it is considered misfired. The default value is 60000 (60 seconds).
org.quartz.jobStore.isClustered
Set this to true to turn on clustering features. This property must be set to TRue if you are using multiple instances of Quartz and the same set of database tables.
org.quartz.jobStore.clusterCheckinInterval
Set the frequency (in milliseconds) at which this instance checks in with the other instances of the cluster. This value affects the quickness of detecting failed instances.
org.quartz.jobStore.maxMisfiresToHandleAtATime
This is the maximum number of misfired triggers the JobStore will handle in a given pass. Handling many (more than a couple dozen) at once can cause the database tables to be locked long enough to hamper the performance of firing other (not yet misfired) triggers.
org.quartz.jobStore.dontSetAutoCommitFalse
Setting this parameter to TRue tells Quartz not to call setAutoCommit(false) on connections obtained from the DataSource(s). This can be helpful in a few situations, such as if you have a driver that complains if it is called when it is already off. This property defaults to false because most drivers require setAutoCommit(false) to be called.
org.quartz.jobStore.selectWithLockSQL
This must be a SQL string that selects a row in the LOCKS table and places a lock on the row. If it is not set, the default is SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE, which works for most databases. The {0} is replaced during runtime with the TABLE_PREFIX that you configured earlier.
org.quartz.jobStore.txIsolationLevelSerializable
A value of TRue tells Quartz (when using JobStoreTX or CMT) to call setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE) on JDBC connections. This can be helpful to prevent lock timeouts with some databases under high load and long-lasting transactions.
Scheduling in the Enterprise
Getting Started with Quartz
Hello, Quartz
Scheduling Jobs
Cron Triggers and More
JobStores and Persistence
Implementing Quartz Listeners
Using Quartz Plug-Ins
Using Quartz Remotely
Using Quartz with J2EE
Clustering Quartz
Quartz Cookbook
Quartz and Web Applications
Using Quartz with Workflow
Appendix A. Quartz Configuration Reference