class LocalVisitor implements XAResourceHolderStateVisitor {
private XAResourceHolderState latestEnlistedHolder;
public boolean visit(XAResourceHolderState xaResourceHolderState) {
if (xaResourceHolderState != null && xaResourceHolderState.getXid() != null) {
BitronixXid bitronixXid = xaResourceHolderState.getXid();
Uid resourceGtrid = bitronixXid.getGlobalTransactionIdUid();
Uid currentTransactionGtrid = currentTransaction.getResourceManager().getGtrid();
if (currentTransactionGtrid.equals(resourceGtrid)) {
latestEnlistedHolder = xaResourceHolderState;
}