in storage-jdbc/src/main/java/org/apache/rocketmq/schema/registry/storage/jdbc/dialect/GenericDatabaseDialect.java [196:209]
public Connection getConnection() throws SQLException {
try {
if (connection == null) {
newConnection();
} else if (!isConnectionValid(connection, VALIDITY_CHECK_TIMEOUT_S)) {
log.info("The database connection is invalid. Reconnecting...");
close();
newConnection();
}
} catch (SQLException sqle) {
throw new SchemaException("Get database is failed", sqle);
}
return connection;
}