RemoteTransaction next = it.next();
RecoverableTransactionIdentifier gtx = (RecoverableTransactionIdentifier) next.getGlobalTransaction();
if (xid.equals(gtx.getXid())) {
it.remove();
recalculateMinTopologyIdIfNeeded(next);
next.notifyOnTransactionFinished();
return next;
}
}
}
return null;