📄 example_quartz.properties
字号:
# term, as you avoid the class versioning issues that there are with # serializing your non-String classes into a BLOB.## JDBCJobStore's "DS_NAME" must be the name of one the datasources# defined in this file. JobStoreCMT _requires_ a datasource that contains # container-managed-transaction-capable connections. Typically this means a # datasource that is managed by an application server, and used by Quartz by# specifying the JNDI url of the datasource.## JobStoreCMT also _requires_ a (second) datasource that contains connections# that will not be part of container-managed transactions. # "NON_MANAGED_TX_DS_NAME" must be the name of one the datasources defined in # this file. - This datasource must contain non-container-transaction managed# connections. ## JDBCJobStore's "TABLE_PREFIX" property is a string equal to the prefix# given to Quartz's tables that were created in your database.## JDBCJobStore's "IS_CLUSTERED" property must be set to either "true" or# "false". If unset, the default is "false". 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. Also# note that each instance in the cluster MUST have a unique "instance id"# (the "org.quartz.scheduler.instanceId" property), but should have the # same "scheduler instance name" ("org.quartz.scheduler.instanceName").## * NOTE: 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).# See http://www.boulder.nist.gov/timefreq/service/its.htm if you are# unfamiliar with how to do this.## Also: never fire-up a non-clustered instance against the same set# of tables that any other instance is running against. You will # get serious data corruption, and eratic behavior.### JDBCJobStore's "LOCKING_SELECT_STATEMENT" property must be a SQL string# that selects a row in the "LOCKS" table and places a lock on it. If not# set, the default is "SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE", # which works for most databases. The "{0}" is replaced during run-time # with the TABLE_PREFIX that you configured above.## "DONT_TURN_OFF_AUTO_COMMIT" 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.## "SERIALIZABLE_ISOLATION" 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 "longer"-lasting transactions.## "READ_COMMITTED_ISOLATION" tells Quartz (When using JobStoreCMT) 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 "longer"-lasting # transactions.###org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTXorg.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegateorg.quartz.jobStore.useProperties = falseorg.quartz.jobStore.dataSource = myDSorg.quartz.jobStore.tablePrefix = QRTZ_org.quartz.jobStore.isClustered = false#org.quartz.jobStore.selectWithLockSQL = # ===========================================================================# Configure Datasources ====================================================# ===========================================================================## (only needed when using JDBCJobStore, or a plugin that requires JDBC)## -- If your Scheduler is very busy (i.e. nearly always executing the same# number of jobs as the size of the thread pool, then you should probably# set the number of connections in the DataSource to be the size of the# thread pool + 1## The general pattern for defining a DataSource is one of the following:## org.quartz.dataSource.NAME.driver = DRIVER_CLASS_NAME# org.quartz.dataSource.NAME.URL = DB_URL# org.quartz.dataSource.NAME.user = DB_USER# org.quartz.dataSource.NAME.password = DB_PASSWORD# org.quartz.dataSource.NAME.maxConnections = DB_POOL_SIZE# org.quartz.dataSource.NAME.validationQuery= VALIDATION_QUERY## or## org.quartz.dataSource.NAME.jndiURL = DB_JNDI_URL## or# org.quartz.dataSource.NAME.jndiURL = DB_JNDI_URL# org.quartz.dataSource.NAME.jndiAlwaysLookup = DB_JNDI_ALWAYS_LOOKUP# org.quartz.dataSource.NAME.java.naming.factory.initial = JNDI_CTXT_FACTORY# org.quartz.dataSource.NAME.java.naming.provider.url = JNDI_PROVIDER_URL# org.quartz.dataSource.NAME.java.naming.security.principal = JNDI_PRINCIPAL# org.quartz.dataSource.NAME.java.naming.security.credentials = JNDI_CREDENTIALS### The DataSource's "NAME" can be anything you want, and has no meaning other# than being able to 'define' a DataSource here, and assign it by name to the# JDBCJobStore.## With the two types of DataSource definition shown above, a DataSource can# either be created with the given database connection information, or can# be "logically mapped" to use a DataSource that is managed by an application# server an made available via JNDI.## "DRIVER_CLASS_NAME" must be the java class name of the JDBC driver for your# database.## "DB_URL" must be the connection URL (host, port, etc.) for connection to your# database.## "DB_USER" is the user name to use when connecting to your database.## "DB_USER" is the password to use when connecting to your database.## "DB_POOL_SIZE" is the maximum number of connections that the DataSource can# create in it's pool of connections.## "VALIDATION_QUERY" is an optional SQL query string that the DataSource# can use to detect and replace failed/corrupt connections. 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.## "DB_JNDI_URL" is the JNDI URL for a DataSource that is managed by your# application server. Additionally, you can provide the class name of the # JNDI InitialContextFactory that you wish to use, the provider's URL, and# a username & password for connecting to the JNDI provider, if it is not# the default provider of your environment.## "DB_JNDI_ALWAYS_LOOKUP" can be "true" or "false" - if the property is not# set, the default is "false". This option tells Quartz whether or not it# should always lookup the DataSource under the JNDI tree each time it # needs to get a connection from it. If set to (the default) "false", # Quartz will "hold on to" the DataSource after looking it up only once.#org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriverorg.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@10.0.1.23:1521:demodborg.quartz.dataSource.myDS.user = mops_protoorg.quartz.dataSource.myDS.password = mops_protoorg.quartz.dataSource.myDS.maxConnections = 5#org.quartz.dataSource.myDS.jndiURL=jdbc/PAWS#org.quartz.dataSource.myDS.jndiAlwaysLookup=false#org.quartz.dataSource.myDS.java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory#org.quartz.dataSource.myDS.java.naming.provider.url=ormi://localhost#org.quartz.dataSource.myDS.java.naming.security.principal=admin#org.quartz.dataSource.myDS.java.naming.security.credentials=123# ===========================================================================# Configure SchedulerPlugins ===============================================# ===========================================================================## The general pattern for defining a SchedulerPlugin is the following:## org.quartz.plugin.NAME.class = PLUGIN_CLASS_NAME## If the plugin class has properties you want set via some "setter" methods # on the class, name the properties and values as such## org.quartz.plugin.NAME.propName = propValue## ...where "propName" corrisponds to a "setPropName" method on the plugin # class. Only primitive data type values (including Strings) are supported.### Configure Plugins =========================================================org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingTriggerHistoryPluginorg.quartz.plugin.triggHistory.triggerFiredMessage = Trigger {1}.{0} fired job {6}.{5} at: {4, date, HH:mm:ss MM/dd/yyyy}org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger {1}.{0} completed firing job {6}.{5} at {4, date, HH:mm:ss MM/dd/yyyy} with resulting trigger instruction code: {9}org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPluginorg.quartz.plugin.jobInitializer.fileName = data/my_job_data.xmlorg.quartz.plugin.jobInitializer.overWriteExistingJobs = falseorg.quartz.plugin.jobInitializer.failOnFileNotFound = trueorg.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPluginorg.quartz.plugin.shutdownhook.cleanShutdown = true# ===========================================================================# Configure Listeners ===============================================# ===========================================================================## The general pattern for defining a "Global" TriggerListener is:## org.quartz.triggerListener.NAME.class = TRIGGER_LISTENER_CLASS_NAME## The general pattern for defining a "Global" JobListener is the following:## org.quartz.jobListener.NAME.class = JOB_LISTENER_CLASS_NAME## "NAME" becomes the listener's name, and a "setName(String)" method is # reflectively found and called on the class that is instantiated.## If the listener class has properties you want set via some "setter" methods # on the class, name the properties and values as such## org.quartz.triggerListener.NAME.propName = propValue# or# org.quartz.jobListener.NAME.propName = propValue## ...where "propName" corrisponds to a "setPropName" method on the listener # class. Only primitive data type values (including Strings) are supported.### Configure Plugins =========================================================org.quartz.triggerListener.dummy.class = org.quartz.examples.DumbTriggerListener
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -