public static final org.omg.CosTransactions.otid_t uidToOtid (String theUid)
{
if (theUid == null)
return null;
otid_t otid = new otid_t();
byte[] b = theUid.getBytes(StandardCharsets.UTF_8);
if (TxControl.getXANodeName() == null) {
throw new IllegalStateException(jtsLogger.i18NLogger.get_nodename_null());
}
byte[] nodeName = TxControl.getXANodeName().getBytes(StandardCharsets.UTF_8);
otid.formatID = 0;
otid.tid = new byte[b.length+nodeName.length];
otid.bqual_length = nodeName.length;
System.arraycopy(b, 0, otid.tid, 0, b.length);
System.arraycopy(nodeName, 0, otid.tid, b.length, nodeName.length);
b = null;
return otid;
}