Package com.ibatis.common.jdbc.exception

Examples of com.ibatis.common.jdbc.exception.NestedSQLException


      errorContext.reset();
      sql.cleanup(request);
      notifyListeners();
    } catch (SQLException e) {
      errorContext.setCause(e);
      throw new NestedSQLException(errorContext.toString(), e
          .getSQLState(), e.getErrorCode(), e);
    } catch (Exception e) {
      errorContext.setCause(e);
      throw new NestedSQLException(errorContext.toString(), e);
    }
  }
View Full Code Here


          }
        }
      }
      return result;
    } catch (InstantiationException e) {
      throw new NestedSQLException("Error setting nested bean property.  Cause: " + e, e);
    } catch (IllegalAccessException e) {
      throw new NestedSQLException("Error setting nested bean property.  Cause: " + e, e);
    }

  }
View Full Code Here

            if (trans != null) {
                conn = trans.getConnection();
            }
            return conn;
        } catch (TransactionException e) {
            throw new NestedSQLException("Error getting Connection from Transaction.  Cause: " + e, e);
        }
    }
View Full Code Here

    public void startTransaction(SessionScope sessionScope) throws SQLException {
        DEBUG.P(this, "startTransaction(1)");
        try {
            txManager.begin(sessionScope);
        } catch (TransactionException e) {
            throw new NestedSQLException("Could not start transaction.  Cause: " + e, e);
        }

        DEBUG.P(0, this, "startTransaction(1)");
    }
View Full Code Here

     */
    public void startTransaction(SessionScope sessionScope, int transactionIsolation) throws SQLException {
        try {
            txManager.begin(sessionScope, transactionIsolation);
        } catch (TransactionException e) {
            throw new NestedSQLException("Could not start transaction.  Cause: " + e, e);
        }
    }
View Full Code Here

                    executeBatch(sessionScope);
                }
                sqlExecutor.cleanup(sessionScope);
                txManager.commit(sessionScope);
            } catch (TransactionException e) {
                throw new NestedSQLException("Could not commit transaction.  Cause: " + e, e);
            }

        } finally {//我加上的
            DEBUG.P(0, this, "commitTransaction(1)");
        }
View Full Code Here

                    sqlExecutor.cleanup(sessionScope);
                } finally {
                    txManager.end(sessionScope);
                }
            } catch (TransactionException e) {
                throw new NestedSQLException("Error while ending transaction.  Cause: " + e, e);
            }

        } finally {//我加上的
            DEBUG.P(0, this, "endTransaction(1)");
        }
View Full Code Here

                    }
                }
            }
            return result;
        } catch (InstantiationException e) {
            throw new NestedSQLException("Error setting nested bean property.  Cause: " + e, e);
        } catch (IllegalAccessException e) {
            throw new NestedSQLException("Error setting nested bean property.  Cause: " + e, e);
        }

    }
View Full Code Here

            sql.cleanup(statementScope);
            notifyListeners();
            return rows;
        } catch (SQLException e) {
            errorContext.setCause(e);
            throw new NestedSQLException(errorContext.toString(), e.getSQLState(), e.getErrorCode(), e);
        } catch (Exception e) {
            errorContext.setCause(e);
            throw new NestedSQLException(errorContext.toString(), e);
        }
    }
View Full Code Here

                object = list.get(0);
            }

            return object;
        } catch (TransactionException e) {
            throw new NestedSQLException("Error getting Connection from Transaction.  Cause: " + e, e);
        }
    }
View Full Code Here

TOP

Related Classes of com.ibatis.common.jdbc.exception.NestedSQLException

Copyright © 2018 www.massapicom. 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.