docs: protected java.lang.Object getConnection(Subject subj, ConnectionRequestInfo cri) throws ResourceException {
  
          final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.entry(this, tc, "getConnection");
          }
  
          Object connection = null;
  
          // Get the a Connection from the ManagedConnection to return to our caller, and increment the
          // number of open connections for this ManagedConnection.
          try {
              connection = mc.getConnection(subj, cri);
              if (isValidating.get() != null && Boolean.FALSE.equals(testConnection()))
                  throw new ResourceAllocationException("ManagedConnection.testConnection() indicates connection is not valid.");
              if (_supportsReAuth) {
                  /*
                   * If we have a userDataPending userData, we need
                   * to set the current userData to the userDataPending
                   * value. Right now we are doing this for every
                   * matchManagedConnection (MMC), since we do not know which
                   * resource adapters support reauthentication. The MMC
                   * does not reauthenticate, the reauthentication is done
                   * on the mc.getConnection. This is the reason for doing
                   * the update after the the mc.getConnection is successful.
                   * If the mc.getConnection fails, we have a better chance
                   * to recover corrently with the current userData values
                   * in the PoolManager code.
                   */
                  _subject = subj;
                  _cri = cri;
                  hashMapBucket = _hashMapBucketReAuth;
              }
              incrementHandleCount();
              // Need PMI Call here.
          } catch (SharingViolationException e) {
              // If there is a sharing violation, it means that there is already at LEAST one connection
              // handle out.  Therefore we can't release the ManagedConnection yet.  Just log and rethrow.
              com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.getConnection", "1677", this);
              String cfName = "No longer available";
              if (cm != null) {
                  cfName = gConfigProps.cfName;
              }
              Tr.error(tc, "FAILED_CONNECTION_J2CA0021", new Object[] { e, cfName });
              throw e;
          } catch (ResourceException e) {
              com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.getConnection", "873", this);
              String cfName = "No longer available";
              if (cm != null) {
                  cfName = gConfigProps.cfName;
              }
              Tr.error(tc, "FAILED_CONNECTION_J2CA0021", new Object[] { e, cfName });
              /*
               * If the Resource Adapter throws a ResourceException and we are not in a
               * transaction and there are no other connections open on the ManagedConnection,
               * return the ManagedConnection to the pool before
               * rethrowing the exception. The ManagedConnection is probably OK - the exception
               * may only be a logon failure or similar so the MC shouldn't be 'lost'.
               *
               * If we are in a transaction, just throw the exception. Assume we will cleanup during
               * the aftercompletion call on the tran wrapper.
               */
              /*
               * if ((uowCoord == null) && (mcConnectionCount == 0)) {
               * try {
               * pm.release(this, uowCoord);
               * }
               * catch ( Exception exp ) { // don't rethrow, already on exception path
               * com.ibm.ws.ffdc.FFDCFilter.processException(exp, "com.ibm.ejs.j2c.MCWrapper.getConnection", "893", this);
               * // add pmiName to message
               * Tr.error(tc,"FAILED_CONNECTION_RELEASE_J2CA0022", new Object[] {exp, pmiName});
               * }
               * } end /
               */
              throw e;
          } catch (Exception e) {
              com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.getConnection", "901", this);
              String cfName = "No longer available";
              if (cm != null) {
                  cfName = gConfigProps.cfName;
              }
              Tr.error(tc, "FAILED_CONNECTION_J2CA0021", new Object[] { e, cfName });
              /*
               * If the Resource Adapter throws an Exception and we are not in a
               * transaction and there are no other connections open on the ManagedConnection,
               * return the ManagedConnection to the pool before
               * rethrowing the exception. The ManagedConnection is probably OK - the exception
               * may only be a logon failure or similar so the MC shouldn't be 'lost'.
               *
               * If we are in a transaction, just throw the exception. Assume we will cleanup during
               * the aftercompletion call on the tran wrapper.
               */
              /*
               * if ((uowCoord == null) && (mcConnectionCount == 0)) {
               * try {
               * pm.release(this, uowCoord);
               * }
               * catch ( Exception exp ) { // don't rethrow, already on exception path
               * com.ibm.ws.ffdc.FFDCFilter.processException(exp, "com.ibm.ejs.j2c.MCWrapper.getConnection", "921", this);
               * //add pmiName to message
               * Tr.error(tc,"FAILED_CONNECTION_RELEASE_J2CA0022", new Object[] {exp, pmiName});
               * }
               * }/
               */
  
              // See if per chance the component-managed auth alias used on the first lookup has become invalid:
              String remsg = "";
              String xpathId = gConfigProps.getXpathId();
              if (xpathId != null) {
                  final Object originalAlias = J2CUtilityClass.pmiNameToCompAlias.get(xpathId);
                  if ((originalAlias != null) && (!originalAlias.equals(""))) {
  
                      remsg = "Component-managed authentication alias " + originalAlias +
                              " for connection factory or datasource " + cfName +
                              " is invalid.  It may be necessary to re-start the server(s) for " +
                              " previous configuration changes to take effect.";
  
                  } // end originalAlias not null or blank
  
              } // end pmiName != null
  
              ResourceException re = new ResourceException(remsg);
              re.initCause(e);
              throw re;
  
          } // end catch Exception e
  
          if (isTracingEnabled && tc.isEntryEnabled()) {
              Tr.exit(this, tc, "getConnection", connection);
          }
  
          return connection;
  
      }