docs: public Object getConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
  
          //cannot print subject - causes security violation 
          // At least trace whether the Subject is null or not. 
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(this, tc, "getConnection", subject == null ? null : "subject", AdapterUtil.toString(cxRequestInfo));
  
          // if the MC marked Stale, it means the user requested a purge pool with an immediate option
          // so don't allow any connection handles to be created on this MC, instead throw a SCE
          if (_mcStale) {
              if (isTraceOn && tc.isDebugEnabled()) 
                  Tr.debug(this, tc, "MC is stale");
              throw new DataStoreAdapterException("INVALID_CONNECTION", AdapterUtil.staleX(), WSRdbManagedConnectionImpl.class);
          }
  
          //if you aren't in a valid state when doing getConnection, you can't get a connection
          // from this MC
  
          int transactionState = stateMgr.transtate;
  
          if ((transactionState != WSStateManager.LOCAL_TRANSACTION_ACTIVE)
              && (transactionState != WSStateManager.GLOBAL_TRANSACTION_ACTIVE)
              && (transactionState != WSStateManager.RRS_GLOBAL_TRANSACTION_ACTIVE)
              && (transactionState != WSStateManager.NO_TRANSACTION_ACTIVE)) {
              String message =
                              "Operation 'getConnection' is not permitted for transaction state: " +
                                              getTransactionStateAsString();
  
              ResourceException resX = new DataStoreAdapterException("WS_INTERNAL_ERROR", null, getClass(), message);
  
              // Use FFDC to log the possible components list. Comment out for now. 
              FFDCFilter.processException(resX,
                                          "com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.cleanupTransactions",
                                          "939", this, new Object[] { message, ". Possible components: Connection Manager" });
  
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(this, tc, "getConnection", "bad transaction state " + getTransactionStateAsString());
              throw resX;
          }
  
          // The Subject must match the existing subject.  User and password of the CRI must
          // match the existing values.  Other CRI properties may be modified if there aren't
          // any handles on this ManagedConnection yet. 
          // Subject matching requires doPrivileged code, which is costly.  We can trust the
          // WebSphere ConnectionManager to always send us a matching Subject.  Until it becomes
          // necessary for the RRA to work with other ConnectionManagers, we will NOT compare
          // Subjects. 
  
          WSConnectionRequestInfoImpl newCRI = (WSConnectionRequestInfoImpl) cxRequestInfo;
  
          //  - Before, isolation level is only allowed to switch between CCI connections.
          // Now, the isolation level switching is allowed between JDBC and CCI connections.
          if (!supportIsolvlSwitching) 
          {
              if (!cri.equals(newCRI))
                  replaceCRI(newCRI);
          } else //  must be CMP
          {
              replaceCRIForCCI(newCRI); 
          }
  
          // since the CRI of managed connection doesn't reflect the real
          // connection property values in the managed connection. we need to
          // synchronize the properties.
  
          // Avoid resetting properties when a handle has already been created. 
  
          if (numHandlesInUse == 0) 
          {
              // Refresh our copy of the connectionSharing setting with each first connection handle
              connectionSharing = dsConfig.get().connectionSharing; 
  
              /*
               * 1) setTransactionIsolation OK as it will only happen if no transaction is happening
               * 2) setReadOnly OK as it will only happen if no transaction is happening
               * 3) setTypeMap OK as it will only happen if no transaction is happening
               * 4) setHoldability OK as it will only happen if no transaction is happening
               */
              synchronizePropertiesWithCRI();
  
              if (stateMgr.getState() == WSStateManager.NO_TRANSACTION_ACTIVE ||
                  (stateMgr.getState() == WSStateManager.RRS_GLOBAL_TRANSACTION_ACTIVE 
                  && !rrsGlobalTransactionReallyActive)) 
              {
                  // setting the new subject in the managed connection, this may be the same
                  // as the existing one, however, in the claimedVictim path it won't. Setting it all the time.
                  this.subject = subject;
  
                  // now reset the _claimedVictim status, since at this point, the subject should match
                  // the sqlConn
                  this._claimedVictim = false;
  
              }
          } else 
          {
              // - we should allow to change the isolation level is the switching is supported
              // this value is used by the connection handle to save this value. So this isolation
              // level must be set before creating a handle.
              if (supportIsolvlSwitching && currentTransactionIsolation != cri.ivIsoLevel)
                  try {
                      setTransactionIsolation(cri.ivIsoLevel); 
                  } catch (SQLException sqlX) 
                  {
                      FFDCFilter.processException(sqlX, 
                                                  getClass().getName() + ".getConnection", "1867", this);
  
                      if (isTraceOn && tc.isEntryEnabled())
                          Tr.exit(this, tc, "getConnection", sqlX);
                      throw AdapterUtil.translateSQLException(sqlX, this, true, getClass()); 
                  }
  
          }
  
          //  - Subject and CRI are required for handle reassociation.
          // These values must be forwarded to the CM to reassociate with a new MC.
          // The JDBC handle will not modify the CRI or Subject.
          // The Connection handle will request the CRI and Subject only
          // when dissociated, to take a snapshot of the current Connection properties the
          // handle wishes to be reassociated to.
          // If the ManagedConnection was just taken out the pool, the thread id may not
          // be recorded yet. In this case, use the current thread id. 
          // Use the already-casted CRI here. 
  
          WSJdbcConnection handle = mcf.jdbcRuntime.newConnection(this, sqlConn, key, threadID);
          addHandle(handle);
  
          //here is one of two boundaries to enable/disable tracing
          // if logwriter was enabled dynamicall, then we will check every time since we don't know then
          // if the user enabled it or diabled it dynamically, (i.e. perfomance won't be as good)
          if (helper.shouldTraceBeEnabled(this))
              helper.enableJdbcLogging(this);
          else if (helper.shouldTraceBeDisabled(this))
              helper.disableJdbcLogging(this);
  
          if (isTraceOn && tc.isDebugEnabled())
              Tr.debug(this, tc, "numHandlesInUse", numHandlesInUse);
  
          // Record the number of fatal connection errors found on connections created by the
          // parent ManagedConnectionFactory at the time the last handle was created for this
          // ManagedConnection.  This allows us to determine whether it's safe to return this
          // ManagedConnection to the pool.  If the ManagedConnectionFactory's fatal error count
          // is greater than that of the ManagedConnection, it is not safe to pool the
          // ManagedConnection, as this shows fatal errors may have occurred on other
          // connections between the time the connection was last used and when it was closed.
          // This indicator is used to the implement the purge policy of "all open connections"
          // used by the default connection manager. 
          fatalErrorCount = mcf.fatalErrorCount.get();
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(this, tc, "getConnection", handle);
          return handle;
      }