博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
quartz 配置文档
阅读量:5895 次
发布时间:2019-06-19

本文共 33772 字,大约阅读时间需要 112 分钟。

hot3.png

RAMJobStore is selected by setting the 'org.quartz.jobStore.class' property as such:RAMJobStore选择通过设置'org.quartz.jobStore.class的财产等:

Setting The Scheduler's JobStore to RAMJobStore设置调度的JobStore的RAMJobStore
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

 

RAMJobStore can be tuned with the following properties: RAMJobStore可以调整具有以下属性:

Property Name属性名称 Required必需的 Type类型 Default Value默认值
org.quartz.jobStore.misfireThresholdorg.quartz.jobStore.misfireThreshold no否 int廉政 60000 60000

org.quartz.jobStore.misfireThreshold org.quartz.jobStore.misfireThreshold 

The the number of milliseconds the scheduler will 'tolerate' a trigger to pass its next-fire-time by, before being considered "misfired".的毫秒数的调度会'容忍'的触发器通过其下一代火时间后才被认为“失误”。 The default value (if you don't make an entry of this property in your configuration) is 60000 (60 seconds).默认值(如果您没有作出这个在您的配置属性项)为60000(60秒)。

 

配置JDBC的JobStoreTX

JDBCJobStore is used to store scheduling information (job, triggers and calendars) within a relational database. JDBCJobStore是用来存储调度信息(工作,触发器和日历在一个关系数据库)。 There are actually two seperate JDBCJobStore classes that you can select between, depending on the transactional behaviour you need.实际上有两个单独的JDBCJobStore类,您可以选择,这取决于您需要交易行为。

JobStoreTX manages all transactions itself by calling commit() (or rollback()) on the database connection after every action (such as the addition of a job). JobStoreTX管理致电承诺所有交易本身()(或rollback())的每个动作后,数据库连接(如工作增加)。 JDBCJobStore is appropriate if you are using Quartz in a stand-alone application, or within a servlet container if the application is not using JTA transactions. JDBCJobStore是适当的,如果你正在使用的独立的应用程序,或在一个servlet容器石英如果应用程序不使用JTA事务。

 

The JobStoreTX is selected by setting the 'org.quartz.jobStore.class' property as such: 被选中的JobStoreTX通过设置'org.quartz.jobStore.class的财产等:

Setting The Scheduler's JobStore to JobStoreTX设置调度的JobStore的JobStoreTX
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX

 

JobStoreTX can be tuned with the following properties: JobStoreTX可以调整具有以下属性:

Property Name属性名称 Required必需的 Type类型 Default Value默认值
org.quartz.jobStore.driverDelegateClassorg.quartz.jobStore.driverDelegateClass yes是 string字符串 null空
org.quartz.jobStore.dataSourceorg.quartz.jobStore.dataSource yes是 string字符串 null空
org.quartz.jobStore.tablePrefixorg.quartz.jobStore.tablePrefix no否 string字符串 "QRTZ_" “QRTZ_”
org.quartz.jobStore.usePropertiesorg.quartz.jobStore.useProperties no否 boolean布尔 false假
org.quartz.jobStore.misfireThresholdorg.quartz.jobStore.misfireThreshold no否 int廉政 60000 60000
org.quartz.jobStore.isClusteredorg.quartz.jobStore.isClustered no否 boolean布尔 false假
org.quartz.jobStore.clusterCheckinIntervalorg.quartz.jobStore.clusterCheckinInterval no否 long长的 15000 15000
org.quartz.jobStore.maxMisfiresToHandleAtATimeorg.quartz.jobStore.maxMisfiresToHandleAtATime no否 int廉政 20 20
org.quartz.jobStore.dontSetAutoCommitFalseorg.quartz.jobStore.dontSetAutoCommitFalse no否 boolean布尔 false假
org.quartz.jobStore.selectWithLockSQLorg.quartz.jobStore.selectWithLockSQL no否 string字符串 "SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE" “选择*从(0)的锁LOCK_NAME =的更新?”
org.quartz.jobStore.txIsolationLevelSerializableorg.quartz.jobStore.txIsolationLevelSerializable no否 boolean布尔 false假
org.quartz.jobStore.acquireTriggersWithinLockorg.quartz.jobStore.acquireTriggersWithinLock no否 boolean布尔 false假
org.quartz.jobStore.lockHandler.classorg.quartz.jobStore.lockHandler.class no否 string字符串 null空

org.quartz.jobStore.driverDelegateClass org.quartz.jobStore.driverDelegateClass 

Driver delegates understand the particular 'dialects' of varies database systems.司机代表们了解,特别是'方言'的不同数据库系统。 Possible choices include:可能的选择包括:

  • org.quartz.impl.jdbcjobstore.StdJDBCDelegate (for fully JDBC-compliant drivers)org.quartz.impl.jdbcjobstore.StdJDBCDelegate(为全面JDBC的驱动程序)
  • org.quartz.impl.jdbcjobstore.MSSQLDelegate (for Microsoft SQL Server, and Sybase)org.quartz.impl.jdbcjobstore.MSSQLDelegate(用于Microsoft SQL Server和Sybase)
  • org.quartz.impl.jdbcjobstore.PostgreSQLDelegate org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
  • org.quartz.impl.jdbcjobstore.WebLogicDelegate (for WebLogic drivers)org.quartz.impl.jdbcjobstore.WebLogicDelegate(对WebLogic司机)
  • org.quartz.impl.jdbcjobstore.oracle.OracleDelegate org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
  • org.quartz.impl.jdbcjobstore.oracle.WebLogicOracleDelegate (for Oracle drivers used within Weblogic)org.quartz.impl.jdbcjobstore.oracle.WebLogicOracleDelegate(用于在WebLogic为Oracle驱动程序)
  • org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate (for Oracle drivers used within Weblogic) org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate(用于在WebLogic为Oracle驱动程序)
  • org.quartz.impl.jdbcjobstore.CloudscapeDelegate org.quartz.impl.jdbcjobstore.CloudscapeDelegate
  • org.quartz.impl.jdbcjobstore.DB2v6Delegate org.quartz.impl.jdbcjobstore.DB2v6Delegate
  • org.quartz.impl.jdbcjobstore.DB2v7Delegate org.quartz.impl.jdbcjobstore.DB2v7Delegate
  • org.quartz.impl.jdbcjobstore.HSQLDBDelegate org.quartz.impl.jdbcjobstore.HSQLDBDelegate
  • org.quartz.impl.jdbcjobstore.PointbaseDelegate org.quartz.impl.jdbcjobstore.PointbaseDelegate

Note that many databases are known to work with the StdJDBCDelegate, while others are known to work with delegates for other databases, for example Derby works well with the Cloudscape delegate (no surprise there).请注意,许多数据库已知与StdJDBCDelegate,而其他已知与其他数据库的代表,例如德比行之有效的Cloudscape的委托(不会有意外消息)。

org.quartz.jobStore.dataSource org.quartz.jobStore.dataSource 

The value of this property must be the name of one the DataSources defined in the configuration properties file.此属性的值必须是一个在配置属性定义的数据源文件的名称。 See the  for more information.查看更多信息的 。

org.quartz.jobStore.tablePrefix org.quartz.jobStore.tablePrefix 

JDBCJobStore's "table prefix" property is a string equal to the prefix given to Quartz's tables that were created in your database. JDBCJobStore的“表前缀”属性是一个字符串等于给石英的是在您的数据库中创建表的前缀。 You can have multiple sets of Quartz's tables within the same database if they use different table prefixes.您可以在同一个数据库中的石英的表多套,如果他们使用不同的表前缀。

org.quartz.jobStore.useProperties org.quartz.jobStore.useProperties 

The "use properties" flag instructs JDBCJobStore that all values in JobDataMaps will be Strings, and therefore can be stored as name-value pairs, rather than storing more complex objects in their serialized form in the BLOB column. “使用性质”标志指示JDBCJobStore在JobDataMaps所有值将字符串,因此可以存储为名值对,而不是储存在他们的序列化的BLOB列的形成更复杂的对象。 This is can be handy, as you avoid the class versioning issues that can arise from serializing your non-String classes into a BLOB.这是可以方便,为您避免类版本的问题,可以产生序列化到一个BLOB的非String类。

org.quartz.jobStore.misfireThreshold org.quartz.jobStore.misfireThreshold 

The the number of milliseconds the scheduler will 'tolerate' a trigger to pass its next-fire-time by, before being considered "misfired".的毫秒数的调度会'容忍'的触发器通过其下一代火时间后才被认为“失误”。 The default value (if you don't make an entry of this property in your configuration) is 60000 (60 seconds).默认值(如果您没有作出这个在您的配置属性项)为60000(60秒)。

org.quartz.jobStore.isClustered org.quartz.jobStore.isClustered 

Set to "true" in order to turn on clustering features.设置为“true”,以打开集群功能。 This property must be set to "true" if you are having multiple instances of Quartz use the same set of database tables...此属性必须设置为“真”,如果您有石英的多个实例使用同一套数据库表... otherwise you will experience havoc.否则,你将遇到严重破坏。 See the configuration docs for clustering for more information.请参阅更多信息集群配置文档。

org.quartz.jobStore.clusterCheckinInterval org.quartz.jobStore.clusterCheckinInterval 

Set the frequency (in milliseconds) at which this instance "checks-in"* with the other instances of the cluster.设定的频率(以毫秒为单位)在本实例“检查,在”*同组的其他实例。 Affects the quickness of detecting failed instances.影响检测失败的情况下,敏捷。

org.quartz.jobStore.maxMisfiresToHandleAtATimeorg.quartz.jobStore.maxMisfiresToHandleAtATime 

The maximum number of misfired triggers the jobstore will handle in a given pass.最大的失误数量触发jobstore将处理在给定的通过。 Handling many (more than a couple dozen) at once can cause the database tables to be locked long enough that the performance of firing other (not yet misfired) triggers may be hampered.许多处理超过两打(更多)一次可导致数据库表被锁定足够长的射击其他(尚未奏效的性能)触发器可能受到影响。

org.quartz.jobStore.dontSetAutoCommitFalse org.quartz.jobStore.dontSetAutoCommitFalse 

Setting this parameter to "true" tells Quartz not to call setAutoCommit(false) on connections obtained from the DataSource(s).将此参数设置为“true”告诉石英不调用setAutoCommit(虚假从DataSource(取得联系)秒)。 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 that setAutoCommit(false) is called.此属性默认为false,因为许多货车司机要求setAutoCommit(false)是调用。

org.quartz.jobStore.selectWithLockSQL org.quartz.jobStore.selectWithLockSQL 

Must be a SQL string that selects a row in the "LOCKS" table and places a lock on the row.必须是SQL字符串中选择“锁定行”表和地方的行锁。 If not set, the default is "SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE", which works for most databases.如果没有设置,则默认为“选择*从(0)的锁LOCK_NAME =更新程序”,这对大多数数据库工程?。 The "{0}" is replaced during run-time with the TABLE_PREFIX that you configured above.在“(0)”改为运行期间与您配置TABLE_PREFIX以上的时间。

org.quartz.jobStore.txIsolationLevelSerializable org.quartz.jobStore.txIsolationLevelSerializable 

A value of "true" tells Quartz (when using JobStoreTX or CMT) to call setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE) on JDBC connections.值为“真”告诉石英(当使用JobStoreTX或CMT)的调用setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE JDBC的连接)。 This can be helpful to prevent lock timeouts with some databases under high load, and "long-lasting" transactions.这可以有助于防止在高负荷某些数据库锁定超时,和“持久”的交易。

org.quartz.jobStore.acquireTriggersWithinLock org.quartz.jobStore.acquireTriggersWithinLock 

Whether or not the acquisition of next triggers to fire should occur within an explicit database lock.是否明年触发器内发生火灾,应明确数据库锁的收购。 This was once necessary (in previous versions of Quartz) to avoid dead-locks with particular databases, but is no longer considered necessary, hence the default value is "false".这是一次必要的(在石英以前版本),以避免死亡,特别是数据库的锁,但已不再认为有必要,因此,默认值为“false”。

org.quartz.jobStore.lockHandler.class org.quartz.jobStore.lockHandler.class 

The class name to be used to produce an instance of a org.quartz.impl.jdbcjobstore.Semaphore to be used for locking control on the job store data.类名是用于生产的一个实例是org.quartz.impl.jdbcjobstore.Semaphore锁定在工作中存储数据的控制。 This is an advanced configuration feature, which should not be used by most users.这是一个高级配置功能,这不应该被大多数用户使用。By default, Quartz will select the most appropriate (pre-bundled) Semaphore implementation to use.默认情况下,石英将选择最合适的(预先绑定)信号灯使用的执行情况。"org.quartz.impl.jdbcjobstore.UpdateLockRowSemaphore"  may be of interest to MS SQL Server users. “org.quartz.impl.jdbcjobstore.UpdateLockRowSemaphore” 可能会感兴趣的MS SQL Server的用户。 See  .见

 

 

配置JDBC的JobStoreCMT

JDBCJobStore is used to store scheduling information (job, triggers and calendars) within a relational database. JDBCJobStore是用来存储调度信息(工作,触发器和日历在一个关系数据库)。 There are actually two seperate JDBCJobStore classes that you can select between, depending on the transactional behaviour you need.实际上有两个单独的JDBCJobStore类,您可以选择,这取决于您需要交易行为。

JobStoreCMT relies upon transactions being managed by the application which is using Quartz.JobStoreCMT依赖正在应用程序,使用石英管理后交易。 A JTA transaction must be in progress before attempt to schedule (or unschedule) jobs/triggers.一个JTA事务,必须在取得进展之前,试图安排(或取消安排)工作/触发器。 This allows the "work" of scheduling to be part of the applications "larger" transaction.这使得“工作”的时间安排,申请成为“较大部分”交易。 JobStoreCMT actually requires the use of two datasources - one that has it's connection's transactions managed by the application server (via JTA) and one datasource that has connections that do not participate in global (JTA) transactions.JobStoreCMT实际需要两个数据源使用-一个有它是连接的交易的(通过的JTA)和一个已连接的数据源,不参与全球(JTA)的交易,应用服务器管理。 JobStoreCMT is appropriate when applications are using JTA transactions (such as via EJB Session Beans) to perform their work. JobStoreCMT是适当的应用程序时使用JTA交易(如通过EJB会话Bean)执行工作。

 

The JobStore is selected by setting the 'org.quartz.jobStore.class' property as such: 被选中的JobStore通过设置'org.quartz.jobStore.class的财产等:

Setting The Scheduler's JobStore to JobStoreCMT设置调度的JobStore的JobStoreCMT
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT

 

JobStoreCMT can be tuned with the following properties: JobStoreCMT可以调整具有以下属性:

Property Name属性名称 Required必需的 Type类型 Default Value默认值
org.quartz.jobStore.driverDelegateClassorg.quartz.jobStore.driverDelegateClass yes是 string字符串 null空
org.quartz.jobStore.dataSource org.quartz.jobStore.dataSource yes是 string字符串 null空
org.quartz.jobStore.nonManagedTXDataSourceorg.quartz.jobStore.nonManagedTXDataSource yes是 string字符串 null空
org.quartz.jobStore.tablePrefix org.quartz.jobStore.tablePrefix no否 string字符串 "QRTZ_"“QRTZ_”
org.quartz.jobStore.useProperties org.quartz.jobStore.useProperties no否 boolean布尔 false假
org.quartz.jobStore.misfireThresholdorg.quartz.jobStore.misfireThreshold no否 int廉政 60000 60000
org.quartz.jobStore.isClustered org.quartz.jobStore.isClustered no否 boolean布尔 false假
org.quartz.jobStore.clusterCheckinIntervalorg.quartz.jobStore.clusterCheckinInterval no否 long长的 15000 15000
org.quartz.jobStore.maxMisfiresToHandleAtATimeorg.quartz.jobStore.maxMisfiresToHandleAtATime no否 int廉政 20 20
org.quartz.jobStore.dontSetAutoCommitFalseorg.quartz.jobStore.dontSetAutoCommitFalse no否 boolean布尔 false假
org.quartz.jobStore.dontSetNonManagedTXConnectionAutoCommitFalseorg.quartz.jobStore.dontSetNonManagedTXConnectionAutoCommitFalse no否 boolean布尔 false假
org.quartz.jobStore.selectWithLockSQLorg.quartz.jobStore.selectWithLockSQL no否 string字符串 "SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE" “选择*从(0)的锁LOCK_NAME =的更新?”
org.quartz.jobStore.txIsolationLevelSerializableorg.quartz.jobStore.txIsolationLevelSerializable no否 boolean布尔 false假
org.quartz.jobStore.txIsolationLevelReadCommittedorg.quartz.jobStore.txIsolationLevelReadCommitted no否 boolean布尔 false假
org.quartz.jobStore.acquireTriggersWithinLockorg.quartz.jobStore.acquireTriggersWithinLock no否 boolean布尔 false假
org.quartz.jobStore.lockHandler.classorg.quartz.jobStore.lockHandler.class no否 string字符串 null空

org.quartz.jobStore.driverDelegateClass org.quartz.jobStore.driverDelegateClass 

Driver delegates understand the particular 'dialects' of varies database systems.司机代表们了解,特别是'方言'的不同数据库系统。 Possible choices include:可能的选择包括:

  • org.quartz.impl.jdbcjobstore.StdJDBCDelegate (for fully JDBC-compliant drivers)org.quartz.impl.jdbcjobstore.StdJDBCDelegate(为全面JDBC的驱动程序)
  • org.quartz.impl.jdbcjobstore.MSSQLDelegate (for Microsoft SQL Server, and Sybase)org.quartz.impl.jdbcjobstore.MSSQLDelegate(用于Microsoft SQL Server和Sybase)
  • org.quartz.impl.jdbcjobstore.PostgreSQLDelegate org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
  • org.quartz.impl.jdbcjobstore.WebLogicDelegate (for WebLogic drivers)org.quartz.impl.jdbcjobstore.WebLogicDelegate(对WebLogic司机)
  • org.quartz.impl.jdbcjobstore.oracle.OracleDelegate org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
  • org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate (for Oracle drivers used within Weblogic) org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate(用于在WebLogic为Oracle驱动程序)
  • org.quartz.impl.jdbcjobstore.CloudscapeDelegate org.quartz.impl.jdbcjobstore.CloudscapeDelegate
  • org.quartz.impl.jdbcjobstore.DB2v6Delegate org.quartz.impl.jdbcjobstore.DB2v6Delegate
  • org.quartz.impl.jdbcjobstore.DB2v7Delegate org.quartz.impl.jdbcjobstore.DB2v7Delegate
  • org.quartz.impl.jdbcjobstore.HSQLDBDelegate org.quartz.impl.jdbcjobstore.HSQLDBDelegate
  • org.quartz.impl.jdbcjobstore.PointbaseDelegate org.quartz.impl.jdbcjobstore.PointbaseDelegate

Note that many databases are known to work with the StdJDBCDelegate, while others are known to work with delegates for other databases, for example Derby works well with the Cloudscape delegate (no surprise there).请注意,许多数据库已知与StdJDBCDelegate,而其他已知与其他数据库的代表,例如德比行之有效的Cloudscape的委托(不会有意外消息)。

org.quartz.jobStore.dataSource org.quartz.jobStore.dataSource 

The value of this property must be the name of one the DataSources defined in the configuration properties file.此属性的值必须是一个在配置属性定义的数据源文件的名称。 For JobStoreCMT, it is required that this DataSource contains connections that are capable of participating in JTA (eg container-managed) transactions.对于JobStoreCMT,它需要这个数据源的连接,都包含在JTA的(如容器管理)的交易能力参与。 This typically means that the DataSource will be configured and maintained within and by the application server, and Quartz will obtain a handle to it via JNDI.这通常意味着将配置数据源和维持内部和应用程序服务器,石英将获得通过JNDI来处理它。 See the  for more information.查看更多信息的 。

org.quartz.jobStore.nonManagedTXDataSource org.quartz.jobStore.nonManagedTXDataSource 

JobStoreCMT requires a (second) datasource that contains connections that will not be part of container-managed transactions. JobStoreCMT 要求 (二)数据源包含连接, 不会的一部分容器管理的事务。 The value of this property must be the name of one the DataSources defined in the configuration properties file.此属性的值必须是一个在配置属性定义的数据源文件的名称。 This datasource must contain non-CMT connections, or in other words, connections for which it is legal for Quartz to directly call commit() and rollback() on.这个数据源必须包含非CMT的连接,或者换句话说,它连接的是石英法律直接调用的commit()和rollback()方法。

org.quartz.jobStore.tablePrefix org.quartz.jobStore.tablePrefix 

JDBCJobStore's "table prefix" property is a string equal to the prefix given to Quartz's tables that were created in your database. JDBCJobStore的“表前缀”属性是一个字符串等于给石英的是在您的数据库中创建表的前缀。 You can have multiple sets of Quartz's tables within the same database if they use different table prefixes.您可以在同一个数据库中的石英的表多套,如果他们使用不同的表前缀。

org.quartz.jobStore.useProperties org.quartz.jobStore.useProperties 

The "use properties" flag instructs JDBCJobStore that all values in JobDataMaps will be Strings, and therefore can be stored as name-value pairs, rather than storing more complex objects in their serialized form in the BLOB column. “使用性质”标志指示JDBCJobStore在JobDataMaps所有值将字符串,因此可以存储为名值对,而不是储存在他们的序列化的BLOB列的形成更复杂的对象。 This is can be handy, as you avoid the class versioning issues that can arise from serializing your non-String classes into a BLOB.这是可以方便,为您避免类版本的问题,可以产生序列化到一个BLOB的非String类。

org.quartz.jobStore.misfireThreshold org.quartz.jobStore.misfireThreshold 

The the number of milliseconds the scheduler will 'tolerate' a trigger to pass its next-fire-time by, before being considered "misfired".的毫秒数的调度会'容忍'的触发器通过其下一代火时间后才被认为“失误”。 The default value (if you don't make an entry of this property in your configuration) is 60000 (60 seconds).默认值(如果您没有作出这个在您的配置属性项)为60000(60秒)。

org.quartz.jobStore.isClustered org.quartz.jobStore.isClustered 

Set to "true" in order to turn on clustering features.设置为“true”,以打开集群功能。 This property must be set to "true" if you are having multiple instances of Quartz use the same set of database tables...此属性必须设置为“真”,如果您有石英的多个实例使用同一套数据库表... otherwise you will experience havoc.否则,你将遇到严重破坏。 See the configuration docs for clustering for more information.请参阅更多信息集群配置文档。

org.quartz.jobStore.clusterCheckinInterval org.quartz.jobStore.clusterCheckinInterval 

Set the frequency (in milliseconds) at which this instance "checks-in"* with the other instances of the cluster.设定的频率(以毫秒为单位)在本实例“检查,在”*同组的其他实例。 Affects the quickness of detecting failed instances.影响检测失败的情况下,敏捷。

org.quartz.jobStore.maxMisfiresToHandleAtATimeorg.quartz.jobStore.maxMisfiresToHandleAtATime 

The maximum number of misfired triggers the jobstore will handle in a given pass.最大的失误数量触发jobstore将处理在给定的通过。 Handling many (more than a couple dozen) at once can cause the database tables to be locked long enough that the performance of firing other (not yet misfired) triggers may be hampered.许多处理超过两打(更多)一次可导致数据库表被锁定足够长的射击其他(尚未奏效的性能)触发器可能受到影响。

org.quartz.jobStore.dontSetAutoCommitFalse org.quartz.jobStore.dontSetAutoCommitFalse 

Setting this parameter to "true" tells Quartz not to call setAutoCommit(false) on connections obtained from the DataSource(s).将此参数设置为“true”告诉石英不调用setAutoCommit(虚假从DataSource(取得联系)秒)。 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 that setAutoCommit(false) is called.此属性默认为false,因为许多货车司机要求setAutoCommit(false)是调用。

org.quartz.jobStore.dontSetNonManagedTXConnectionAutoCommitFalseorg.quartz.jobStore.dontSetNonManagedTXConnectionAutoCommitFalse 

The same as the property org.quartz.jobStore.dontSetAutoCommitFalse , except that it applies to the nonManagedTXDataSource.作为物业org.quartz.jobStore.dontSetAutoCommitFalse相同,除了它适用于nonManagedTXDataSource。

org.quartz.jobStore.selectWithLockSQL org.quartz.jobStore.selectWithLockSQL 

Must be a SQL string that selects a row in the "LOCKS" table and places a lock on the row.必须是SQL字符串中选择“锁定行”表和地方的行锁。 If not set, the default is "SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE" , which works for most databases.如果没有设置,则默认为“选择*从(0)的锁LOCK_NAME =更新程序”,这对大多数数据库工程?。 The "{0}" is replaced during run-time with the TABLE_PREFIX that you configured above.在“(0)”改为运行期间与您配置TABLE_PREFIX以上的时间。

org.quartz.jobStore.txIsolationLevelSerializable org.quartz.jobStore.txIsolationLevelSerializable 

A value of "true" tells Quartz to call setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE)on JDBC connections.值为“真”告诉石英调用setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE JDBC的连接)。 This can be helpful to prevent lock timeouts with some databases under high load, and "long-lasting" transactions.这可以有助于防止在高负荷某些数据库锁定超时,和“持久”的交易。

org.quartz.jobStore.txIsolationLevelReadCommittedorg.quartz.jobStore.txIsolationLevelReadCommitted 

When set to "true", this property tells Quartz to callsetTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED) on the non-managed JDBC connections.当设置为“true”,这个属性告诉石英调用setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED)对非管理JDBC连接。 This can be helpful to prevent lock timeouts with some databases (such as DB2) under high load, and "long-lasting" transactions.这可以帮助防止某些数据库(如DB2)在高负荷,和“持久”的交易锁定超时。

org.quartz.jobStore.acquireTriggersWithinLock org.quartz.jobStore.acquireTriggersWithinLock 

Whether or not the acquisition of next triggers to fire should occur within an explicit database lock.是否明年触发器内发生火灾,应明确数据库锁的收购。 This was once necessary (in previous versions of Quartz) to avoid dead-locks with particular databases, but is no longer considered necessary, hence the default value is "false".这是一次必要的(在石英以前版本),以避免死亡,特别是数据库的锁,但已不再认为有必要,因此,默认值为“false”。

org.quartz.jobStore.lockHandler.class org.quartz.jobStore.lockHandler.class 

The class name to be used to produce an instance of a org.quartz.impl.jdbcjobstore.Semaphore to be used for locking control on the job store data.类名是用于生产的一个实例是org.quartz.impl.jdbcjobstore.Semaphore锁定在工作中存储数据的控制。 This is an advanced configuration feature, which should not be used by most users.这是一个高级配置功能,这不应该被大多数用户使用。By default, Quartz will select the most appropriate (pre-bundled) Semaphore implementation to use.默认情况下,石英将选择最合适的(预先绑定)信号灯使用的执行情况。"org.quartz.impl.jdbcjobstore.UpdateLockRowSemaphore"  may be of interest to MS SQL Server users. “org.quartz.impl.jdbcjobstore.UpdateLockRowSemaphore” 可能会感兴趣的MS SQL Server的用户。 "JTANonClusteredSemaphore" which is bundled with Quartz may give improved performance when using JobStoreCMT, though it is an experimental implementation.“JTANonClusteredSemaphore”这与石英捆绑,可能会改善的表现当使用JobStoreCMT,虽然这是一个试验的执行情况。 See  and 见和

 

配置数据源

If you're using JDBC-Jobstore, you'll be needing a DataSource for its use (or two DataSources, if you're using JobStoreCMT).如果你使用JDBC - Jobstore,你会为它的使用需要一个DataSource(或两个数据源,如果您使用JobStoreCMT)。

DataSources can be configured in three ways:数据源可以被配置在三个方面:

  1. All pool properties specified in the quartz.properties file, so that Quartz can create the DataSource itself.所有池在quartz.properties文件中指定的属性,使石英可以创建自己的DataSource。
  2. The JNDI location of an application server managed Datasource can be specified, so that Quartz can use it.在应用服务器的JNDI位置进行管理,可以指定数据源,使石英可以使用它。
  3. Custom defined org.quartz.utils.ConnectionProvider implementations.自定义定义org.quartz.utils.ConnectionProvider实现。

 

Each DataSource you define (typically one or two) must be given a name, and the properties you define for each must contain that name, as shown below.您定义的每个数据源(通常是一个或两个)必须有名称,定义的属性为每个必须包含该名称,如下所示。 The DataSource's "NAME" can be anything you want, and has no meaning other than being able to identify it when it is assigned to the JDBCJobStore.该数据源的“名称”可以是任何你想要的,没有任何意义,除了能够识别它时,它被分配到JDBCJobStore。

 

 

 

石英创建的数据源是指具有以下属性:

 

Property Name属性名称 Required必需的 Type类型 Default Value默认值
org.quartz.dataSource.NAME.driverorg.quartz.dataSource.NAME.driver yes是 String字符串 null空
org.quartz.dataSource.NAME.URLorg.quartz.dataSource.NAME.URL yes是 String字符串 null空
org.quartz.dataSource.NAME.userorg.quartz.dataSource.NAME.user no否 String字符串 "" “”
org.quartz.dataSource.NAME.passwordorg.quartz.dataSource.NAME.password no否 String字符串 "" “”
org.quartz.dataSource.NAME.maxConnectionsorg.quartz.dataSource.NAME.maxConnections no否 int廉政 10 10
org.quartz.dataSource.NAME.validationQueryorg.quartz.dataSource.NAME.validationQuery no否 String字符串 null空

org.quartz.dataSource.NAME.driver org.quartz.dataSource.NAME.driver 

Must be the java class name of the JDBC driver for your database.必须为您的数据库的JDBC驱动程序Java类的名字。

org.quartz.dataSource.NAME.URL org.quartz.dataSource.NAME.URL 

The connection URL (host, port, etc.) for connection to your database.连接网址(主机,端口等,用于连接到数据库)。

org.quartz.dataSource.NAME.user org.quartz.dataSource.NAME.user 

The user name to use when connecting to your database.用户名时要使用连接到您的数据库。

org.quartz.dataSource.NAME.password org.quartz.dataSource.NAME.password 

The password to use when connecting to your database.要使用的密码当连接到您的数据库。

org.quartz.dataSource.NAME.maxConnections org.quartz.dataSource.NAME.maxConnections 

The maximum number of connections that the DataSource can create in it's pool of connections.最大连接数的数据源可以在其中创建的连接池。

org.quartz.dataSource.NAME.validationQuery org.quartz.dataSource.NAME.validationQuery 

Is an optional SQL query string that the DataSource can use to detect and replace failed/corrupt connections.是一个可选的SQL查询字符串的数据源可以用来检测和更换失败/腐败的连接。 For example an oracle user might choose "select table_name from user_tables" - which is a query that should never fail - unless the connection is actually bad.例如,一个Oracle用户可以选择“从user_tables选择表格名” -这是一个查询,绝不能失败-除非该连接实际上是坏的。

Example of a Quartz-defined DataSource范例石英定义的数据源
org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@10.0.1.23:1521:demodb org.quartz.dataSource.myDS.URL =的JDBC:甲骨文:薄:@ 10.0.1.23:1521:demodb org.quartz.dataSource.myDS.user = myUser org.quartz.dataSource.myDS.user = myUser org.quartz.dataSource.myDS.password = myPassword org.quartz.dataSource.myDS.password = 123456 org.quartz.dataSource.myDS.maxConnections = 30 org.quartz.dataSource.myDS.maxConnections = 30

References to Application Server DataSources are defined with the following properties:以应用服务器数据源引用定义具有以下属性:

 

Property Name属性名称 Required必需的 Type类型 Default Value默认值
org.quartz.dataSource.NAME.jndiURLorg.quartz.dataSource.NAME.jndiURL yes是 String字符串 null空
org.quartz.dataSource.NAME.java.naming.factory.initialorg.quartz.dataSource.NAME.java.naming.factory.initial no否 String字符串 null空
org.quartz.dataSource.NAME.java.naming.provider.urlorg.quartz.dataSource.NAME.java.naming.provider.url no否 String字符串 null空
org.quartz.dataSource.NAME.java.naming.security.principalorg.quartz.dataSource.NAME.java.naming.security.principal no否 String字符串 null空
org.quartz.dataSource.NAME.java.naming.security.credentialsorg.quartz.dataSource.NAME.java.naming.security.credentials no否 String字符串 null空

org.quartz.dataSource.NAME.jndiURL org.quartz.dataSource.NAME.jndiURL 

The JNDI URL for a DataSource that is managed by your application server.对于一个由应用服务器管理的数据源的JNDI网址。

org.quartz.dataSource.NAME.java.naming.factory.initialorg.quartz.dataSource.NAME.java.naming.factory.initial 

The (optional) class name of the JNDI InitialContextFactory that you wish to use. (可选)类的JNDI InitialContextFactory的名称,你想使用。

org.quartz.dataSource.NAME.java.naming.provider.urlorg.quartz.dataSource.NAME.java.naming.provider.url 

The (optional) URL for connecting to the JNDI context. (可选),用于连接到JNDI上下文网址。

org.quartz.dataSource.NAME.java.naming.security.principalorg.quartz.dataSource.NAME.java.naming.security.principal 

The (optional) user principal for connecting to the JNDI context. (可选),用户主要用于连接到JNDI上下文。

org.quartz.dataSource.NAME.java.naming.security.credentialsorg.quartz.dataSource.NAME.java.naming.security.credentials 

The (optional) user credentials for connecting to the JNDI context. (可选),用于连接到JNDI上下文用户凭据。

Example of a Datasource referenced from an Application Server一个数据源引用的例子从一个应用服务器
org.quartz.dataSource.myOtherDS.jndiURL=jdbc/myDataSource org.quartz.dataSource.myOtherDS.jndiURL =的JDBC / myDataSource的 org.quartz.dataSource.myOtherDS.java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory org.quartz.dataSource.myOtherDS.java.naming.factory.initial = com.evermind.server.rmi.RMIInitialContextFactory org.quartz.dataSource.myOtherDS.java.naming.provider.url=ormi: //localhost org.quartz.dataSource.myOtherDS.java.naming.provider.url = ormi:/ /本地主机   org.quartz.dataSource.myOtherDS.java.naming.security.principal=admin org.quartz.dataSource.myOtherDS.java.naming.security.principal =管理 org.quartz.dataSource.myOtherDS.java.naming.security.credentials=123 org.quartz.dataSource.myOtherDS.java.naming.security.credentials = 123

 

Custom ConnectionProvider Implementations自定义ConnectionProvider等的实现

 

Property Name属性名称 Required必需的 Type类型 Default Value默认值
org.quartz.dataSource.NAME.connectionProvider.classorg.quartz.dataSource.NAME.connectionProvider.class yes是 String (class name)字符串(类名) null空

org.quartz.dataSource.NAME.connectionProvider.classorg.quartz.dataSource.NAME.connectionProvider.class 

The class name of the ConnectionProvider to use.该ConnectionProvider等类的名称。 After instantiating the class, Quartz can automatically set configuration properties on the instance, bean-style.在实例化类,石英可以自动设置实例配置属性,豆式。

Example of Using a Custom ConnectionProvider Implementation例如使用自定义ConnectionProvider等的执行情况
org.quartz.dataSource.myCustomDS.connectionProvider.class = com.foo.FooConnectionProvider org.quartz.dataSource.myCustomDS.connectionProvider.class = com.foo.FooConnectionProvider org.quartz.dataSource.myCustomDS.someStringProperty = someValue org.quartz.dataSource.myCustomDS.someStringProperty = someValue org.quartz.dataSource.myCustomDS.someIntProperty = 5 org.quartz.dataSource.myCustomDS.someIntProperty = 5

配置群集使用JDBC - JobStore

Quartz's clustering features bring both high availability and scalability to your scheduler via fail-over and load balancing functionality.石英的集群功能,同时将通过不高可用性和可扩展性的调度,恢复和负载平衡功能。

 

Clustering currently only works with the JDBC-Jobstore (JobStoreTX or JobStoreCMT), and essentially works by having each node of the cluster share the same database.聚类目前只能与JDBC的Jobstore(JobStoreTX或JobStoreCMT),而且基本上由每个集群的共享同一个数据库节点工程。

Load-balancing occurs automatically, with each node of the cluster firing jobs as quickly as it can.负载均衡自动出现群集的每个节点的发射工作,尽快可以。 When a trigger's firing time occurs, the first node to aquire it (by placing a lock on it) is the node that will fire it.当一个触发器的发射时间时,第一个节点获得它(通过放置它锁)是节点,将着火。

Fail-over occurs when one of the nodes fails while in the midst of executing one or more jobs.故障切换时发生一个节点失败,而在执行一项或多项工作之中。 When a node fails, the other nodes detect the condition and identify the jobs in the database that were in progress within the failed node.当一个节点出现故障,其他节点检测的条件,并确定在数据库中,在进步在该故障节点的工作。 Any jobs marked for recovery (with the "requests recovery" property on the JobDetail) will be re-executed by the remaining nodes.任何工作,这些工作为恢复(与“要求恢复”的JobDetail的)将重新财产由其余节点执行。 Jobs not marked for recovery will simply be freed up for execution at the next time a related trigger fires.乔布斯没有明显复苏,根本在被释放的下一次执行建立相关的触发器激发。

 

Enable clustering by setting the "org.quartz.jobStore.isClustered" property to "true".通过设置启用“org.quartz.jobStore.isClustered”属性为“集群真实”。 Each instance in the cluster should use the same copy of the quartz.properties file.群集中的每个实例应使用相同的quartz.properties文件的副本。Exceptions of this would be to use properties files that are identical, with the following allowable exceptions: Different thread pool size, and different value for the "org.quartz.scheduler.instanceId" property.这个例外是使用下列属性文件允许的例外是相同的:为“org.quartz.scheduler.instanceId”属性不同的线程池的大小,和不同的价值。 Each node in the cluster MUST have a unique instanceId, which is easily done (without needing different properties files) by placing "AUTO" as the value of this property.群集中的每个节点必须有一个独特的instanceId,这是容易做到通过将“(无需文件的不同属性)汽车”作为该属性的值。 See the info about the configuration properties of JDBC-JobStore for more information.见对JDBC的配置属性,获取更多信息JobStore信息。

  Never run clustering on separate machines, unless their clocks are synchronized using some form of time-sync service (daemon) that runs very regularly (the clocks must be within a second of each other).从未参加聚类单独的机器,除非他们的时钟同步使用某种形式的时间同步服务(daemon)的运行速度非常经常(时钟必须在彼此秒)。  See  if you are unfamiliar with how to do this.见如果你是如何做到这一点并不熟悉。
  Never fire-up a non-clustered instance against the same set of tables that any other instance is running against.永不火了一个非群集对同一套表格,例如,任何其他实例正在运行反对。  You may get serious data corruption, and will definitely experience eratic behavior.您可能会收到严重的腐败数据,肯定会遇到性能不稳定。

转载于:https://my.oschina.net/chenleijava/blog/109739

你可能感兴趣的文章
RAID 磁盘陈列详解
查看>>
公司组网核心、汇聚、接入层交换机配置
查看>>
linux文件描述符
查看>>
C++ const 详解
查看>>
wpf 自动完成comboxBox
查看>>
传值引用和调用引用的区别
查看>>
Linux & Oracle目录说明
查看>>
Hive简介
查看>>
hyper-v 无线网连接
查看>>
Python3.7.1学习(六)RabbitMQ在Windows环境下的安装
查看>>
Windows下memcached的安装配置
查看>>
ubuntu: firefox+flashplay
查看>>
常见的海量数据处理方法
查看>>
Microsoft Windows 8.1 使用记录
查看>>
C语言博客作业03--函数
查看>>
web.xml 中CharacterEncodingFilter类的学习
查看>>
显示刚刚添加的最后一条数据,access,选择语句,select
查看>>
贪吃蛇逻辑代码
查看>>
实现c协程
查看>>
ASP.NET视频教程 手把手教你做企业论坛网站 视频教程
查看>>