private void populateProviderWithExtraProps(PoolingConnectionProvider cp, Properties props) throws Exception { Properties copyProps = new Properties(); copyProps.putAll(props); // Remove all the default properties first (they don't always match to setter name, and they are already // been set!) copyProps.remove(PoolingConnectionProvider.DB_DRIVER); copyProps.remove(PoolingConnectionProvider.DB_URL); copyProps.remove(PoolingConnectionProvider.DB_USER); copyProps.remove(PoolingConnectionProvider.DB_PASSWORD); copyProps.remove(PoolingConnectionProvider.DB_MAX_CONNECTIONS); copyProps.remove(PoolingConnectionProvider.DB_VALIDATION_QUERY); copyProps.remove(PoolingConnectionProvider.POOLING_PROVIDER); if (cp instanceof C3p0PoolingConnectionProvider) { copyProps.remove(C3p0PoolingConnectionProvider.DB_MAX_CACHED_STATEMENTS_PER_CONNECTION); copyProps.remove(C3p0PoolingConnectionProvider.DB_VALIDATE_ON_CHECKOUT); copyProps.remove(C3p0PoolingConnectionProvider.DB_IDLE_VALIDATION_SECONDS); copyProps.remove(C3p0PoolingConnectionProvider.DB_DISCARD_IDLE_CONNECTIONS_SECONDS); } setBeanProps(cp.getDataSource(), copyProps); }
private void populateProviderWithExtraProps(PoolingConnectionProvider cp, Properties props) throws Exception { Properties copyProps = new Properties(); copyProps.putAll(props); // Remove all the default properties first (they don't always match to setter name, and they are already // been set!) copyProps.remove(PoolingConnectionProvider.DB_DRIVER); copyProps.remove(PoolingConnectionProvider.DB_URL); copyProps.remove(PoolingConnectionProvider.DB_USER); copyProps.remove(PoolingConnectionProvider.DB_PASSWORD); copyProps.remove(PoolingConnectionProvider.DB_MAX_CONNECTIONS); copyProps.remove(PoolingConnectionProvider.DB_VALIDATION_QUERY); copyProps.remove(PoolingConnectionProvider.POOLING_PROVIDER); if (cp instanceof C3p0PoolingConnectionProvider) { copyProps.remove(C3p0PoolingConnectionProvider.DB_MAX_CACHED_STATEMENTS_PER_CONNECTION); copyProps.remove(C3p0PoolingConnectionProvider.DB_VALIDATE_ON_CHECKOUT); copyProps.remove(C3p0PoolingConnectionProvider.DB_IDLE_VALIDATION_SECONDS); copyProps.remove(C3p0PoolingConnectionProvider.DB_DISCARD_IDLE_CONNECTIONS_SECONDS); } setBeanProps(cp.getDataSource(), copyProps); }
setBeanProps(jmxScheduler, tProps); } catch (Exception e) { initException = new SchedulerException("RemoteMBeanScheduler class '" setBeanProps(jobFactory, tProps); } catch (Exception e) { initException = new SchedulerException("JobFactory class '" setBeanProps(instanceIdGenerator, tProps); } catch (Exception e) { initException = new SchedulerException("InstanceIdGenerator class '" setBeanProps(tp, tProps); } catch (Exception e) { initException = new SchedulerException("ThreadPool class '" setBeanProps(js, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore class '" + jsClass setBeanProps(lockHandler, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore LockHandler class '" + lockHandlerClass populateProviderWithExtraProps((PoolingConnectionProvider)cp, pp.getUnderlyingProperties()); } else { setBeanProps(cp, pp.getUnderlyingProperties()); setBeanProps(plugin, pp);
setBeanProps(jmxScheduler, tProps); } catch (Exception e) { initException = new SchedulerException("RemoteMBeanScheduler class '" setBeanProps(jobFactory, tProps); } catch (Exception e) { initException = new SchedulerException("JobFactory class '" setBeanProps(instanceIdGenerator, tProps); } catch (Exception e) { initException = new SchedulerException("InstanceIdGenerator class '" setBeanProps(tp, tProps); } catch (Exception e) { initException = new SchedulerException("ThreadPool class '" setBeanProps(js, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore class '" + jsClass setBeanProps(lockHandler, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore LockHandler class '" + lockHandlerClass populateProviderWithExtraProps((PoolingConnectionProvider)cp, pp.getUnderlyingProperties()); } else { setBeanProps(cp, pp.getUnderlyingProperties()); setBeanProps(plugin, pp);
setBeanProps(jmxScheduler, tProps); } catch (Exception e) { initException = new SchedulerException("RemoteMBeanScheduler class '" setBeanProps(jobFactory, tProps); } catch (Exception e) { initException = new SchedulerException("JobFactory class '" setBeanProps(instanceIdGenerator, tProps); } catch (Exception e) { initException = new SchedulerException("InstanceIdGenerator class '" setBeanProps(tp, tProps); } catch (Exception e) { initException = new SchedulerException("ThreadPool class '" setBeanProps(js, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore class '" + jsClass setBeanProps(lockHandler, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore LockHandler class '" + lockHandlerClass setBeanProps(cp, pp.getUnderlyingProperties()); } catch (Exception e) { initException = new SchedulerException("ConnectionProvider class '" + cpClass setBeanProps(plugin, pp);
setBeanProps(jmxScheduler, tProps); } catch (Exception e) { initException = new SchedulerException("RemoteMBeanScheduler class '" setBeanProps(jobFactory, tProps); } catch (Exception e) { initException = new SchedulerException("JobFactory class '" setBeanProps(instanceIdGenerator, tProps); } catch (Exception e) { initException = new SchedulerException("InstanceIdGenerator class '" setBeanProps(tp, tProps); } catch (Exception e) { initException = new SchedulerException("ThreadPool class '" setBeanProps(js, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore class '" + jsClass setBeanProps(lockHandler, tProps); } catch (Exception e) { initException = new SchedulerException("JobStore LockHandler class '" + lockHandlerClass setBeanProps(cp, pp.getUnderlyingProperties()); } catch (Exception e) { initException = new SchedulerException("ConnectionProvider class '" + cpClass setBeanProps(plugin, pp);