Package org.helidb.txn

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


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


              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(Long.valueOf(2), db2.get(Integer.valueOf(1)));
          assertNull(db2.get(Integer.valueOf(438)));
        }
        finally
        {
          txn.rollback();
        }
      }
      finally
      {
        tearDownDatabase(db2);
View Full Code Here

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

  @Test
  public void testClearTransactionAtRollback()
  {
    Transaction txn = Transaction.startTransaction(false);
    assertSame(txn, Transaction.getCurrentTransaction());
    txn.rollback();
    assertNull(Transaction.getCurrentTransactionOrNull());
  }
}
View Full Code Here

    Transaction txn = Transaction.getCurrentTransactionOrNull();
    // The transaction may already be rolled back if we're working with
    // several databases.
    if (txn != null)
    {
      txn.rollback();
    }

    db.close();
    Directory dbDir = m_dbDirs.remove(Integer.valueOf(System.identityHashCode(db)));
    if (dbDir != null)
View Full Code Here

    }
    finally
    {
      if (!successful)
      {
        txn.rollback();
      }
    }
    assertNull(Transaction.getCurrentTransactionOrNull());
  }
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.