in old/dekaf-core/src/main/java/org/jetbrains/dekaf/jdbc/JdbcIntermediateSession.java [177:205]
public long ping() {
if (myClosed) throw new DBSessionIsClosedException("The session is closed.");
long time1 = System.currentTimeMillis();
boolean ok = false;
try {
if (myConnection.isClosed()) throw new DBSessionIsClosedException("The JDBC connection is closed.");
final Statement statement = myConnection.createStatement();
try {
performPing(statement);
ok = true;
}
finally {
statement.close();
}
}
catch (SQLException sqle) {
throw myExceptionRecognizer.recognizeException(sqle, "ping");
}
finally {
if (!ok) close();
}
long duration = System.currentTimeMillis() - time1;
if (duration == 0L) duration = 1L;
return duration;
}