I think you still create the transaction and the state object even if you
only have rollback, because they are created automatically when you try to
access them.


On Thu, Apr 4, 2013 at 12:36 PM, Pedro Ruivo <notifications@github.com>wrote:

> In
> core/src/main/java/org/infinispan/interceptors/totalorder/TotalOrderInterceptor.java:
>
> > +   }
> > +
> > +   private TotalOrderRemoteTransactionState getTransactionState(TxInvocationContext context) {
> > +      if (!context.isOriginLocal()) {
> > +         return ((RemoteTransaction) context.getCacheTransaction()).getTransactionState();
> > +      }
> > +      RemoteTransaction remoteTransaction = transactionTable.getRemoteTransaction(context.getGlobalTransaction());
> > +      return remoteTransaction == null ? null : remoteTransaction.getTransactionState();
> > +   }
> > +
> > +   private boolean processSecondCommand(TotalOrderRemoteTransactionState state, boolean commit) {
> > +      //it means that the transaction was not prepared (i.e. a suicide transaction)
> > +      if (state == null) {
> > +         return true;
> > +      }
> > +
>
> yes, if you have a transaction that invokes TransactionManager.rollback(),
> you will never have a remote transaction because you never send the
> prepare.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/infinispan/infinispan/pull/1669/files#r3652083>
> .
>