Пример #1
0
  public Connection getConnection() throws SQLException {

    if (!m_bInTransaction) {
      ensureConnection();
    }
    return m_c;
  }
Пример #2
0
  public void begin() throws SQLException {

    if (m_bInTransaction) {
      throw new SQLException("Already in transaction");
    } else {
      ensureConnection();
      m_c.setAutoCommit(false);
      m_bInTransaction = true;
    }
  }