This commit is contained in:
wenshao
2011-12-21 09:43:14 +08:00
parent df7079708c
commit bdba952244
2 changed files with 3 additions and 3 deletions
@@ -50,7 +50,7 @@ public class HADataSource extends MultiDataSource implements HADataSourceMBean,
}
public void setMaster(DataSourceHolder master) {
this.getDataSources().put("master", master);
this.addDataSource("master", master);
this.master = master;
}
@@ -63,7 +63,7 @@ public class HADataSource extends MultiDataSource implements HADataSourceMBean,
}
public void setSlave(DataSourceHolder slave) {
this.getDataSources().put("slave", slave);
this.addDataSource("slave", slave);
this.slave = slave;
}
@@ -258,7 +258,7 @@ public abstract class MultiDataSource extends DataSourceAdapter implements Multi
public void addDataSource(String name, DataSourceHolder dataSourceHolder) {
dataSources.put(name, dataSourceHolder);
this.totalWeight += dataSourceHolder.getWeight();
this.computeTotalWeight();
}
public Properties getProperties() {