Package org.jboss.cache.commands.tx

Examples of org.jboss.cache.commands.tx.PrepareCommand


   {
      Object retVal = invokeNextInterceptor(ctx, command);
      TransactionContext transactionContext = ctx.getTransactionContext();
      if (transactionContext.hasLocalModifications())
      {
         PrepareCommand replicablePrepareCommand = command.copy(); // makre sure we remove any "local" transactions
         replicablePrepareCommand.removeModifications(transactionContext.getLocalModifications());
         command = replicablePrepareCommand;
      }

      if (!skipReplicationOfTransactionMethod(ctx)) runPreparePhase(command, command.getGlobalTransaction(), ctx);
      return retVal;
View Full Code Here


      {
         case OptimisticPrepareCommand.METHOD_ID:
         case PrepareCommand.METHOD_ID:

            // Prepare method has a list of modifications. We will just take the first one and extract.
            PrepareCommand pc = (PrepareCommand) cmd;
            List<ReversibleCommand> modifications = pc.getModifications();
            fqn = extractFqn(modifications.get(0));

            // If this is two phase commit, map the FQN to the GTX so
            // we can find it when the commit/rollback comes through
            if (!pc.isOnePhaseCommit()) transactions.put(pc.getGlobalTransaction(), fqn);

            break;

         case RollbackCommand.METHOD_ID:
         case CommitCommand.METHOD_ID:
View Full Code Here

    * method call and passes the prepare() call up the chain.
    */
   @SuppressWarnings("deprecation")
   public Object runPreparePhase(InvocationContext ctx, GlobalTransaction gtx, List<WriteCommand> modifications) throws Throwable {
      // running a 2-phase commit.
      PrepareCommand prepareCommand = buildPrepareCommand(gtx, modifications, false);

      Object result;

      // Is there a local transaction associated with GTX ?
      Transaction ltx = ctx.getTransaction();
View Full Code Here

TOP

Related Classes of org.jboss.cache.commands.tx.PrepareCommand

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.