Package jodd.jtx

Examples of jodd.jtx.JtxTransaction.commit()


      System.out.println(StringUtil.repeat('-', 55) + " start");
      System.out.println("\n\n");
      run();
      System.out.println("\n\n");
      System.out.println(StringUtil.repeat('-', 55) + " end");
      tx.commit();
    } catch (Throwable throwable) {
      throwable.printStackTrace();
      tx.rollback();
    }
View Full Code Here


    assertEquals(0, dbtxm.totalThreadTransactions());
    service0();
    JtxTransaction tx1 = service1();
    service2(tx1);
    service3(tx1);
    tx1.commit();
    assertTotals(0, 0);
  }


  // ---------------------------------------------------------------- service layer
View Full Code Here

        count[0]++;
        assertEquals(count[0], manager.totalTransactions());
        assertEquals(1, manager.totalTransactions());
        assertEquals(1, manager.totalThreadTransactions());
        ThreadUtil.sleep(1000);
        tx.commit();
        count[0]--;
      }
    }.start();
    ThreadUtil.sleep(500);
    new Thread() {
View Full Code Here

        count[0]++;
        assertEquals(count[0], manager.totalTransactions());
        assertEquals(2, manager.totalTransactions());
        assertEquals(1, manager.totalThreadTransactions());
        ThreadUtil.sleep(1000);
        tx.commit();
        count[0]--;
      }
    }.start();
  }
View Full Code Here

    JtxTransaction tx = manager.requestTransaction(new JtxTransactionMode().propagationSupports());
    assertTrue(tx.isNoTransaction());

    try {
      tx.commit();
    } catch (Exception ignore) {
      fail();
    }

    assertTrue(tx.isCommitted());
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.