Package org.jboss.cache.transaction

Examples of org.jboss.cache.transaction.TransactionTable



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

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

      GlobalTransaction gtx = table.get(tx);

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

      @SuppressWarnings("unchecked")
      TransactionWorkspace<Object, Object> workspace = entry.getTransactionWorkSpace();

      mgr.commit();
View Full Code Here


      SamplePojo pojo2 = new SamplePojo(21, "test");

      cache.put("/one/two", "key2", pojo2);

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

      GlobalTransaction gtx = table.get(tx);

      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);
      @SuppressWarnings("unchecked")
      TransactionWorkspace<Object, Object> workspace = entry.getTransactionWorkSpace();

      mgr.commit();
      //assert what should be the results of our call
View Full Code Here

      SamplePojo pojo2 = new SamplePojo(21, "test");

      cache.put("/one/two", "key2", pojo2);

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


      GlobalTransaction gtx = table.get(tx);

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

      @SuppressWarnings("unchecked")
      TransactionWorkspace<Object, Object> workspace = entry.getTransactionWorkSpace();

      //resume the suspended transaction
      GlobalTransaction gtx2 = table.get(tx2);

      OptimisticTransactionContext entry2 = (OptimisticTransactionContext) table.get(gtx2);

      @SuppressWarnings("unchecked")
      TransactionWorkspace<Object, Object> workspace2 = entry2.getTransactionWorkSpace();

      //commit both tx
View Full Code Here

      cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx, true));


      cache.removeNode("/one/two");

      TransactionTable table = cache.getTransactionTable();
      GlobalTransaction gtx = table.get(tx);
      OptimisticTransactionContext entry = (OptimisticTransactionContext) table.get(gtx);
      TransactionWorkspace workspace = entry.getTransactionWorkSpace();

      mgr.commit();

      assert 2 == dummy.getAllCalled().size();
View Full Code Here

      cache.removeNode("/one/two");

      assert dummy.getAllCalled().isEmpty();

      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", "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

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.