public DataSourcePool getDataSource(String name, DataSourceConfig dsConfig){ if (name == null){ throw new IllegalArgumentException("name not defined"); } synchronized(monitor){ DataSourcePool pool = dsMap.get(name); if (pool == null){ if (dsConfig == null){ dsConfig = new DataSourceConfig(); dsConfig.loadSettings(name); } pool = new DataSourcePool(this, name, dsConfig); dsMap.put(name, pool); } return pool; } }
public DataSourcePool getDataSource(String name, DataSourceConfig dsConfig){ if (name == null){ throw new IllegalArgumentException("name not defined"); } synchronized(monitor){ DataSourcePool pool = dsMap.get(name); if (pool == null){ if (dsConfig == null){ dsConfig = new DataSourceConfig(); dsConfig.loadSettings(name); } pool = new DataSourcePool(this, name, dsConfig); dsMap.put(name, pool); } return pool; } }
ds.loadSettings("iris");
dataSourceConfig = new DataSourceConfig(); dataSourceConfig.loadSettings(p.getServerName());
dataSourceConfig = new DataSourceConfig(); dataSourceConfig.loadSettings(p.getServerName());