Quartz DataSource Properties
Quartz-created DataSources are defined using the following properties:
Property Name | Required | Type | Default Value |
org.quartz.dataSource.NAME.driver | yes | String | null |
org.quartz.dataSource.NAME.URL | yes | String | null |
org.quartz.dataSource.NAME.user | no | String | "" |
org.quartz.dataSource.NAME.password | no | String | "" |
org.quartz.dataSource.NAME. maxConnections | no | int | 10 |
org.quartz.dataSource.NAME. validationQuery | no | String | null |
org.quartz.dataSource.NAME. idleConnectionValidationSeconds | no | int | 50 |
org.quartz.dataSource.NAME. validateOnCheckout | no | boolean | false |
org.quartz.dataSource.NAME. discardIdleConnectionsSeconds | no | int | 0 (disabled) |
org.quartz.dataSource.NAME.driver
Must be the Java class name of the JDBC driver for your database.
org.quartz.dataSource.NAME.URL
The connection URL (host, port, and so forth) for connection to your database.
org.quartz.dataSource.NAME.user
The user name to use when connecting to your database.
org.quartz.dataSource.NAME.password
The password to use when connecting to your database.
org.quartz.dataSource.NAME.maxConnections
The maximum number of connections that the DataSource can create in its pool of connections.
org.quartz.dataSource.NAME.validationQuery
An optional SQL query string that the DataSource can use to detect and replace failed/corrupt connections. For example a user of an Oracle database might use "select table_name from user_tables," which is a query that should not fail unless the connection is actually bad.
org.quartz.dataSource.NAME.idleConnectionValidationSeconds
The number of seconds between tests of idle connections. This is only applicable if the validation query property is set. Default is 50 seconds.
org.quartz.dataSource.NAME.validateOnCheckout
Whether the database SQL query to validate connections should be executed every time a connection is retrieved from the pool to ensure that it is still valid. If false, then validation will occur on check-in. Default is false.
org.quartz.dataSource.NAME.discardIdleConnectionsSeconds
Discard connections after they have been idle this many seconds. 0 disables the feature. Default is 0.
Example of a Quartz-defined DataSource
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.user = myUser
org.quartz.dataSource.myDS.password = myPassword
org.quartz.dataSource.myDS.maxConnections = 30