|
|
|
@ -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); |
|
|
|
|