*/
public LocalTransaction getOrCreateLocalTransaction(Transaction transaction, TxInvocationContext ctx) {
LocalTransaction current = localTransactions.get(transaction);
if (current == null) {
Address localAddress = rpcManager != null ? rpcManager.getTransport().getAddress() : null;
GlobalTransaction tx = txFactory.newGlobalTransaction(localAddress, false);
current = txFactory.newLocalTransaction(transaction, tx, ctx.isImplicitTransaction(), currentTopologyId);
log.tracef("Created a new local transaction: %s", current);
localTransactions.put(transaction, current);
globalToLocalTransactions.put(current.getGlobalTransaction(), current);
notifier.notifyTransactionRegistered(tx, ctx);