docs: protected void internalEnd(Xid xid, int flags) throws XAException
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "internalEnd",
                                             new Object[] {xid, ""+flags});
        try
        {
           CommsByteBuffer request = getCommsByteBuffer();
           request.putInt(getTransactionId());
           request.putXid(xid);
           request.putInt(flags);
           if (fapLevel >= JFapChannelConstants.FAP_VERSION_5) {
              request.put((byte)(isMSResource ? 0x01 : 0x00));
           }         
           
           CommsByteBuffer reply = jfapExchange(request, 
                                                JFapChannelConstants.SEG_XAEND, 
                                                getLowestMessagePriority(),
                                                true);
           try
           {
              reply.checkXACommandCompletionStatus(JFapChannelConstants.SEG_XAEND_R, getConversation());            
           }
           finally
           {
              reply.release();
           }
        }
        catch (XAException xa)
        {
           // No FFDC Code needed
           // Simply re-throw...
           throw xa;
        }
        catch (Exception e)
        {
           FFDCFilter.processException(e, CLASS_NAME + ".internalEnd",
                                       CommsConstants.SIXARESOURCEPROXY_END_01, this);
           
           if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Caught a comms problem:", e);
  
           /** PM11871 - we need to tear down the Connection to ensure the ME cleans up the tran
            *  if it is still associated (ie not ended).  This should also cause the Listener
            *  to restart and so recreate the SIXAResourceProxy; thus we don't have to fake the
            *  state transition to UNENLISTED to avoid problems when it is reused. 
            */
           
           invalidateConnection(true, e, "Exception in SIXAResourceProxy.end");
  
           if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "internalEnd");
           throw new XAException(XAException.XAER_RMFAIL);
        }
        
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "internalEnd");
     }