public static void setInteger(final PreparedStatement ps,
                                  final int parameterIndex,
                                  final Integer val) throws SQLException {
        if (val == null) {
            ps.setNull(parameterIndex, Types.INTEGER);
        } else {
            ps.setInt(parameterIndex, val);
        }
    }
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