{
final ContextManager[] cm = new ContextManager[1];
visitEntries(new EntryVisitor() {
public boolean visit(TransactionTableEntry entry) {
GlobalTransactionId entry_gid = entry.getGid();
if (entry_gid != null && entry_gid.equals(global_id)) {
cm[0] = entry.getXact().getContextManager();
}
return cm[0] == null; // continue until context is found
}
});