Package org.quartz.utils

Examples of org.quartz.utils.ConnectionProvider


            String cpClass = pp.getStringProperty(PROP_CONNECTION_PROVIDER_CLASS, null);

            // custom connectionProvider...
            if(cpClass != null) {
                ConnectionProvider cp = null;
                try {
                    cp = (ConnectionProvider) loadHelper.loadClass(cpClass).newInstance();
                } catch (Exception e) {
                    initException = new SchedulerException("ConnectionProvider class '" + cpClass
                            + "' could not be instantiated.", e);
View Full Code Here


    }
    setInstanceId(serverName);

    DBConnectionManager.getInstance().addConnectionProvider(
        TX_DATA_SOURCE_PREFIX + getInstanceName(),
        new ConnectionProvider() {
          public Connection getConnection() throws SQLException {
            return DataSourceUtils.doGetConnection(dataSource);
          }
          public void shutdown() {
            // Do nothing - a Spring-managed DataSource has its own lifecycle.
          }
        }
    );

    final DataSource nonTxDataSourceToUse = this.dataSource;

    setNonManagedTXDataSource(NON_TX_DATA_SOURCE_PREFIX + getInstanceName());

    DBConnectionManager.getInstance().addConnectionProvider(
        NON_TX_DATA_SOURCE_PREFIX + getInstanceName(),
        new ConnectionProvider() {
          public Connection getConnection() throws SQLException {
            Connection c = nonTxDataSourceToUse.getConnection();
            c.setTransactionIsolation(ConnectionJDBC2.TRANSACTION_READ_COMMITTED);
            return  c;
          }
View Full Code Here

            String cpClass = pp.getStringProperty(PROP_CONNECTION_PROVIDER_CLASS, null);

            // custom connectionProvider...
            if(cpClass != null) {
                ConnectionProvider cp = null;
                try {
                    cp = (ConnectionProvider) loadHelper.loadClass(cpClass).newInstance();
                } catch (Exception e) {
                    initException = new SchedulerException("ConnectionProvider class '" + cpClass
                            + "' could not be instantiated.", e);
View Full Code Here

            String cpClass = pp.getStringProperty(PROP_CONNECTION_PROVIDER_CLASS, null);

            // custom connectionProvider...
            if(cpClass != null) {
                ConnectionProvider cp = null;
                try {
                    cp = (ConnectionProvider) loadHelper.loadClass(cpClass).newInstance();
                } catch (Exception e) {
                    initException = new SchedulerException("ConnectionProvider class '" + cpClass
                            + "' could not be instantiated.", e);
View Full Code Here

TOP

Related Classes of org.quartz.utils.ConnectionProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.