Package com.avaje.ebean

Examples of com.avaje.ebean.Transaction.rollback()


    } finally {
      Transaction tx = getServer().currentTransaction();
      if (tx != null && tx.isActive()) {
        // transaction left running after the test, rollback it to make
        // the environment ready for the next test
        tx.rollback();
      }
    }
  }

  public EbeanServer getServer() {
View Full Code Here


    TWithPreInsert e2 = new TWithPreInsert();
    e2.setTitle("Mister Transaction2");
    Ebean.save(e2);

    tx2.rollback();

    assertNotNull(MyTestTransactionEventListener.getLastCommitted());
    assertNotNull(MyTestTransactionEventListener.getLastRollbacked());

    assertNotSame(MyTestTransactionEventListener.getLastCommitted(), MyTestTransactionEventListener.getLastRollbacked());
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.