Package java.sql

Examples of java.sql.Connection.rollback()


            doUpdateInsertDeleteWaehler(c);
            c.rollback();

            if (!autocommit) {
                doCreateTableTest(c);
                c.rollback();
            }

            c.close();

            c = null;
View Full Code Here


            }

        } catch (Exception e) {
            if (transaction == null && connection != null && this.batch) {
                try {
                    connection.rollback();
                } catch (Exception e2) {
                    log("Error rolling back JDBC connection.", e2);
                }
            }
            if (e instanceof ServletException) {
View Full Code Here

                        valid = true;
                    } else {
                        valid = false;
                    }
                    if (_rollbackAfterValidation) {
                        conn.rollback();
                    }
                } catch(Exception e) {
                    valid = false;
                } finally {
                    if (rset != null) {
View Full Code Here

    public void passivateObject(Object obj) throws Exception {
        if(obj instanceof Connection) {
            Connection conn = (Connection)obj;
            if(!conn.getAutoCommit() && !conn.isReadOnly()) {
                conn.rollback();
            }
            conn.clearWarnings();
            if(!conn.getAutoCommit()) {
                conn.setAutoCommit(true);
            }
View Full Code Here

        Logger.error(username, this.getClass().getName(),
                     "insertSaleDocRowDiscount", "Error while inserting a new item discount", ex);
        try {
          if (this.conn==null && conn!=null)
            // rollback only local connection
            conn.rollback();
        }
        catch (Exception ex3) {
        }
        throw ex;
      }
View Full Code Here

    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while updating an existing employee",ex);
      try {
        if (this.conn==null && conn!=null)
          // rollback only local connection
          conn.rollback();
      }
      catch (Exception ex3) {
      }
      throw new Exception(ex.getMessage());
    }
View Full Code Here

    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while updating employee calendars",ex);
      try {
        if (this.conn==null && conn!=null)
          // rollback only local connection
          conn.rollback();
      }
      catch (Exception ex3) {
      }
      throw new Exception(ex.getMessage());
    }
View Full Code Here

    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while validating employee code",ex);
      try {
        if (this.conn==null && conn!=null)
          // rollback only local connection
          conn.rollback();
      }
      catch (Exception ex3) {
      }

      throw new Exception(ex.getMessage());
View Full Code Here

      Logger.error(username, this.getClass().getName(),
                   "executeCommand", "Error while inserting a new employee", ex);
      try {
        if (this.conn==null && conn!=null)
          // rollback only local connection
          conn.rollback();
      }
      catch (Exception ex3) {
      }
      throw new Exception(ex.getMessage());
    }
View Full Code Here

    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while deleting an existing employee",ex);
      try {
        if (this.conn==null && conn!=null)
          // rollback only local connection
          conn.rollback();
      }
      catch (Exception ex3) {
      }
      throw new Exception(ex.getMessage());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.