jmx enhance

This commit is contained in:
wenshao
2012-01-06 15:28:51 +08:00
parent cb7d672b13
commit 4aeadfb878
2 changed files with 20 additions and 0 deletions
@@ -955,6 +955,22 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
public void setDriver(Driver driver) {
this.driver = driver;
}
public int getDriverMajorVersion() {
if (this.driver == null) {
return -1;
}
return this.driver.getMajorVersion();
}
public int getDriverMinorVersion() {
if (this.driver == null) {
return -1;
}
return this.driver.getMinorVersion();
}
public ExceptionSorter getExceptionSorter() {
return exceptionSorter;
@@ -150,4 +150,8 @@ public interface DruidAbstractDataSourceMBean {
boolean isUseOracleImplicitCache();
void setUseOracleImplicitCache(boolean useOracleImplicitCache);
int getDriverMajorVersion();
int getDriverMinorVersion();
}