docs: @Override
      public final ManagedConnectionFactory getManagedConnectionFactory(String identifier) throws Exception {
          WSManagedConnectionFactoryImpl mcf1;
          if (jdbcDriverSvc.loadFromApp()) {
              final boolean trace = TraceComponent.isAnyTracingEnabled();
  
              // data source class is loaded from thread context class loader
              if (identifier == null) {
                  ClassLoader tccl = priv.getContextClassLoader();
                  identifier = connectorSvc.getClassLoaderIdentifierService().getClassLoaderIdentifier(tccl);
                  // TODO better error handling when thread context class loader does not have an identifier
              }
              mcf1 = mcfPerClassLoader.get(identifier);
  
              if (trace && tc.isDebugEnabled())
                  Tr.debug(this, tc, "getManagedConnectionFactory", identifier, mcf1);
  
              if (mcf1 == null) {
                  PropertyService vProps = new PropertyService();
                  NavigableMap<String, Object> wProps = parseConfiguration(properties, vProps);
  
                  // Clone properties so that we can later detect modifications from the current values
                  vProps = (PropertyService) vProps.clone();
  
                  String jndiName = (String) wProps.remove(JNDI_NAME);
                  String type = (String) wProps.remove(DSConfig.TYPE);
  
                  // Trace some of the most important config settings
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "create new data source", id, jndiName, type);
  
                  Object vendorImpl;
                  Class<?> ifc;
  
                  if (type == null){
                      boolean atLeastJDBC43 = jdbcRuntime.getVersion().compareTo(JDBCRuntimeVersion.VERSION_4_3) >= 0;
                      vendorImpl = atLeastJDBC43 || id != null && id.contains("dataSource[DefaultDataSource]")
                                 ? jdbcDriverSvc.createAnyPreferXADataSource(vProps, id)
                                 : jdbcDriverSvc.createAnyPreferLegacyOrder(vProps, id);
                      ifc = vendorImpl instanceof XADataSource ? XADataSource.class
                          : vendorImpl instanceof ConnectionPoolDataSource ? ConnectionPoolDataSource.class
                          : vendorImpl instanceof DataSource ? DataSource.class
                          : Driver.class;
                  } else if (ConnectionPoolDataSource.class.getName().equals(type)) {
                      ifc = ConnectionPoolDataSource.class;
                      vendorImpl = jdbcDriverSvc.createConnectionPoolDataSource(vProps, id);
                  } else if (XADataSource.class.getName().equals(type)) {
                      ifc = XADataSource.class;
                      vendorImpl = jdbcDriverSvc.createXADataSource(vProps, id);
                  } else if (DataSource.class.getName().equals(type)) {
                      ifc = DataSource.class;
                      vendorImpl = jdbcDriverSvc.createDataSource(vProps, id);
                  } else if (Driver.class.getName().equals(type)) {
                      ifc = Driver.class;
                      String url = vProps.getProperty("URL", vProps.getProperty("url"));
                      if (url != null && !"".equals(url)) {
                          vendorImpl = jdbcDriverSvc.getDriver(url, vProps, id);
                      } else 
                          throw new SQLNonTransientException(AdapterUtil.getNLSMessage("DSRA4014.URL.for.Driver.missing", jndiName == null ? id : jndiName));
                  } else
                      throw new SQLNonTransientException(ConnectorService.getMessage("MISSING_RESOURCE_J2CA8030", DSConfig.TYPE, type, DATASOURCE, jndiName == null ? id : jndiName));
  
                  mcf1 = new WSManagedConnectionFactoryImpl(dsConfigRef, ifc, vendorImpl, jdbcRuntime);
                  WSManagedConnectionFactoryImpl mcf0 = mcfPerClassLoader.putIfAbsent(identifier, mcf1);
                  mcf1 = mcf0 == null ? mcf1 : mcf0;
  
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, mcf0 == null ? "created" : "found", mcf1);
              }
          } else
              mcf1 = mcf;
  
          return mcf1;
      }