public void releaseSavepoint(Savepoint savepoint) throws SQLException { long start = System.currentTimeMillis(); try { super.releaseSavepoint(savepoint); } finally { if (_logs.isJDBCEnabled()) { String name = null; try { name = savepoint.getSavepointName(); } catch (SQLException sqe) { name = String.valueOf(savepoint.getSavepointId()); } _logs.logJDBC("release: " + name, start, this); } handleSQLWarning(); } }
public void rollback(Savepoint savepoint) throws SQLException { long start = System.currentTimeMillis(); try { super.rollback(savepoint); } finally { if (_logs.isJDBCEnabled()) { String name = null; try { name = savepoint.getSavepointName(); } catch (SQLException sqe) { name = String.valueOf(savepoint.getSavepointId()); } _logs.logJDBC("rollback: " + name, start, this); } handleSQLWarning(); } }
public Savepoint setSavepoint(String name) throws SQLException { long start = System.currentTimeMillis(); try { return super.setSavepoint(name); } finally { if (_logs.isJDBCEnabled()) _logs.logJDBC("savepoint: " + name, start, this); handleSQLWarning(); } }
/** * Handle any {@link SQLWarning}s on the current {@link Connection}. * Chain throwed SQLWarnings to SQLException. * @see #handleSQLWarning(SQLWarning) */ private void handleSQLErrors(SQLException err) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(getWarnings()); } catch (SQLException warning) { if (err != null) err.setNextException(warning); else throw warning; } finally { clearWarnings(); } }
/** * Handle any {@link SQLWarning}s on the current {@link Connection}. * Chain throwed SQLWarnings to SQLException. * @see #handleSQLWarning(SQLWarning) */ private void handleSQLErrors(SQLException err) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(getWarnings()); } catch (SQLException warning) { if (err != null) err.setNextException(warning); else throw warning; } finally { clearWarnings(); } }
/** * Handle any {@link SQLWarning}s on the specified {@link Statement}. * Chain throwed SQLWarnings to SQLException. * * @see #handleSQLWarning(SQLWarning) */ private void handleSQLErrors(Statement stmnt, SQLException err) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(stmnt.getWarnings()); } catch (SQLException warning) { if (err != null) err.setNextException(warning); else throw warning; } finally { stmnt.clearWarnings(); } }
/** * Handle any {@link SQLWarning}s on the specified {@link Statement}. * Chain throwed SQLWarnings to SQLException. * * @see #handleSQLWarning(SQLWarning) */ private void handleSQLErrors(Statement stmnt, SQLException err) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(stmnt.getWarnings()); } catch (SQLException warning) { if (err != null) err.setNextException(warning); else throw warning; } finally { stmnt.clearWarnings(); } }
/** * Handle any {@link SQLWarning}s on the specified {@link ResultSet}. * Chain throwed SQLWarnings to SQLException. * * @see #handleSQLWarning(SQLWarning) */ private void handleSQLErrors(ResultSet rs, SQLException err) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(rs.getWarnings()); } catch (SQLException warning){ if (err != null) err.setNextException(warning); else throw warning; } finally { rs.clearWarnings(); } }
/** * Handle any {@link SQLWarning}s on the current {@link Connection}. * Chain throwed SQLWarnings to SQLException. * @see #handleSQLWarning(SQLWarning) */ private void handleSQLErrors(SQLException err) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(getWarnings()); } catch (SQLException warning) { if (err != null) err.setNextException(warning); else throw warning; } finally { clearWarnings(); } }
protected PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws SQLException { try { PreparedStatement stmnt = super.prepareStatement (sql, resultSetType, resultSetConcurrency, resultSetHoldability, false); handleSQLWarning(); return new LoggingPreparedStatement(stmnt, sql); } catch (SQLException se) { throw wrap(se, sql); } }
/** * Handle any {@link SQLWarning}s on the specified {@link Statement}. * * @see #handleSQLWarning(SQLWarning) */ private void handleSQLWarning(Statement stmnt) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(stmnt.getWarnings()); } finally { stmnt.clearWarnings(); } }
/** * Handle any {@link SQLWarning}s on the current {@link Connection}. * * @see #handleSQLWarning(SQLWarning) */ private void handleSQLWarning() throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(getWarnings()); } finally { clearWarnings(); } }
protected PreparedStatement prepareStatement(String sql, String[] columnNames, boolean wrap) throws SQLException { try { PreparedStatement stmnt = super.prepareStatement (sql, columnNames, false); handleSQLWarning(); return new LoggingPreparedStatement(stmnt, sql); } catch (SQLException se) { throw wrap(se, sql); } }
public void rollback() throws SQLException { long start = System.currentTimeMillis(); try { super.rollback(); } finally { if (_logs.isJDBCEnabled()) _logs.logJDBC("rollback", start, this); handleSQLWarning(); } }
/** * Handle any {@link SQLWarning}s on the specified {@link ResultSet}. * * @see #handleSQLWarning(SQLWarning) */ private void handleSQLWarning(ResultSet rs) throws SQLException { if (_warningAction == WARN_IGNORE) return; try { handleSQLWarning(rs.getWarnings()); } finally { rs.clearWarnings(); } }
public void commit() throws SQLException { long start = System.currentTimeMillis(); try { super.commit(); } finally { if (_logs.isJDBCEnabled()) _logs.logJDBC("commit", start, this); handleSQLWarning(); } }
protected PreparedStatement prepareStatement(String sql, int[] columnIndexes, boolean wrap) throws SQLException { try { PreparedStatement stmnt = super.prepareStatement (sql, columnIndexes, false); handleSQLWarning(); return new LoggingPreparedStatement(stmnt, sql); } catch (SQLException se) { throw wrap(se, sql); } }
protected PreparedStatement prepareStatement(String sql, int autoGeneratedKeys, boolean wrap) throws SQLException { try { PreparedStatement stmnt = super.prepareStatement (sql, autoGeneratedKeys, false); handleSQLWarning(); return new LoggingPreparedStatement(stmnt, sql); } catch (SQLException se) { throw wrap(se, sql); } }
public Savepoint setSavepoint() throws SQLException { long start = System.currentTimeMillis(); try { return super.setSavepoint(); } finally { if (_logs.isJDBCEnabled()) _logs.logJDBC("savepoint", start, this); handleSQLWarning(); } }
protected Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws SQLException { Statement stmnt = super.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability, false); handleSQLWarning(); return new LoggingStatement(stmnt); }