Examples of maybeCommitTransaction()


Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    executeUpdate(session, "insert into GIRL values(1, 'Sophia', null)");
    assertTrue(jtx.isActive());
    assertFalse(jtx.isCommitted());
    assertFalse(jtx.isNoTransaction());
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
    assertTrue(jtx.isCommitted());
    assertFalse(jtx.isNoTransaction());

    // session #2: required - rollback
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    JtxTransaction jtx2 = worker.maybeRequestTransaction(required(), CTX_2);
    assertNull(jtx2);
    DbSession session2 = sessionProvider.getDbSession();
    assertSame(session1, session2);
    executeUpdate(session2, "insert into GIRL values(2, 'Gloria', null)");
    assertFalse(worker.maybeCommitTransaction(jtx2));
    assertTrue(jtx.isActive());

    // session #1: commit
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    executeUpdate(session2, "insert into GIRL values(2, 'Gloria', null)");
    assertFalse(worker.maybeCommitTransaction(jtx2));
    assertTrue(jtx.isActive());

    // session #1: commit
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
    assertTrue(jtx.isCommitted());

    // test
    session1 = new DbSession(cp);
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    JtxTransaction jtx2 = worker.maybeRequestTransaction(required(), CTX_2);
    assertNotNull(jtx2);
    DbSession session2 = sessionProvider.getDbSession();
    assertNotSame(session1, session2);
    executeUpdate(session2, "insert into GIRL values(2, 'Gloria', null)");
    assertTrue(worker.maybeCommitTransaction(jtx2));
    assertFalse(jtx2.isActive());

    // session #1: rollback
    assertTrue(worker.markOrRollbackTransaction(jtx, null));
    assertFalse(jtx.isActive());
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    executeUpdate(session, "insert into GIRL values(1, 'Sophia', null)");
    assertFalse(jtx.isActive());
    assertFalse(jtx.isCommitted());
    assertTrue(jtx.isNoTransaction());
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
    assertTrue(jtx.isCommitted());

    // session #2: required - rollback
    jtx = worker.maybeRequestTransaction(supports(), CTX_2);
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    JtxTransaction jtx2 = worker.maybeRequestTransaction(supports(), CTX_2);
    assertNull(jtx2);
    DbSession session2 = sessionProvider.getDbSession();
    assertSame(session1, session2);
    executeUpdate(session2, "insert into GIRL values(2, 'Gloria', null)");
    assertFalse(worker.maybeCommitTransaction(jtx2));
    assertTrue(jtx.isActive());

    // session #1: commit
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    executeUpdate(session2, "insert into GIRL values(2, 'Gloria', null)");
    assertFalse(worker.maybeCommitTransaction(jtx2));
    assertTrue(jtx.isActive());

    // session #1: commit
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
    assertTrue(jtx.isCommitted());

    // test
    session1 = new DbSession(cp);
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    JtxTransaction jtx2 = worker.maybeRequestTransaction(supports(), CTX_2);
    assertNull(jtx2);
    DbSession session2 = sessionProvider.getDbSession();
    assertSame(session1, session2);
    executeUpdate(session2, "insert into GIRL values(2, 'Gloria', null)");
    assertFalse(worker.maybeCommitTransaction(jtx2));
    assertFalse(jtx.isActive());

    // session #1: commit
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    executeUpdate(session2, "insert into GIRL values(2, 'Gloria', null)");
    assertFalse(worker.maybeCommitTransaction(jtx2));
    assertFalse(jtx.isActive());

    // session #1: commit
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
    assertTrue(jtx.isCommitted());

    // test
    session1 = new DbSession(cp);
View Full Code Here

Examples of jodd.jtx.worker.LeanJtxWorker.maybeCommitTransaction()

    DbSession session = sessionProvider.getDbSession();

    executeUpdate(session, "insert into GIRL values(1, 'Sophia', null)");
    assertFalse(jtx.isActive());
    assertTrue(jtx.isNoTransaction());
    assertTrue(worker.maybeCommitTransaction(jtx));
    assertFalse(jtx.isActive());
    assertTrue(jtx.isCommitted());

    // session #2: not supported - rollback
    jtx = worker.maybeRequestTransaction(notSupported(), CTX_2);
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.