Package jodd.jtx

Examples of jodd.jtx.JtxTransaction.rollback()


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

    try {
      ReflectUtil.invokeDeclared(app, "destroy", new Class[] {MadvocConfig.class}, new Object[] {null});
    } catch (Exception ex) {
View Full Code Here


    assertEquals(1, query.executeUpdate());
    query = new DbQuery(session, "insert into GIRL values(5, 'Annita', 'bartender')");
    assertEquals(1, query.executeUpdate());

    // rollback
    tx.rollback();

    // check !!!
    session = new DbSession(cp);

    DbQuery query2 = new DbQuery(session, "select count(*) from GIRL");
View Full Code Here

      executeCount(session1, "select count(*) from GIRL");
      fail();
    } catch (JtxException ignore) {

    }
    tx1.rollback();
  }


  // ---------------------------------------------------------------- thread
  @Test
View Full Code Here

    }

    assertTrue(tx.isCommitted());

    try {
      tx.rollback();
      fail("exception is already committed!");
    } catch (Exception ignore) {
    }

    tx = manager.requestTransaction(new JtxTransactionMode().propagationSupports());
View Full Code Here

    }

    tx = manager.requestTransaction(new JtxTransactionMode().propagationSupports());

    try {
      tx.rollback();
    } catch (Exception ex) {
      fail(ex.toString());
    }

    tx = manager.requestTransaction(new JtxTransactionMode().propagationSupports());
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.