/** * General purpose handling of warnings associated with a JDBC {@link Connection}. * * @param connection The JDBC connection potentially containing warnings * @param handler The handler for each individual warning in the stack. * * @see #walkWarnings */ @SuppressWarnings({"ThrowableResultOfMethodCallIgnored"}) public void handleAndClearWarnings( Connection connection, WarningHandler handler) { try { if ( logWarnings ) { walkWarnings( connection.getWarnings(), handler ); } } catch (SQLException sqle) { // workaround for WebLogic LOG.debug( "could not log warnings", sqle ); } try { // Sybase fail if we don't do that, sigh... connection.clearWarnings(); } catch (SQLException sqle) { LOG.debug( "could not clear warnings", sqle ); } }
walkWarnings( statement.getWarnings(), handler );
/** * General purpose handling of warnings associated with a JDBC {@link Connection}. * * @param connection The JDBC connection potentially containing warnings * @param handler The handler for each individual warning in the stack. * @see #walkWarnings */ @SuppressWarnings( {"ThrowableResultOfMethodCallIgnored"} ) public void handleAndClearWarnings( Connection connection, WarningHandler handler ) { try { walkWarnings(connection.getWarnings(), handler); } catch (SQLException sqle) { // workaround for WebLogic LOG.debug("could not log warnings", sqle); } try { // Sybase fail if we don't do that, sigh... connection.clearWarnings(); } catch (SQLException sqle) { LOG.debug("could not clear warnings", sqle); } }
/** * General purpose handling of warnings associated with a JDBC {@link Connection}. * * @param connection The JDBC connection potentially containing warnings * @param handler The handler for each individual warning in the stack. * @see #walkWarnings */ @SuppressWarnings( {"ThrowableResultOfMethodCallIgnored"} ) public void handleAndClearWarnings( Connection connection, WarningHandler handler ) { try { walkWarnings(connection.getWarnings(), handler); } catch (SQLException sqle) { // workaround for WebLogic LOG.debug("could not log warnings", sqle); } try { // Sybase fail if we don't do that, sigh... connection.clearWarnings(); } catch (SQLException sqle) { LOG.debug("could not clear warnings", sqle); } }
/** * General purpose handling of warnings associated with a JDBC {@link Connection}. * * @param connection The JDBC connection potentially containing warnings * @param handler The handler for each individual warning in the stack. * * @see #walkWarnings */ @SuppressWarnings({"ThrowableResultOfMethodCallIgnored"}) public void handleAndClearWarnings( Connection connection, WarningHandler handler) { try { if ( logWarnings ) { walkWarnings( connection.getWarnings(), handler ); } } catch (SQLException sqle) { // workaround for WebLogic LOG.debug( "could not log warnings", sqle ); } try { // Sybase fail if we don't do that, sigh... connection.clearWarnings(); } catch (SQLException sqle) { LOG.debug( "could not clear warnings", sqle ); } }
/** * General purpose handling of warnings associated with a JDBC {@link Statement}. * * @param statement The JDBC statement potentially containing warnings * @param handler The handler for each individual warning in the stack. * @see #walkWarnings */ @SuppressWarnings( {"ThrowableResultOfMethodCallIgnored"} ) public void handleAndClearWarnings( Statement statement, WarningHandler handler ) { try { walkWarnings(statement.getWarnings(), handler); } catch (SQLException sqlException) { // workaround for WebLogic LOG.debug("could not log warnings", sqlException); } try { // Sybase fail if we don't do that, sigh... statement.clearWarnings(); } catch (SQLException sqle) { LOG.debug("could not clear warnings", sqle); } }
/** * General purpose handling of warnings associated with a JDBC {@link Statement}. * * @param statement The JDBC statement potentially containing warnings * @param handler The handler for each individual warning in the stack. * @see #walkWarnings */ @SuppressWarnings( {"ThrowableResultOfMethodCallIgnored"} ) public void handleAndClearWarnings( Statement statement, WarningHandler handler ) { try { walkWarnings(statement.getWarnings(), handler); } catch (SQLException sqlException) { // workaround for WebLogic LOG.debug("could not log warnings", sqlException); } try { // Sybase fail if we don't do that, sigh... statement.clearWarnings(); } catch (SQLException sqle) { LOG.debug("could not clear warnings", sqle); } }
walkWarnings( statement.getWarnings(), handler );