docs: protected MCWrapper getFreeWaiterConnection(ManagedConnectionFactory managedConnectionFactory, Subject subject,
                                                  ConnectionRequestInfo cri) throws ResourceAllocationException, ConnectionWaitTimeoutException {
          if (tc.isEntryEnabled()) {
              Tr.entry(this, tc, "getFreeWaiterConnection", gConfigProps.cfName);
          }
          MCWrapper mcWrapper = null;
          MCWrapper mcWrapperTemp = null;
  
          int mcwlSize = mcWrapperWaiterList.size();
          if (mcwlSize > 0) {
              int mcwlIndex = mcwlSize - 1;
              // Remove the first mcWrapper from the list (Optimistic)
              mcWrapperTemp = (MCWrapper) mcWrapperWaiterList.remove(mcwlIndex);
              mcWrapperTemp.setPoolState(0);
              mcWrapper = getMCWrapperFromMatch(subject, cri, managedConnectionFactory, mcWrapperTemp);
              if (((com.ibm.ejs.j2c.MCWrapper) mcWrapperTemp).do_not_reuse_mcw) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(this, tc, "Connection error occurred for this mcw " + mcWrapperTemp + ", mcw will not be reuse");
                  }
                  freePool[0].cleanupAndDestroyMCWrapper(mcWrapperTemp);
                  if ((waiterCount > 0) && (waiterCount > mcWrapperWaiterList.size())) {
                      waiterFreePoolLock.notify();
                  }
                  if (tc.isEntryEnabled()) {
                      Tr.exit(this, tc, "getFreeWaiterConnection", new Object[] { "Returning destroyed mcWrapper", mcWrapperTemp });
                  }
                  return mcWrapperTemp;
              }
              if (mcWrapper == null) {
                  // We need to add the mcWrapper back, we don't have a
                  // matching connection
                  mcWrapperWaiterList.add(mcWrapperTemp);
                  mcWrapperTemp.setPoolState(4);
                  // We need to look through the list, since we didn't find a matching connection at
                  // the end of the list, we need to use get and only remove if we find a matching
                  // connection.
                  for (int i = mcwlIndex - 1; i >= 0; --i) {
                      mcWrapperTemp = (MCWrapper) mcWrapperWaiterList.get(i);
                      mcWrapper = getMCWrapperFromMatch(subject, cri, managedConnectionFactory, mcWrapperTemp);
                      if (((com.ibm.ejs.j2c.MCWrapper) mcWrapperTemp).do_not_reuse_mcw) {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(this, tc, "Connection error occurred for this mcw " + mcWrapperTemp + ", mcw will not be reuse");
                          }
                          mcWrapperWaiterList.remove(i);
                          freePool[0].cleanupAndDestroyMCWrapper(mcWrapperTemp);
                          if ((waiterCount > 0) && (waiterCount > mcWrapperWaiterList.size())) {
                              waiterFreePoolLock.notify();
                          }
                          if (tc.isEntryEnabled()) {
                              Tr.exit(this, tc, "getFreeWaiterConnection", new Object[] { "Returning destroyed mcWrapper", mcWrapperTemp });
                          }
                          return mcWrapperTemp;
                      }
                      if (mcWrapper != null) {
                          mcWrapperWaiterList.remove(i);
                          mcWrapper.setPoolState(0);
                          break;
                      }
                  }
              } // end else
          } // end if
          if (tc.isEntryEnabled()) {
              if (tc.isDebugEnabled()) {
                  // only print this information if tc.isEntryEnabled() and tc.isDebugEnabled()
                  if (mcWrapper != null) {
                      Tr.debug(this, tc, "Returning mcWrapper " + mcWrapper);
  
                  } else {
                      Tr.debug(this, tc, "MCWrapper was not found in Free Pool");
                  }
              }
              Tr.exit(this, tc, "getFreeWaiterConnection", mcWrapper);
          }
          return mcWrapper;
      }