Package org.helidb.txn

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


              tdb.joinTransaction(false);
              ((AtomicBoolean) mp.get("flag1")).set(true);
            }
            finally
            {
              txn.rollback();
            }
          }
          finally
          {
            if (l1 != null)
View Full Code Here


                // Still not set
                assertFalse(((AtomicBoolean) mp.get("flag1")).get());
              }
              finally
              {
                txn.rollback();
              }
            }
            finally
            {
              if (l1 != null)
View Full Code Here

                tdb2.joinTransaction(false);
                ((AtomicBoolean) mp.get("flag1")).set(true);
              }
              finally
              {
                txn.rollback();
              }
            }
            finally
            {
              if (l1 != null)
View Full Code Here

        }
        finally
        {
          if (txn != null)
          {
            txn.rollback();
          }
        }

        // Verify that nothing was updated in the databases
        txn = Transaction.startTransaction(true);
View Full Code Here

          assertEquals("value1", db2.get("key1"));
          assertNull(db2.get("key11"));
        }
        finally
        {
          txn.rollback();
        }
      }
      finally
      {
        tearDownDatabase(db2);
View Full Code Here

      }
      finally
      {
        if (!txn.isFinished())
        {
          txn.rollback();
        }
      }
    }
    finally
    {
View Full Code Here

    // several databases.
    if (txn != null)
    {
      if (!txn.isFinished())
      {
        txn.rollback();
      }
    }

    db.close();
    Directory d = m_dbDirs.remove(System.identityHashCode(db));
View Full Code Here

    }
    finally
    {
      if (!successful && !txn.isFinished())
      {
        txn.rollback();
      }
    }
    assertNull(Transaction.getCurrentTransactionOrNull());
  }
View Full Code Here

        assertEquals(Long.valueOf(2), db.get(Integer.valueOf(1)));
        assertEquals(Long.valueOf(234), db.get(Integer.valueOf(123)));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        assertEquals(Long.valueOf(2), db.get(Integer.valueOf(1)));
        assertEquals(Long.valueOf(234), db.get(Integer.valueOf(123)));
      }
      finally
      {
        txn.rollback();
      }

      txn = Transaction.startTransaction(true);
      try
      {
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.