docs: XAResource reconnectRM() throws XAException
      {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "reconnectRM");
  
          XAResource resource = null;
  
          XARecoveryWrapper wrapper = null;
  
          if (_recoveryData != null)
          {
              wrapper = _recoveryData.getXARecoveryWrapper();
          }
  
          if (wrapper == null && _recovery)
          {
              // We've not yet deserialized the log data - retry later "quietly"
              final XAException xae = new XAException(XAException.XA_RETRY);
              if (tc.isEntryEnabled())
                  Tr.exit(tc, "reconnectRM", xae);
              throw xae;
          }
  
          // If we have already created an XAResource by this method we need to destroy it
          if (_recoveredRM != null)
          {
              _recoveredRM.closeConnection();
              _recoveredRM = null;
          }
  
          if (wrapper != null)
          {
              try
              {
                  _recoveredRM = _recoveryData.getXARminst();
              } catch (XAException e)
              {
                  FFDCFilter.processException(e, "com.ibm.ws.Transaction.JTA.JTAXAResourceImpl.reconnectRM", "607", this);
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "reconnectRM", XAReturnCodeHelper.convertXACode(e.errorCode));
                  XAException xae = e;
                  // We will convert any RMERR from getXARminst to RMFAIL. We do not want to return RMERR on commit/rollback
                  // unless it has come from the resource as that then implies completion and we can then end the tran. An error
                  // trying to get the resource should not allow the tran to complete since we may leave a resource in-doubt.
                  // The downside of this is that we may retry forever - so the user needs to zap the tran via the console.
                  // We need to allow some heuristic error codes through if the RM has been installed.
                  if (e.errorCode == XAException.XAER_RMERR)
                  {
                      xae = (XAException) (new XAException(XAException.XAER_RMFAIL).initCause(e));
                  }
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "reconnectRM", xae);
                  throw xae;
              } catch (Throwable t) // @D666666C
              {
                  // Catch throwable in case we get OOM etc as we want to retry in this case.
                  FFDCFilter.processException(t, "com.ibm.ws.Transaction.JTA.JTAXAResourceImpl.reconnectRM", "524", this);
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "reconnectRM caught ", t);
                  final XAException xae = (XAException) (new XAException(XAException.XAER_RMFAIL).initCause(t));
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "reconnectRM", xae);
                  throw xae;
              }
              // If we successfully created an XARmist, then get the XAResource to work with
              if (_recoveredRM != null)
                  resource = _recoveredRM.getXaResource();
              // Update state from FAILED to IDLE so we dont reconnect unnecessarily
              if (resource != null)
                  _state = IDLE; // D419307A
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "reconnectRM", resource);
          return resource;
      }