diff --git a/vertx-oracle-client/src/main/java/io/vertx/oracleclient/impl/OracleJdbcConnection.java b/vertx-oracle-client/src/main/java/io/vertx/oracleclient/impl/OracleJdbcConnection.java index cf99b6ced..a13a99667 100644 --- a/vertx-oracle-client/src/main/java/io/vertx/oracleclient/impl/OracleJdbcConnection.java +++ b/vertx-oracle-client/src/main/java/io/vertx/oracleclient/impl/OracleJdbcConnection.java @@ -34,6 +34,8 @@ public class OracleJdbcConnection implements Connection { + private static final Logger log = LoggerFactory.getLogger(OracleJdbcConnection.class); + private final ClientMetrics metrics; private final OracleConnection connection; private final OracleMetadata metadata; @@ -104,7 +106,12 @@ public boolean isSsl() { @Override public boolean isValid() { - return true; + try { + return connection.isValid(OracleConnection.ConnectionValidation.NONE, 0); + } catch (SQLException e) { + log.trace("Failed to validate connection", e); + return false; + } } @Override