[ 
http://issues.apache.org/jira/browse/GERONIMO-2224?page=comments#action_12425651
 ] 
            
Matt Hogstrom commented on GERONIMO-2224:
-----------------------------------------

Let's add this.  Its a bug :)...I'll pop it in.

> Add a geronimo specific system property for controlling dom, sax, and 
> transformer creation
> ------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2224
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2224
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: core
>            Reporter: Dain Sundstrom
>         Assigned To: Dain Sundstrom
>             Fix For: 1.2, 1.1.x
>
>         Attachments: factory.patch
>
>
> 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 
> implementation.
> 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.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
>  \
>     
> -Dgeronimo.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
>  \
>     
> -Dgeronimo.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
>  \
>     -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: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to