docs: @Override
      public void destroy() throws ResourceException {
  
          final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.entry(this, tc, "destroy");
          }
  
          if (state != STATE_ACTIVE_FREE) { // && state != STATE_ACTIVE_INUSE) {
              //IllegalStateException e = new IllegalStateException("destroy: illegal state exception. State = " + getStateString() + " MCW = " + mcWrapperObject_hexString);
              //- add pmiName to message
              String pmiName = "No longer available";
              if (cm != null) {
                  pmiName = gConfigProps.cfName;
              }
              Tr.warning(tc, "ATTEMPT_TO_DESTORY_CONNECTION_IN_USE_J2CA0088", STATESTRINGS[state], pmiName);
              //throw e;
          }
  
          try {
              if (mc != null) {
                  mc.removeConnectionEventListener(eventListener);
              } else if (tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "mc is null, mc.removeConnectionEventListener() not called.");
              }
          } catch (Exception e) {
              // Eat this exception since we are destroying the connection anyway.
              com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "782", this);
              String pmiName = "No longer available";
              if (cm != null) {
                  pmiName = gConfigProps.cfName;
              }
              if (!stale && !do_not_reuse_mcw) {
                  Object[] parms = new Object[] { "destroy",
                                                  "removeConnectionEventListener", mc, e, pmiName };
                  Tr.error(tc, "MCERROR_J2CA0081", parms);
              } else {
  
                  if (isTracingEnabled && tc.isDebugEnabled()) {
                      Tr.debug(this, tc, "got a SCE when doing removeConnectionEventListener on the mc, { mc, e, pmiName}; is:", new Object[] { mc, e, pmiName });
                  }
  
              }
          }
  
          try {
              if (mc != null) {
                  mc.destroy();
              } else if (tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "mc is null, mc.destroy() not called.");
              }
          } catch (ResourceException e) {
              com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "791", this);
              String pmiName = "No longer available";
              if (cm != null) {
                  pmiName = gConfigProps.cfName;
              }
              if (!stale && !do_not_reuse_mcw) {
                  Object[] parms = new Object[] { "destroy", "destroy", mc, e, pmiName };
                  Tr.error(tc, "MCERROR_J2CA0081", parms);
              } else {
  
                  if (isTracingEnabled && tc.isDebugEnabled()) {
                      Tr.debug(this, tc, "got a SCE when doing destroy on the mc, { mc, e, pmiName}; is:", new Object[] { mc, e, pmiName });
                  }
  
              }
  
              throw e;
          } catch (Exception e) {
  
              com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "797", this);
              ResourceException re = null;
              String pmiName = "No longer available";
              if (cm != null) {
                  pmiName = gConfigProps.cfName;
              }
              if (!stale && !do_not_reuse_mcw) {
                  Object[] parms = new Object[] { "destroy", "destroy", mc, e, pmiName };
                  Tr.error(tc, "MCERROR_J2CA0081", parms);
              } else {
  
                  if (isTracingEnabled && tc.isDebugEnabled()) {
                      Tr.debug(this, tc, "got a SCE when doing destroy on the mc, { mc, e, pmiName}; is:", new Object[] { mc, e, pmiName });
                  }
  
              }
              re = new ResourceException("destroy: Exception caught");
              re.initCause(e);
              throw re;
  
          } finally {
              // The following call is added for the case when destroy is called without cleanup.
              for (int i = mcConnectionCount; i > 0; i--) {
                  decrementHandleCount();
              }
  
              mc = null;
  
              try {
                  if (xaTranWrapper != null && !isMCAborted()) {
                      xaTranWrapper.releaseResources();
                  }
                  if (localTranWrapper != null && !isMCAborted()) {
                      localTranWrapper.releaseResources();
                  }
                  if (noTranWrapper != null) {
                      noTranWrapper.releaseResources();
                  }
                  if (rrsGlobalTranWrapper != null) {
                      rrsGlobalTranWrapper.releaseResources();
                  }
                  if (rrsLocalTranWrapper != null) {
                      rrsLocalTranWrapper.releaseResources();
                  }
              } catch (Exception e) {
  
                  switch (tranWrapperInUse) {
  
                      case XATXWRAPPER:
                          com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "814", this);
                          if (isTracingEnabled && tc.isDebugEnabled()) {
                              String pmiName = "No longer available";
                              if (cm != null) {
                                  pmiName = gConfigProps.cfName;
                              }
                              Tr.debug(this, tc, "destroy: xaTranWrapper.releaseResources() call for resource pool " + pmiName + " failed with exception", e);
                          }
                          break;
  
                      case LOCALTXWRAPPER:
                          com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "823", this);
                          if (isTracingEnabled && tc.isDebugEnabled()) {
                              String pmiName = "No longer available";
                              if (cm != null) {
                                  pmiName = gConfigProps.cfName;
                              }
                              Tr.debug(this, tc, "destroy: localTranWrapper.releaseResources() call for resource pool " + pmiName + " failed with exception", e);
                          }
                          break;
  
                      case NOTXWRAPPER:
                          com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "832", this);
                          if (isTracingEnabled && tc.isDebugEnabled()) {
                              String pmiName = "No longer available";
                              if (cm != null) {
                                  pmiName = gConfigProps.cfName;
                              }
                              Tr.debug(this, tc, "destroy: noTranWrapper.releaseResources() call for resource pool " + pmiName + " failed with exception", e);
                          }
                          break;
  
                      case RRSGLOBALTXWRAPPER:
                          com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "825", this);
                          if (isTracingEnabled && tc.isDebugEnabled()) {
                              String pmiName = "No longer available";
                              if (cm != null) {
                                  pmiName = gConfigProps.cfName;
                              }
                              Tr.debug(this, tc, "destroy: rrsGlobalTranWrapper.releaseResources() call for resource pool " + pmiName + " failed with exception", e);
                          }
                          break;
  
                      case RRSLOCALTXWRAPPER:
                          com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.destroy", "827", this);
                          if (isTracingEnabled && tc.isDebugEnabled()) {
                              String pmiName = "No longer available";
                              if (cm != null) {
                                  pmiName = gConfigProps.cfName;
                              }
                              Tr.debug(this, tc, "destroy: rrsLocalTranWrapper.releaseResources() call for resource pool " + pmiName + " failed with exception", e);
                          }
                          break;
  
                      default:
                          break;
  
                  }
  
              }
  
              if (isTracingEnabled && tc.isDebugEnabled()) {
                  Tr.debug(this, tc, "Resetting stale, tranFailed, and _transactionErrorOccurred flags");
              }
  
              stale = false;
              _transactionErrorOccurred = false;
  
              state = STATE_INACTIVE;
              destroyState = false;
              purgeState = false;
  
          }
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.exit(this, tc, "destroy");
          }
  
      }