1.数据库追踪点加上数据库连接的close操作,用于调试可能的连接泄露
This commit is contained in:
parent
0103a3dd37
commit
c488d6ee7d
|
|
@ -23,12 +23,6 @@
|
|||
<artifactId>skywalking-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ai.cloud</groupId>
|
||||
<artifactId>skywalking-auth</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
|
|
|
|||
|
|
@ -97,7 +97,14 @@ public class SWConnection implements java.sql.Connection {
|
|||
}
|
||||
|
||||
public void close() throws SQLException {
|
||||
realConnection.close();
|
||||
ConnectionTracing.execute(realConnection, connectInfo, "close", "",
|
||||
new Executable<String>() {
|
||||
public String exe(java.sql.Connection realConnection,
|
||||
String sql) throws SQLException {
|
||||
realConnection.close();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isClosed() throws SQLException {
|
||||
|
|
|
|||
Loading…
Reference in New Issue