Hey again. JAXP has javax.xml.parsers.DocumentBuilderFactory and javax.xml.transform.TransformerFactory, which are used to create a factory implementation. Both have some sequence of searching to the factory implementation name. One of the steps is quoted below (from javax.xml.parsers.DocumentBuilderFactory's javadoc):
========START QUOTE========= Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.parsers.DocumentBuilderFactory in jars available to the runtime. Platform default DocumentBuilderFactory instance. ========END QUOTE========= My question is- what is this "services API"? I've been looking in the JAR file specification, and all I could see there is just a short explanation about this mechanism. There was no API there. They gave an example there, which uses a class named "Service" and a method called "providers", but I couldn't find this "Service" class anywhere. The problem is, that currently, Apache's version of javax.xml.parsers.DocumentBuilderFactory (as well as javax.xml.transform.TransformerFactory) uses "the hard way" in order to get this data (constructing an input stream, a reader etc. to read the file, then read the line in that file etc.). Anyway, logically, if the "service provider" issue is so standardized, it's obvious that some programmatic API should be supplied. This way, we can avoid bugs like #2291 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2291). Any comments? Did I miss anything? - Isaac --------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
