return false;
}
// just testing for empty modifications isn't enough - the Lock API may acquire locks on keys but won't
// register a Modification. See ISPN-711.
LocalTxInvocationContext localCtx = (LocalTxInvocationContext) ctx;
boolean shouldInvokeRemotely = ctx.hasModifications() || !localCtx.getRemoteLocksAcquired().isEmpty() ||
localCtx.getCacheTransaction().getTopologyId() != rpcManager.getTopologyId();
if (getLog().isTraceEnabled()) {
getLog().tracef("Should invoke remotely? %b. hasModifications=%b, hasRemoteLocksAcquired=%b",
shouldInvokeRemotely, ctx.hasModifications(), !localCtx.getRemoteLocksAcquired().isEmpty());
}
return shouldInvokeRemotely;
}