geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Hogstrom (JIRA)" <...@geronimo.apache.org>
Subject [jira] Commented: (GERONIMO-2224) Add a geronimo specific system property for controlling dom, sax, and transformer creation
Date Fri, 04 Aug 2006 02:26:15 GMT
    [ http://issues.apache.org/jira/browse/GERONIMO-2224?page=comments#action_12425655 ] 
            
Matt Hogstrom commented on GERONIMO-2224:
-----------------------------------------

This is actually a bug.  A user reported that the server became unstable when they set this
property and we could no longer update the config.xml because of a missing parser exception.
 This provides a fix to protect the server.  We probably need something more sophisticated
to do this in the future so the user doesn't have to specify anything but this patch works
for now.

This should be applied now to branches/1.1.1 and 1.1.  My bad for missing this .  Thanks Dain!

> 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

        

Mime
View raw message