public static boolean validateConnection(DataSource dataSource) {
        try (final Connection connection = dataSource.getConnection()) {
            return true;
        } catch (SQLException e) {
            final Throwable cause = e.getCause();
            final String errorMsg = cause != null
                    ? cause.getMessage()
                    : e.getMessage();
            final int vendorCode = e.getErrorCode();
            throw new RuntimeException(LogUtil.message(
                    "Unable to establish database connection due to error: [{}] and vendorCode [{}].",
                    errorMsg, vendorCode));
        }
    }
Attempts to connect to the database using the passed connection details. If it fails
it will log a warning, and keep retrying. The retry interval will steadily increase.
<p>
If the connection could not be established and the reason for the failure makes a
retry pointless, e.g. invalid password, then an exception will be thrown.
stroom-db-util/src/main/java/stroom/db/util/DbUtil.java