static Object find(String factoryId,String fallbackClassName) throws ConfigurationError {
  dPrint("find factoryId =" + factoryId);
  try {
    String systemProp=ss.getSystemProperty(factoryId);
    if (systemProp != null) {
      dPrint("found system property, value=" + systemProp);
      return newInstance(systemProp,null,true,false,true);
    }
  }
 catch (  SecurityException se) {
    if (debug)     se.printStackTrace();
  }
  try {
    String factoryClassName=null;
    if (firstTime) {
synchronized (cacheProps) {
        if (firstTime) {
          String configFile=ss.getSystemProperty("java.home") + File.separator + "lib"+ File.separator+ "jaxp.properties";
          File f=new File(configFile);
          firstTime=false;
          if (ss.doesFileExist(f)) {
            dPrint("Read properties file " + f);
            cacheProps.load(ss.getFileInputStream(f));
          }
        }
      }
    }
    factoryClassName=cacheProps.getProperty(factoryId);
    if (factoryClassName != null) {
      dPrint("found in $java.home/jaxp.properties, value=" + factoryClassName);
      return newInstance(factoryClassName,null,true,false,true);
    }
  }
 catch (  Exception ex) {
    if (debug)     ex.printStackTrace();
  }
  Object provider=findJarServiceProvider(factoryId);
  if (provider != null) {
    return provider;
  }
  if (fallbackClassName == null) {
    throw new ConfigurationError("Provider for " + factoryId + " cannot be found",null);
  }
  dPrint("loaded from fallback value: " + fallbackClassName);
  return newInstance(fallbackClassName,null,true,false,true);
}

static Object find ( String factoryId , String fallbackClassName ) throws ConfigurationError { dPrint ( "find factoryId =" + factoryId ) ; try { String systemProp = ss . getSystemProperty ( factoryId ) ; if ( systemProp != null ) { dPrint ( "found system property, value=" + systemProp ) ; return newInstance ( systemProp , null , true , false , true ) ; } } catch ( SecurityException se ) { if ( debug ) se . printStackTrace ( ) ; } try { String factoryClassName = null ; if ( firstTime ) { synchronized ( cacheProps ) { if ( firstTime ) { String configFile = ss . getSystemProperty ( "java.home" ) + File . separator + "lib" + File . separator + "jaxp.properties" ; File f = new File ( configFile ) ; firstTime = false ; if ( ss . doesFileExist ( f ) ) { dPrint ( "Read properties file " + f ) ; cacheProps . load ( ss . getFileInputStream ( f ) ) ; } } } } factoryClassName = cacheProps . getProperty ( factoryId ) ; if ( factoryClassName != null ) { dPrint ( "found in $java.home/jaxp.properties, value=" + factoryClassName ) ; return newInstance ( factoryClassName , null , true , false , true ) ; } } catch ( Exception ex ) { if ( debug ) ex . printStackTrace ( ) ; } Object provider = findJarServiceProvider ( factoryId ) ; if ( provider != null ) { return provider ; } if ( fallbackClassName == null ) { throw new ConfigurationError ( "Provider for " + factoryId + " cannot be found" , null ) ; } dPrint ( "loaded from fallback value: " + fallbackClassName ) ; return newInstance ( fallbackClassName , null , true , false , true ) ; }
finds the implementation class object in the specified order . main entry point .
