@Override
public Object perform(InvocationContext ignored) throws Throwable {
if (ignored != null)
throw new IllegalStateException("Expected null context!");
RemoteTxInvocationContext ctxt = icc.createRemoteTxInvocationContext(getOrigin());
RemoteTransaction transaction = txTable.getRemoteTransaction(globalTx);
if (transaction == null) {
if (unlock) {
if (log.isTraceEnabled()) {
log.tracef("Unlock for non-existant transaction %s. Not doing anything.", globalTx);
}
return null;
}
//create a remote tx without any modifications (we do not know modifications ahead of time)
transaction = txTable.createRemoteTransaction(globalTx);
}
ctxt.setRemoteTransaction(transaction);
TxInvocationContext ctx = ctxt;
if (flags != null && !flags.isEmpty()) {
ctx = new TransactionalInvocationContextFlagsOverride(ctxt, flags);
}
return invoker.invoke(ctx, this);