Methods Summary |
---|
public static Control | getControl()Obtain the current Control object.
Control control = null;
try {
if (current == null) {
current = (org.omg.CosTransactions.Current) Configuration.
getORB().resolve_initial_references("TransactionCurrent"/*#Frozen*/);
}
control = current.get_control();
} catch(Exception e) {
// empty
}
return control;
|
public static Coordinator | getCoordinator(Control control)Obtain the coordinator object from the supplied control.
If a null control is supplied, an null coordinator will be returned.
Coordinator coordinator = null;
if (control == null) {
return null;
}
try {
coordinator = control.get_coordinator();
} catch(Exception e) {
coordinator = null;
}
return coordinator;
|
public static XID | getXID(Coordinator coordinator)Obtain the global transaction identifier for the supplied coordinator.
otid_t tid = null;
XID xid = new XID();
if (coordinator == null) {
return null;
}
try {
tid = JCoordinatorHelper.narrow(coordinator).getGlobalTID();
xid.copy(tid);
} catch(Exception e) {
return null;
}
return xid;
|
public static XID | getXID()Obtain the global transaction identifier for the current transaction.
Control control = null;
Coordinator coordinator = null;
control = getControl();
coordinator = getCoordinator(control);
XID xid = getXID(coordinator);
return xid;
|