code: public void processXAException(XAException xae) {
  
          final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
  
          if ((xae.errorCode == XAException.XAER_RMERR) || (xae.errorCode == XAException.XAER_RMFAIL)) {
  
              if (isTracingEnabled && tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "processXAException: detecting bad XAException error code. Marking MCWrapper stale. ");
              }
  
              mcWrapper.markTransactionError();
  
          }
          if (xae.errorCode != 0) {
  
              if (isTracingEnabled && tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "processXAException: Non-zero return code from XAResource. Return code is:  ",
                           getXAExceptionCodeString(xae.errorCode));
              }
  
          }
  
      }
docs: Method checks for failing error code coming back form an XAResource and marks the MCWrapper
  as stale so that it doesn't get returned to the freepool.