docs: public Object createAnyPreferLegacyOrder(Properties props, String dataSourceID) throws Exception {
          lock.readLock().lock();
          try {
              if (!isInitialized)
                  try {
                      // Switch to write lock for lazy initialization
                      lock.readLock().unlock();
                      lock.writeLock().lock();
                      
                      if (!isInitialized) {
                          if (!loadFromApp())
                              classloader = AdapterUtil.getClassLoaderWithPriv(sharedLib);
                          isInitialized = true;
                      }
                  } finally {
                      // Downgrade to read lock for rest of method
                      lock.readLock().lock();
                      lock.writeLock().unlock();
                  }
  
              String vendorPropertiesPID = props instanceof PropertyService ? ((PropertyService) props).getFactoryPID() : PropertyService.FACTORY_PID;
              String className;
  
              if (null != (className = (String) properties.get(ConnectionPoolDataSource.class.getName()))
               || null != (className = JDBCDrivers.getConnectionPoolDataSourceClassName(vendorPropertiesPID))
               || null != (className = JDBCDrivers.getConnectionPoolDataSourceClassName(getClasspath(sharedLib, true)))
  
               || null != (className = (String) properties.get(DataSource.class.getName()))
               || null != (className = JDBCDrivers.getDataSourceClassName(vendorPropertiesPID))
               || null != (className = JDBCDrivers.getDataSourceClassName(getClasspath(sharedLib, true)))
  
               || null != (className = (String) properties.get(XADataSource.class.getName()))
               || null != (className = JDBCDrivers.getXADataSourceClassName(vendorPropertiesPID))
               || null != (className = JDBCDrivers.getXADataSourceClassName(getClasspath(sharedLib, true))))
                  return create(className, props, dataSourceID);
  
              String url = props.getProperty("URL", props.getProperty("url"));
              if (url != null) {
                  Driver driver = loadDriver(null, url, classloader, props, dataSourceID);
                  if (driver != null)
                      return driver;
              }
  
              Set<String> packagesSearched = new LinkedHashSet<String>();
              SimpleEntry<Integer, String> dsEntry = JDBCDrivers.inferDataSourceClassFromDriver(classloader,
                                                                     packagesSearched,
                                                                     JDBCDrivers.CONNECTION_POOL_DATA_SOURCE,
                                                                     JDBCDrivers.DATA_SOURCE,
                                                                     JDBCDrivers.XA_DATA_SOURCE);
              if (dsEntry == null) {
                  List<String> interfaceNames = Arrays.asList(ConnectionPoolDataSource.class.getName(),
                                                              DataSource.class.getName(),
                                                              XADataSource.class.getName(),
                                                              Driver.class.getName());
                  throw classNotFound(interfaceNames, packagesSearched, dataSourceID, null);                
              }
  
              return create(className = dsEntry.getValue(), props, dataSourceID);
          } finally {
              lock.readLock().unlock();
          }
      }