Coordinator coord = Utility.getCoordinator(Utility.getControl());
JCoordinator jcoord = JCoordinatorHelper.narrow(coord);
if (jcoord != null) {
gtid = new GlobalTID(jcoord.getGlobalTID());
} else {
ControlImpl control = CurrentTransaction.getCurrent();
if (control != null) {
gtid = control.getGlobalTID();
}
}
return gtid;
}