Configuring the JobStoreTX JobStoreYou can select the JobStoreTX class by setting the class name like this: org.quartz.jobStore.class = 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.
org.quartz.jobStore.driverDelegateClassQuartz 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.dataSourceThe 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.tablePrefixThe 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.usePropertiesThe "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.misfireThresholdSet 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.isClusteredSet 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.clusterCheckinIntervalSet 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.maxMisfiresToHandleAtATimeThis 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.dontSetAutoCommitFalseSetting 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.selectWithLockSQLThis 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.txIsolationLevelSerializableA 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. |
Tuesday, January 19, 2010
Configuring the JobStoreTX JobStore
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment