Browse Source

无JIRA任务 抛错

10.0
daniel 7 years ago
parent
commit
afd0edbcd5
  1. 26
      fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSource.java

26
fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSource.java

@ -1248,19 +1248,21 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
.append(", active " + activeCount)//
.append(", maxActive " + maxActive)//
;
List<JdbcSqlStatValue> sqlList = this.getDataSourceStat().getRuningSqlList();
for (int i = 0; i < sqlList.size(); ++i) {
if (i != 0) {
buf.append('\n');
} else {
buf.append(", ");
JdbcDataSourceStat sourceStat = this.getDataSourceStat();
if(sourceStat != null) {
List<JdbcSqlStatValue> sqlList = sourceStat.getRuningSqlList();
for (int i = 0; i < sqlList.size(); ++i) {
if (i != 0) {
buf.append('\n');
} else {
buf.append(", ");
}
JdbcSqlStatValue sql = sqlList.get(i);
buf.append("runningSqlCount ");
buf.append(sql.getRunningCount());
buf.append(" : ");
buf.append(sql.getSql());
}
JdbcSqlStatValue sql = sqlList.get(i);
buf.append("runningSqlCount ");
buf.append(sql.getRunningCount());
buf.append(" : ");
buf.append(sql.getSql());
}
String errorMessage = buf.toString();
throw new GetConnectionTimeoutException(errorMessage);

Loading…
Cancel
Save