protected Object loadBaseDataSource(BaseDataSource ds, Reference ref) { ds.setDatabaseName(getProperty(ref, "databaseName")); ds.setPassword(getProperty(ref, "password")); String port = getProperty(ref, "portNumber"); if (port != null) { ds.setPortNumber(Integer.parseInt(port)); } ds.setServerName(getProperty(ref, "serverName")); ds.setUser(getProperty(ref, "user")); String prepareThreshold = getProperty(ref, "prepareThreshold"); if (prepareThreshold != null) ds.setPrepareThreshold(Integer.parseInt(prepareThreshold)); return ds; }
private Object loadPoolingDataSource(Reference ref) { // If DataSource exists, return it String name = getProperty(ref, "dataSourceName"); PGPoolingDataSource pds = PGPoolingDataSource.getDataSource(name); if (pds != null) { return pds; } // Otherwise, create a new one pds = new PGPoolingDataSource(); pds.setDataSourceName(name); loadBaseDataSource(pds, ref); String min = getProperty(ref, "initialConnections"); if (min != null) { pds.setInitialConnections(Integer.parseInt(min)); } String max = getProperty(ref, "maxConnections"); if (max != null) { pds.setMaxConnections(Integer.parseInt(max)); } return pds; }
private Object loadPoolingDataSource(Reference ref) { // If DataSource exists, return it String name = getProperty(ref, "dataSourceName"); PGPoolingDataSource pds = PGPoolingDataSource.getDataSource(name); if (pds != null) { return pds; } // Otherwise, create a new one pds = new PGPoolingDataSource(); pds.setDataSourceName(name); loadBaseDataSource(pds, ref); String min = getProperty(ref, "initialConnections"); if (min != null) { pds.setInitialConnections(Integer.parseInt(min)); } String max = getProperty(ref, "maxConnections"); if (max != null) { pds.setMaxConnections(Integer.parseInt(max)); } return pds; }
protected Object loadBaseDataSource(BaseDataSource ds, Reference ref) { ds.setDatabaseName(getProperty(ref, "databaseName")); ds.setPassword(getProperty(ref, "password")); String port = getProperty(ref, "portNumber"); if (port != null) { ds.setPortNumber(Integer.parseInt(port)); } ds.setServerName(getProperty(ref, "serverName")); ds.setUser(getProperty(ref, "user")); String prepareThreshold = getProperty(ref, "prepareThreshold"); if (prepareThreshold != null) ds.setPrepareThreshold(Integer.parseInt(prepareThreshold)); return ds; }
protected Object loadBaseDataSource(BaseDataSource ds, Reference ref) { ds.setDatabaseName(getProperty(ref, "databaseName")); ds.setPassword(getProperty(ref, "password")); String port = getProperty(ref, "portNumber"); if (port != null) { ds.setPortNumber(Integer.parseInt(port)); } ds.setServerName(getProperty(ref, "serverName")); ds.setUser(getProperty(ref, "user")); String prepareThreshold = getProperty(ref, "prepareThreshold"); if (prepareThreshold != null) ds.setPrepareThreshold(Integer.parseInt(prepareThreshold)); return ds; }
private Object loadPoolingDataSource(Reference ref) { // If DataSource exists, return it String name = getProperty(ref, "dataSourceName"); PGPoolingDataSource pds = PGPoolingDataSource.getDataSource(name); if (pds != null) { return pds; } // Otherwise, create a new one pds = new PGPoolingDataSource(); pds.setDataSourceName(name); loadBaseDataSource(pds, ref); String min = getProperty(ref, "initialConnections"); if (min != null) { pds.setInitialConnections(Integer.parseInt(min)); } String max = getProperty(ref, "maxConnections"); if (max != null) { pds.setMaxConnections(Integer.parseInt(max)); } return pds; }
private Object loadPoolingDataSource(Reference ref) { // If DataSource exists, return it String name = getProperty(ref, "dataSourceName"); PGPoolingDataSource pds = PGPoolingDataSource.getDataSource(name); if (pds != null) { return pds; } // Otherwise, create a new one pds = new PGPoolingDataSource(); pds.setDataSourceName(name); loadBaseDataSource(pds, ref); String min = getProperty(ref, "initialConnections"); if (min != null) { pds.setInitialConnections(Integer.parseInt(min)); } String max = getProperty(ref, "maxConnections"); if (max != null) { pds.setMaxConnections(Integer.parseInt(max)); } return pds; }