geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dain Sundstrom (JIRA)" <>
Subject [jira] Created: (GERONIMO-2224) Add a geronimo specific system property for controlling dom, sax, and transformer creation
Date Mon, 24 Jul 2006 21:04:13 GMT
Add a geronimo specific system property for controlling dom, sax, and transformer creation

                 Key: GERONIMO-2224
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: core
            Reporter: Dain Sundstrom
         Assigned To: Dain Sundstrom
             Fix For: 1.1.1, 1.2

It is common for poorly coded application to set the javax.xml.parsers.DocumentBuilderFactory,
javax.xml.parsers.SAXParserFactory, or javax.xml.transform.TransformerFactory properties directly.
 If the value of these system properties do not point to a modern xml parser such as xerces,
critical Geronimo services such as the LocalAttributeManager will stop working.  This due
to only modern parsers supporting the setAttribute method on the factory (specifically crimson
throws an exception).  

The attached patch redirects all call to DocumentBuilderFactory.newInstance(), SAXParserFactory.newInstance()
and TransformerFactory.newInstance() to a Geronimo XmlUtil class.  This class checks the property
geronimo.xml.parsers.DocumentBuilderFactory, geronimo.xml.parsers.SAXParserFactory, or geronimo.xml.transform.TransformerFactor,
and if present creates that factory.  Otherwise the code simply delegates to the default newInstance

Once this patch has been committed the server can be launched with a full xml factory declaration
using the following command:

java \
    -Dgeronimo.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \
    -jar bin/server.jar

* This patch includes a test case for the new functionality.
* This patch includes two new classes which must be svn added.  

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message