Package org.helidb.txn

Examples of org.helidb.txn.Transaction.commit()


          injectCannotCommit(txn.getCollaborator(db2));

          try
          {
            txn.commit();
            fail();
          }
          catch (UnableToCommitException e)
          {
            assertTrue(e.getMessage().contains("inject"));
View Full Code Here


    {
      db.fasterInsert(Integer.valueOf(1), Long.valueOf(2));
      db.fasterInsert(Integer.valueOf(123), Long.valueOf(234));
      assertEquals(Long.valueOf(2), db.get(Integer.valueOf(1)));
      assertEquals(Long.valueOf(234), db.get(Integer.valueOf(123)));
      txn.commit();
      successful = true;
    }
    catch (RuntimeException e)
    {
      e.printStackTrace();
View Full Code Here

        assertNull(db.get(Integer.valueOf(3)));
      }
      finally
      {
        txn.commit();
      }

      txn = Transaction.startTransaction(true);
      try
      {
View Full Code Here

        tearDownDatabase(db);
        destroyed = true;
        committed = true;
        try
        {
          txn.commit();
        }
        catch (IllegalStateException e)
        {
          // ok
        }
View Full Code Here

      Transaction txn = Transaction.startTransaction(false);
      try
      {
        db.insert(1, 10L);
        db.insert(2, 20L);
        txn.commit();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
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.