code: protected synchronized void setXID(byte[] XID)
                      throws ObjectManagerException
      {
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) {
              trace.entry(this,
                          cclass,
                          "setXID",
                          XID);
              trace.bytes(this,
                          cclass,
                          XID);
          } // if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()).
  
          if (logicalUnitOfWork.XID != null) {
              if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                  trace.exit(this, cclass
                             , "setXID"
                             , "via XIDModificationException"
                               + " logicalUnitOfWork.XID=" + logicalUnitOfWork.XID + "(byte[])"
                                  );
              throw new XIDModificationException(this
                                                 , logicalUnitOfWork.XID
                                                 , XID);
          } // if (logicalUnitOfWork.XID != null).
  
          if (XID.length > LogicalUnitOfWork.maximumXIDSize) {
              if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                  trace.debug(this, cclass
                              , "setXID"
                              , "via XIDTooLongException"
                                + " XID.length=" + XID.length + "(byte[])"
                                  );
              throw new XIDTooLongException(this
                                            , XID.length);
          } // if (logicalUnitOfWork.XID != null).
  
          // No need to reserve extra space in the log for the XID in Commit/Backout
          // and Checkpoint logRecords because we already assumed the maximumSerializedSize
          // when the transaction wrote its fitrst LogRecord.
  
          logicalUnitOfWork.XID = new byte[XID.length];
          System.arraycopy(XID, 0, logicalUnitOfWork.XID, 0, XID.length);
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this, cclass
                         , "setXID"
                              );
      }
docs: <p>
  Sets the XID identifying the transaction if has not been set already.
  No check is made on the uniqueness of the XID.
  
  @param XID the Xopen identifier of the transaction, or null.
  </p>
  @throws ObjectManagerException