Long story short: I just used org.osgi.framework.bootdelegation. I tried using the XPath API for specifying the classloader. My initial attempt was this:
XPathFactory xpathFactory = XPathFactory.newInstance(XPathFactory.DEFAULT_OBJECT_MODEL_URI, "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl", XPathFactory.class.getClassLoader()); Which is horrible because I have to specify the impl as I said in my previous email. Anyway, this didn't work because XPathFactory.class.getClassLoader() resolves to null, I guess because XPathFactory is loaded by the boot classpath class loader. I'm not sure on the best way to get the boot classpath class loader in an OSGi environment. Because the class loader is null, XPathFactory falls back to using the context class loader again. I decided that the improvement gleaned from using the specific ClassLoader API was reduced significantly by having to specify the XPathFactoryImpl name anyway, and so I am just going to use bootdelegation. Dan

