docs: protected XATransactionWrapper getXATransactionWrapper() throws ResourceException {
  
          final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.entry(this, tc, "getXATransactionWrapper");
          }
  
          if (xaTranWrapper == null) {
              boolean isJDBC41 = false;
              if (mc instanceof WSManagedConnection) {
                  if (_managedConnectionFactory instanceof WSManagedConnectionFactory
                      && (((WSManagedConnectionFactory) _managedConnectionFactory).getJDBCRuntimeVersion().compareTo(new Version(4, 1, 0))) >= 0) {
                      isJDBC41 = true;
                  }
              }
              if (isJDBC41) {
                  xaTranWrapper = new AbortableXATransactionWrapper(this);
              } else {
                  xaTranWrapper = new XATransactionWrapper(this);
              }
          }
  
          // Move the xaTranWrapper.initialize() call outside of the above "xaTranWrapper == null"
          // conditional.  Prior to this change, the xaResource within the xaTranWrapper was not
          // getting re-initialized for MCWrappers that were pulled from the MCWrapperPool.  This
          // call to initialize() for existing xaTranWrappers is safe and quick since we check
          // for an existing xaResource as the first thing in initialize().
          //
          xaTranWrapper.initialize();
  
          if (state == STATE_ACTIVE_INUSE) {
              state = STATE_TRAN_WRAPPER_INUSE;
              tranWrapperInUse = XATXWRAPPER;
          } else { // state not STATE_ACTIVE_INUSE
              if (state != STATE_TRAN_WRAPPER_INUSE) {
                  IllegalStateException e = new IllegalStateException("getXATransactionWrapper: illegal state exception. State = " + getStateString() + " MCW = "
                                                                      + mcWrapperObject_hexString);
                  Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", "getXATransactionWrapper", e);
                  throw e;
              } else { // state is STATE_TRAN_WRAPPER_INUSE
                  if (tranWrapperInUse == NONE) {
                      tranWrapperInUse = XATXWRAPPER;
                  } else { //tranWrapperInUse is NOT NONE
                      if (tranWrapperInUse != XATXWRAPPER) {
                          // Need RAS and Trace here.
                          IllegalStateException e = new IllegalStateException("getXATransactionWrapper: illegal transaction state exception. State = "
                                                                              + getTranWrapperString());
                          Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", "getXATransactionWrapper", e);
                          throw e;
                      }
                  }
              }
          }
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.exit(this, tc, "getXATransactionWrapper");
          }
  
          return xaTranWrapper;
      }