Configure DataSourcesIf you're using JDBC-Jobstore, you'll be needing a Datasource for its use (or two Datasources, if you're using JobStoreCMT). Datasources can be configured in three ways:
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. Quartz-created Datasources are defined with the following properties:
org.quartz.dataSource.NAME.driver org.quartz.dataSource.NAME.URL org.quartz.dataSource.NAME.user org.quartz.dataSource.NAME.password org.quartz.dataSource.NAME.maxConnections org.quartz.dataSource.NAME.validationQuery 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 References to Application Server Datasources are defined with the following properties:
org.quartz.dataSource.NAME.jndiURL org.quartz.dataSource.NAME.java.naming.factory.initial org.quartz.dataSource.NAME.java.naming.provider.url org.quartz.dataSource.NAME.java.naming.security.principal org.quartz.dataSource.NAME.java.naming.security.credentials Example of a Datasource referenced from an Application Server 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.provider.url=ormi://localhost
org.quartz.dataSource.myOtherDS.java.naming.security.principal=admin
org.quartz.dataSource.myOtherDS.java.naming.security.credentials=123
Custom ConnectionProvider Implementations
org.quartz.dataSource.NAME.connectionProvider.class Example of Using a Custom ConnectionProvider Implementation org.quartz.dataSource.myCustomDS.connectionProvider.class = com.foo.FooConnectionProvider org.quartz.dataSource.myCustomDS.someStringProperty = someValue org.quartz.dataSource.myCustomDS.someIntProperty = 5 |