This commit is contained in:
温少
2012-03-20 06:14:06 +08:00
parent a26954e672
commit aaa2e474a5
8 changed files with 53 additions and 38 deletions
@@ -60,11 +60,14 @@ public class DataSourceProxyImpl implements DataSourceProxy, DataSourceProxyImpl
private final AtomicLong resultSetIdSeed = new AtomicLong(50000);
private final AtomicLong transactionIdSeed = new AtomicLong(0);
private final JdbcDataSourceStat dataSourceStat;
public DataSourceProxyImpl(Driver rawDriver, DataSourceProxyConfig config){
super();
this.rawDriver = rawDriver;
this.config = config;
this.dbType = JdbcUtils.getDbType(config.getRawUrl(), config.getRawDriverClassName());
this.dataSourceStat = new JdbcDataSourceStat(config.getName(), config.getUrl());
}
public String getDbType() {
@@ -370,4 +373,9 @@ public class DataSourceProxyImpl implements DataSourceProxy, DataSourceProxyImpl
public long createTransactionId() {
return transactionIdSeed.getAndIncrement();
}
public JdbcDataSourceStat getDataSourceStat() {
return dataSourceStat;
}
}