ClassLoader cl = ss.getContextClassLoader(); if (cl != null) { is = ss.getResourceAsStream(cl, serviceId); is = ss.getResourceAsStream(cl, serviceId); is = ss.getResourceAsStream(cl, serviceId);
String systemProp = ss.getSystemProperty(factoryId); if (systemProp != null) { dPrint("found system property, value=" + systemProp); 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));
cl = ss.getContextClassLoader(); if (cl == null) { throw new ClassNotFoundException();
String systemProp = SecuritySupport.getSystemProperty(factoryId); if (systemProp != null) { if (debug) debugPrintln("found " + systemProp + " in the system property " + factoryId); String javah = SecuritySupport.getSystemProperty("java.home"); String configFile = javah + File.separator + "lib" + File.separator + "jaxp.properties"; String factoryClassName = null; File f = new File(configFile); firstTime = false; if (SecuritySupport.doesFileExist(f)) { if (debug) debugPrintln("Read properties file " + f); cacheProps.load(SecuritySupport.getFileInputStream(f));
classLoader = SecuritySupport.getContextClassLoader();
ClassLoader cl = SecuritySupport.getContextClassLoader(); if (cl != null) { is = SecuritySupport.getResourceAsStream(cl, serviceId); cl = ClassLoader.getSystemClassLoader(); is = SecuritySupport.getResourceAsStream(cl, serviceId); cl = ClassLoader.getSystemClassLoader(); is = SecuritySupport.getResourceAsStream(cl, serviceId);
/** * @return New instance of a <code>DocumentBuilderFactory</code> * * @throws javax.xml.datatype.DatatypeConfigurationException If the implementation is not * available or cannot be instantiated. */ public static DatatypeFactory newInstance(String factoryClassName, ClassLoader classLoader) throws DatatypeConfigurationException { if (factoryClassName == null) { throw new DatatypeConfigurationException("factoryClassName cannot be null."); } if (classLoader == null) { classLoader = SecuritySupport.getContextClassLoader(); } try { return (DatatypeFactory) FactoryFinder.newInstance(factoryClassName, classLoader); } catch (FactoryFinder.ConfigurationError e) { throw new DatatypeConfigurationException(e.getMessage(), e.getException()); } }