docs: public synchronized void putSITransaction(SITransaction transaction)
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "putSITransaction", transaction);
        Transaction commsTx = (Transaction)transaction;
  
        int flags = -1;
  
        if (transaction == null)
        {
           // No transaction - add "no transaction" flags to buffer.
          putInt(0x00000000);
        }
        else
        {
           // First we must search for any optimized transactions as they hold much more information
           // than the old-style ones.
           OptimizedTransaction optTx = null;
  
           // First see if the transaction is a global one. This could be both optimized or
           // unoptimized but the result is buried within it
           if (transaction instanceof SuspendableXAResource)
           {
              SIXAResource suspendableXARes = ((SuspendableXAResource) transaction).getCurrentXAResource();
              if (suspendableXARes instanceof OptimizedTransaction)
              {
                 // The current XA Resource is indeed optimized
                 optTx = (OptimizedTransaction) suspendableXARes;
              }
           }
           // Otherwise the actual transaction itself may be an optimized one - this is in the case
           // of an optimized local transaction.
           else if (transaction instanceof OptimizedTransaction)
           {
              optTx = (OptimizedTransaction) transaction;
           }
  
           // If we are optimized...
           if (optTx != null)
           {
              // Optimized transaction
              flags = CommsConstants.OPTIMIZED_TX_FLAGS_TRANSACTED_BIT;
  
              boolean local = optTx instanceof SIUncoordinatedTransaction;
              boolean addXid = false;
              boolean endPreviousUow = false;
              if (local)
              {
                 flags |= CommsConstants.OPTIMIZED_TX_FLAGS_LOCAL_BIT;
              }
              if (!optTx.isServerTransactionCreated())
              {
                 flags |= CommsConstants.OPTIMIZED_TX_FLAGS_CREATE_BIT;
                 if (local && optTx.areSubordinatesAllowed())
                    flags |= CommsConstants.OPTIMIZED_TX_FLAGS_SUBORDINATES_ALLOWED;
                 optTx.setServerTransactionCreated();
                 addXid = !local;
              }
              if (addXid && (optTx.isEndRequired()))
              {
                 flags |= CommsConstants.OPTIMIZED_TX_END_PREVIOUS_BIT;
                 endPreviousUow = true;
              }
              putInt(flags);
              putInt(optTx.getCreatingConversationId());
              putInt(commsTx.getTransactionId());
              if (addXid)
              {
                 if (endPreviousUow)
                 {
                    putInt(optTx.getEndFlags());
                    optTx.setEndNotRequired();
                 }
                 putXid(new XidProxy(optTx.getXidForCurrentUow()));
              }
           }
           else
           {
              // This is an un-optimized transaction - simply append transaction ID.
              putInt(commsTx.getTransactionId());
           }
        }
  
        if (TraceComponent.isAnyTracingEnabled()) {
          int commsId = -1;
          if (commsTx != null)  commsId = commsTx.getTransactionId();
          CommsLightTrace.traceTransaction(tc, "PutTxnTrace", commsTx, commsId, flags);
        }
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "putSITransaction");
     }