Package com.ibatis.dao.client

Examples of com.ibatis.dao.client.DaoTransaction


    return (DaoTransaction) transaction.get();
  }

  public void startTransaction() {
    if (state.get() != DaoTransactionState.ACTIVE) {
      DaoTransaction trans = transactionManager.startTransaction();
      transaction.set(trans);
      state.set(DaoTransactionState.ACTIVE);
      daoManager.addContextInTransaction(this);
    }
  }
View Full Code Here


      daoManager.addContextInTransaction(this);
    }
  }

  public void commitTransaction() {
    DaoTransaction trans = (DaoTransaction) transaction.get();
    if (state.get() == DaoTransactionState.ACTIVE) {
      transactionManager.commitTransaction(trans);
      state.set(DaoTransactionState.COMMITTED);
    } else {
      state.set(DaoTransactionState.INACTIVE);
View Full Code Here

      state.set(DaoTransactionState.INACTIVE);
    }
  }

  public void endTransaction() {
    DaoTransaction trans = (DaoTransaction) transaction.get();
    if (state.get() == DaoTransactionState.ACTIVE) {
      try {
        transactionManager.rollbackTransaction(trans);
      } finally {
        state.set(DaoTransactionState.ROLLEDBACK);
View Full Code Here

   * DaoTransaction that this Dao is working under.
   *
   * @return A JDBC Connection instance.
   */
  protected Connection getConnection() {
    DaoTransaction trans = daoManager.getTransaction(this);
    if (!(trans instanceof ConnectionDaoTransaction)) {
      throw new DaoException("The DAO manager of type " + daoManager.getClass().getName() +
          " cannot supply a JDBC Connection for this template, and is therefore not" +
          "supported by JdbcDaoTemplate.");
    }
View Full Code Here

   * DaoTransaction that this Dao is working under.
   *
   * @return A JDBC Connection instance.
   */
  protected Connection getConnection() {
    DaoTransaction trans = daoManager.getTransaction(this);
    if (!(trans instanceof ConnectionDaoTransaction)) {
      throw new DaoException("The DAO manager of type " + daoManager.getClass().getName() +
          " cannot supply a JDBC Connection for this template, and is therefore not" +
          "supported by JdbcDaoTemplate.");
    }
View Full Code Here

    return (DaoTransaction) transaction.get();
  }

  public void startTransaction() {
    if (state.get() != DaoTransactionState.ACTIVE) {
      DaoTransaction trans = transactionManager.startTransaction();
      transaction.set(trans);
      state.set(DaoTransactionState.ACTIVE);
      daoManager.addContextInTransaction(this);
    }
  }
View Full Code Here

      daoManager.addContextInTransaction(this);
    }
  }

  public void commitTransaction() {
    DaoTransaction trans = (DaoTransaction) transaction.get();
    if (state.get() == DaoTransactionState.ACTIVE) {
      transactionManager.commitTransaction(trans);
      state.set(DaoTransactionState.COMMITTED);
    } else {
      state.set(DaoTransactionState.INACTIVE);
View Full Code Here

      state.set(DaoTransactionState.INACTIVE);
    }
  }

  public void endTransaction() {
    DaoTransaction trans = (DaoTransaction) transaction.get();
    if (state.get() == DaoTransactionState.ACTIVE) {
      try {
        transactionManager.rollbackTransaction(trans);
      } finally {
        state.set(DaoTransactionState.ROLLEDBACK);
View Full Code Here

TOP

Related Classes of com.ibatis.dao.client.DaoTransaction

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.