docs: protected TranWrapper getCurrentTranWrapper() throws ResourceException {
  
          final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.entry(this, tc, "getCurrentTranWrapper");
          }
  
          // If the MCWrapper has not been completely initialized and we are working with an RA
          // that supports deferred enlistment of transactions, then let's re-initialize for the
          // UOW which we are already involved with.
          // This was a special fix that was put in for JMS Managed Sessions, but it
          // could apply to other internal connection types that might require this support.
          if ((state == STATE_ACTIVE_INUSE) && (gConfigProps.isDynamicEnlistmentSupported())) {
              if (isTracingEnabled && tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "State is STATE_ACTIVE_INUSE, calling initializeForUOW()...");
              }
              cm.initializeForUOW(this, true); // second parm indicates source of call is deferred enlistment.
          }
  
          if ((state != STATE_TRAN_WRAPPER_INUSE) && (state != STATE_ACTIVE_INUSE)) {
              IllegalStateException e = new IllegalStateException("getCurrentTranWrapper: illegal state exception. State = " + getStateString() + " MCW = "
                                                                  + mcWrapperObject_hexString);
              Object[] parms = new Object[] { "getCurrentTranWrapper", e };
              Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", parms);
              throw e;
          }
  
          TranWrapper tranWrapper = null;
          switch (tranWrapperInUse) {
              case XATXWRAPPER:
                  tranWrapper = xaTranWrapper;
                  break;
              case LOCALTXWRAPPER:
                  tranWrapper = localTranWrapper;
                  break;
              case NOTXWRAPPER:
                  tranWrapper = noTranWrapper;
                  break;
              case RRSGLOBALTXWRAPPER:
                  tranWrapper = rrsGlobalTranWrapper;
                  break;
              case RRSLOCALTXWRAPPER:
                  tranWrapper = rrsLocalTranWrapper;
                  break;
              default:
                  // Need RAS and Trace here.
                  IllegalStateException e = new IllegalStateException("getCurrentTranWrapper: illegal transaction state exception. State = "
                                                                      + getTranWrapperString());
                  Object[] parms = new Object[] { "getCurrentTranWrapper", e };
                  Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", parms);
                  throw e;
          }
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.exit(this, tc, "getCurrentTranWrapper", getTranWrapperString());
          }
  
          return tranWrapper;
      }