Package org.jboss.cache.transaction

Examples of org.jboss.cache.transaction.TransactionTable


      temp.put("key1", "value");
      cache.put("/one/two", temp);

      cache.removeNode("/one");
      assertEquals(null, dummy.getCalledCommand());
      TransactionTable table = cache.getTransactionTable();

      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace<?, ?> workspace = entry.getTransactionWorkSpace();

      mgr.commit();
View Full Code Here


      Map temp = new HashMap();
      temp.put("key1", "value");
      cache.put("/one/two", temp);

      // get the transaction stuff
      TransactionTable table = cache.getTransactionTable();
      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace workspace = entry.getTransactionWorkSpace();

      workspace.getNode(Fqn.fromString("/one"));
      workspace.getNode(Fqn.fromString("/one/two"));
View Full Code Here

      Map temp = new HashMap();
      temp.put("key1", "value");
      cache.put("/one/two", temp);

      // get the transaction stuff
      TransactionTable table = cache.getTransactionTable();
      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace workspace = entry.getTransactionWorkSpace();

      WorkspaceNode one = workspace.getNode(Fqn.fromString("/one"));
      WorkspaceNode two = workspace.getNode(Fqn.fromString("/one/two"));
View Full Code Here

      Map temp = new HashMap();
      temp.put("key1", "value");
      cache.put("/one/two", temp);

      // get the transaction stuff
      TransactionTable table = cache.getTransactionTable();
      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace workspace = entry.getTransactionWorkSpace();

      WorkspaceNode one = workspace.getNode(Fqn.fromString("/one"));
      WorkspaceNode two = workspace.getNode(Fqn.fromString("/one/two"));
View Full Code Here

      Map temp = new HashMap();
      temp.put("key1", "value");
      cache.put("/one/two", temp);

      // get the transaction stuff
      TransactionTable table = cache.getTransactionTable();
      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace<?, ?> workspace = entry.getTransactionWorkSpace();

      WorkspaceNode<?, ?> one = workspace.getNode(Fqn.fromString("/one"));
View Full Code Here

      setupTransactions(cache, tx);

      assert null == cache.getNode("/one/two");

      assertEquals(null, dummy.getCalledCommand());
      TransactionTable table = cache.getTransactionTable();

      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace workspace = entry.getTransactionWorkSpace();


      mgr.commit();
View Full Code Here

      cache.put("/one/two", temp);

      cache.getNode("/one/two").clearData();

      assertEquals(null, dummy.getCalledCommand());
      TransactionTable table = cache.getTransactionTable();

      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace workspace = entry.getTransactionWorkSpace();


      mgr.commit();
View Full Code Here

      temp.put("key1", pojo);
      cache.put("/one/two", temp);


      assertEquals(null, dummy.getCalledCommand());
      TransactionTable table = cache.getTransactionTable();

      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace workspace = entry.getTransactionWorkSpace();
      assertEquals(1, workspace.getNode(Fqn.fromString("/one/two")).getMergedData().size());

      cache.getNode("/one/two").clearData();
View Full Code Here

      Map temp = new HashMap();
      temp.put("key1", pojo);
      cache.put("/one/two", temp);

      assertEquals(null, dummy.getCalledCommand());
      TransactionTable table = cache.getTransactionTable();

      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);

      TransactionWorkspace workspace = entry.getTransactionWorkSpace();
      assertEquals(1, workspace.getNode(Fqn.fromString("/one/two")).getMergedData().size());

      cache.getNode("/one").clearData();
View Full Code Here

   {
      // Start clean
      cache.getInvocationContext().reset();

      tm.begin();
      TransactionTable tt = cache.getTransactionTable();
      cache.getRoot().put("key", "value");

      assertNotNull("Tx should have been set up by now", cache.getInvocationContext().getTransaction());
      assertEquals("The same current transaction should be associated with this invocation ctx.", tm.getTransaction(), cache.getInvocationContext().getTransaction());
      assertNotNull("Gtx should have been set up by now", cache.getInvocationContext().getGlobalTransaction());

      Transaction tx = tm.getTransaction();
      TransactionContext transactionContext = tt.get(tt.get(tx));

      if (commit)
      {
         tm.commit();
      }
View Full Code Here

TOP

Related Classes of org.jboss.cache.transaction.TransactionTable

Copyright © 2018 www.massapicom. 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.