public final Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) throws Throwable {
throw new UnsupportedOperationException("Lock interface not supported with total order protocol");
}
private Object visitSecondPhaseCommand(TxInvocationContext context, AbstractTransactionBoundaryCommand command, boolean commit) throws Throwable {
GlobalTransaction gtx = command.getGlobalTransaction();
if (log.isTraceEnabled()) {
log.tracef("Second phase command received. Commit?=%s Transaction=%s, Local=%s", commit, gtx.globalId(),
context.isOriginLocal());
}
TotalOrderRemoteTransactionState state = getTransactionState(context);
try {
if (!processSecondCommand(state, commit) && !context.isOriginLocal()) {
//we can return here, because we set onePhaseCommit to prepare and it will release all the resources
return null;
}
return invokeNextInterceptor(context, command);
} catch (Throwable exception) {
if (log.isDebugEnabled()) {
log.debugf(exception, "Exception while rollback transaction %s", gtx.globalId());
}
throw exception;
} finally {
if (state != null && state.isFinished()) {
totalOrderManager.release(state);