docs: public ManagedConnection matchManagedConnections(@SuppressWarnings("rawtypes") final Set connectionSet,
                                                       final Subject subject, ConnectionRequestInfo cxRequestInfo)
                      throws ResourceException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); 
  
          if (isTraceOn && tc.isEntryEnabled()) 
              Tr.entry(this, tc, "matchManagedConnections", connectionSet == null ? null : connectionSet.size(),
                              subject == null ? null : "subject", cxRequestInfo);
  
          // Return null (no match) if null is specified for the set of connections. 
  
          if (connectionSet == null) 
          {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(this, tc, "matchManagedConnections", null); 
              return null; 
          }
  
          // Convert the CRI to the RRA implementation class.  If the CRI doesn't convert, then
          // we cannot find a match. 
  
          final WSConnectionRequestInfoImpl finalCRI;
  
          try {
              finalCRI = (WSConnectionRequestInfoImpl) cxRequestInfo;
          } catch (ClassCastException castX) {
              // No FFDC code needed. If it's not the RRA's CRI class, then it doesn't match.
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(this, tc, "matchManagedConnections", null); 
              return null;
          }
  
          // Need to keep this variable because currentmc will end up not being null but
          // may not be a match
          WSRdbManagedConnectionImpl matchedmc = null;
  
          // the J2c component will always send us a set of one and only one mc.  Therefore, there
          // is no need to go through a loop. Just far sanity check, i am printing the size in a debug
          if (isTraceOn && tc.isDebugEnabled()) 
              Tr.debug(this, tc, "the size of the set should be 1, and it is", connectionSet.size()); 
  
          WSRdbManagedConnectionImpl currentmc;
          Iterator<?> iter = connectionSet.iterator();
          currentmc = (WSRdbManagedConnectionImpl) iter.next();
  
          //: if the mc is claimed victim, means it never matched the initial hash test done by j2c,
          // so at this point, we know that reauthentication is enabled and connection needs to be
          // reauthenticated, so ignore the subject and do the isReconfigurable checkign only.
          if (currentmc._claimedVictim && finalCRI.isReconfigurable(currentmc.cri, true)) {
              if (isTraceOn && tc.isDebugEnabled()) 
                  Tr.debug(this, tc, "mc is claimedVictim matched", currentmc); 
              matchedmc = currentmc;
          } else if (subject == null) // no reauthentication is enabled from here on
          {
  
              // Compare using .isReconfigurable instead of .equals in order to return
              // any ManagedConnection that can be made to match the CRI instead of only those
              // ManagedConnections which already match. 
              // The DataSource Config ID field of the CRI is not considered reconfigurable
              // for a connection. 
              if ((currentmc.getSubject() == null) && 
                  finalCRI.isReconfigurable(currentmc.cri, false)) 
              {
                  if (isTraceOn && tc.isDebugEnabled()) 
                      Tr.debug(this, tc, "mc matched", currentmc);
                  matchedmc = currentmc;
              }
          } else {
              Subject _sub = currentmc.getSubject(); 
  
              if (_sub != null) 
              {
                  Equals e = new Equals(); 
                  e.setSubjects(subject, _sub);
                  if (((Boolean) (AccessController.doPrivileged(e))).booleanValue() &&
                      finalCRI.isReconfigurable(currentmc.cri, false)) {
                      if (isTraceOn && tc.isDebugEnabled()) 
                          Tr.debug(this, tc, "mc matched", currentmc);
                      matchedmc = currentmc;
                  }
              }
          }
  
          //Removed a call to matchedmc.setAutoCommit(defaultAutoCommit)
          //  because it should now be reset before putting it back into
          //  the pool
  
          if (isTraceOn && tc.isEntryEnabled()) 
              Tr.exit(this, tc, "matchManagedConnections", matchedmc);
  
          return matchedmc;
      }