Package jodd.db.jtx

Examples of jodd.db.jtx.DbJtxTransaction.commit()


    assertTotals(0, 0);
    DbJtxTransaction tx = dbtxm.requestTransaction(new JtxTransactionMode().propagationRequired());
    assertTotals(1, 1);
    s0 = tx.requestResource();
    service0_1(tx);
    tx.commit();
    assertTotals(0, 0);
  }

  void service0_1(JtxTransaction uptx) {
    assertTotals(1, 1);
View Full Code Here


    assertTotals(1, 1);
    DbJtxTransaction tx = dbtxm.requestTransaction(new JtxTransactionMode().propagationRequiresNew());
    assertTotals(2, 2);
    assertNotSame(tx1, tx);
    assertNotSame(s1, tx.requestResource());
    tx.commit();
    assertTotals(1, 1);
  }

  // service #3 REQUIRED
  void service3(JtxTransaction tx1) {
View Full Code Here

    DbJtxTransaction tx = dbtxm.requestTransaction(new JtxTransactionMode().propagationNotSupported());
    assertNotSame(tx3, tx);
    assertTotals(2, 1);
    assertNotSame(s1, tx.requestResource());
    assertNotSame(s1, tx.requestResource());
    tx.commit();
    assertTotals(1, 1);
  }


  // ---------------------------------------------------------------- util
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.