Examples of TransactionEntry


Examples of org.jboss.cache.transaction.TransactionEntry

      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();
      TransactionEntry entry = tt.get(tt.get(tx));

      if (commit)
      {
         tm.commit();
      }
      else
      {
         tm.rollback();
      }

      assertNull("Tx should have been scrubbed", cache.getInvocationContext().getTransaction());
      assertNull("Gtx should have been scrubbed", cache.getInvocationContext().getGlobalTransaction());
      assertEquals("MethodCall should have been scrubbed", null, cache.getInvocationContext().getMethodCall());

      // check that the transaction entry hasn't leaked stuff.
      assert entry.getModifications().isEmpty() : "Should have scrubbed modifications in transaction entry";
      assert entry.getCacheLoaderModifications().isEmpty() : "Should have scrubbed modifications in transaction entry";
      assert entry.getOrderedSynchronizationHandler() == null : "Should have removed the ordered sync handler";
   }
View Full Code Here

Examples of org.jboss.cache.transaction.TransactionEntry

      // pass up the chain.
      Object retval = invokeNextInterceptor(ctx, command);
      if (!skipReplicationOfTransactionMethod(ctx))
      {
         GlobalTransaction gtx = getGlobalTransaction(ctx);
         TransactionEntry te = ctx.getTransactionEntry();
         if (te.hasLocalModifications())
         {
            OptimisticPrepareCommand replicablePrepareCommand = command.clone(); // makre sure we remove any "local" transactions
            replicablePrepareCommand.removeModifications(te.getLocalModifications());
            command = replicablePrepareCommand;
         }

         // replicate the prepare call.
         broadcastPrepare(command, gtx, ctx);
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.