quartzsg配置

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.misfireThreshold org.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.driverDelegateClass org.quartz.jobStore.driverDelegateClass yes string字符串 null
org.quartz.jobStore.dataSource org.quartz.jobStore.dataSource 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.misfireThreshold org.quartz.jobStore.misfireThreshold no int廉政 60000 60000
org.quartz.jobStore.isClustered org.quartz.jobStore.isClustered no boolean布爾 false
org.quartz.jobStore.clusterCheckinInterval org.quartz.jobStore.clusterCheckinInterval no long長的 15000 15000
org.quartz.jobStore.maxMisfiresToHandleAtATime org.quartz.jobStore.maxMisfiresToHandleAtATime no int廉政 20 20
org.quartz.jobStore.dontSetAutoCommitFalse org.quartz.jobStore.dontSetAutoCommitFalse no boolean布爾 false
org.quartz.jobStore.selectWithLockSQL org.quartz.jobStore.selectWithLockSQL no string字符串 "SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE" “選擇*從(0)的鎖LOCK_NAME =的更新?”
org.quartz.jobStore.txIsolationLevelSerializable org.quartz.jobStore.txIsolationLevelSerializable no boolean布爾 false
org.quartz.jobStore.acquireTriggersWithinLock org.quartz.jobStore.acquireTriggersWithinLock no boolean布爾 false
org.quartz.jobStore.lockHandler.class org.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 configuration docs for DataSources 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.maxMisfiresToHandleAtATime org.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" QUARTZ-497 may be of interest to MS SQL Server users. “org.quartz.impl.jdbcjobstore.UpdateLockRowSemaphore” 石英- 497可能會感興趣的MS SQL Server的用戶。 See QUARTZ-441 .石英- 441。

 

 

配置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.driverDelegateClass org.quartz.jobStore.driverDelegateClass yes string字符串 null
org.quartz.jobStore.dataSource org.quartz.jobStore.dataSource yes string字符串 null
org.quartz.jobStore.nonManagedTXDataSource org.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.misfireThreshold org.quartz.jobStore.misfireThreshold no int廉政 60000 60000
org.quartz.jobStore.isClustered org.quartz.jobStore.isClustered no boolean布爾 false
org.quartz.jobStore.clusterCheckinInterval org.quartz.jobStore.clusterCheckinInterval no long長的 15000 15000
org.quartz.jobStore.maxMisfiresToHandleAtATime org.quartz.jobStore.maxMisfiresToHandleAtATime no int廉政 20 20
org.quartz.jobStore.dontSetAutoCommitFalse org.quartz.jobStore.dontSetAutoCommitFalse no boolean布爾 false
org.quartz.jobStore.dontSetNonManagedTXConnectionAutoCommitFalse org.quartz.jobStore.dontSetNonManagedTXConnectionAutoCommitFalse no boolean布爾 false
org.quartz.jobStore.selectWithLockSQL org.quartz.jobStore.selectWithLockSQL no string字符串 "SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE" “選擇*從(0)的鎖LOCK_NAME =的更新?”
org.quartz.jobStore.txIsolationLevelSerializable org.quartz.jobStore.txIsolationLevelSerializable no boolean布爾 false
org.quartz.jobStore.txIsolationLevelReadCommitted org.quartz.jobStore.txIsolationLevelReadCommitted no boolean布爾 false
org.quartz.jobStore.acquireTriggersWithinLock org.quartz.jobStore.acquireTriggersWithinLock no boolean布爾 false
org.quartz.jobStore.lockHandler.class org.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 configuration docs for DataSources 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.maxMisfiresToHandleAtATime org.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.dontSetNonManagedTXConnectionAutoCommitFalse org.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.txIsolationLevelReadCommitted 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.當設置爲“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" QUARTZ-497 may be of interest to MS SQL Server users. “org.quartz.impl.jdbcjobstore.UpdateLockRowSemaphore” 石英- 497可能會感興趣的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 QUARTZ-441 and QUARTZ-442石英- 441石英- 442

 

配置數據源

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.driver org.quartz.dataSource.NAME.driver yes String字符串 null
org.quartz.dataSource.NAME.URL org.quartz.dataSource.NAME.URL yes String字符串 null
org.quartz.dataSource.NAME.user org.quartz.dataSource.NAME.user no String字符串 "" “”
org.quartz.dataSource.NAME.password org.quartz.dataSource.NAME.password no String字符串 "" “”
org.quartz.dataSource.NAME.maxConnections org.quartz.dataSource.NAME.maxConnections no int廉政 10 10
org.quartz.dataSource.NAME.validationQuery org.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.jndiURL org.quartz.dataSource.NAME.jndiURL yes String字符串 null
org.quartz.dataSource.NAME.java.naming.factory.initial org.quartz.dataSource.NAME.java.naming.factory.initial no String字符串 null
org.quartz.dataSource.NAME.java.naming.provider.url org.quartz.dataSource.NAME.java.naming.provider.url no String字符串 null
org.quartz.dataSource.NAME.java.naming.security.principal org.quartz.dataSource.NAME.java.naming.security.principal no String字符串 null
org.quartz.dataSource.NAME.java.naming.security.credentials org.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.initial org.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.url org.quartz.dataSource.NAME.java.naming.provider.url
The (optional) URL for connecting to the JNDI context. (可選),用於連接到JNDI上下文網址。

org.quartz.dataSource.NAME.java.naming.security.principal org.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.credentials org.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.class org.quartz.dataSource.NAME.connectionProvider.class yes String (class name)字符串(類名) null

org.quartz.dataSource.NAME.connectionProvider.class org.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 http://www.boulder.nist.gov/timefreq/service/its.htm if you are unfamiliar with how to do this.http://www.boulder.nist.gov/timefreq/service/its.htm如果你是如何做到這一點並不熟悉。
信息 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.您可能會收到嚴重的腐敗數據,肯定會遇到性能不穩定。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章