This commit is contained in:
wenshao
2011-12-22 20:13:05 +08:00
parent 447a709ef7
commit a04b6faa3b
17 changed files with 384 additions and 22 deletions
@@ -197,6 +197,12 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
private ObjectName objectName;
protected Exception createError = null;
public Exception getCreateError() {
return createError;
}
public boolean isDupCloseLogEnable() {
return dupCloseLogEnable;
}
@@ -1137,11 +1143,14 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
}
dataSource.validateConnection(conn);
dataSource.createError = null;
} catch (SQLException ex) {
dataSource.createErrorCount++;
dataSource.createError = ex;
throw ex;
} catch (RuntimeException ex) {
dataSource.createErrorCount++;
dataSource.createError = ex;
throw ex;
} catch (Error ex) {
dataSource.createErrorCount++;