You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2008/12/14 13:26:44 UTC

[jira] Assigned: (WSCOMMONS-412) Get rid of the setDOOMRequired hack

     [ https://issues.apache.org/jira/browse/WSCOMMONS-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned WSCOMMONS-412:
-----------------------------------------

    Assignee: Andreas Veithen

After looking a bit more into this, I think that the existing DocumentBuilderFactoryImpl and DocumentBuilderImpl classes are not fixable without the risk of breaking existing code. What I will do is to deprecate them entirely and create two clean new implementations (DOOMDocumentBuilderFactory and DOOMDocumentBuilder) with all the hacks removed.

> Get rid of the setDOOMRequired hack
> -----------------------------------
>
>                 Key: WSCOMMONS-412
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-412
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: AXIOM
>         Environment: N/A
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> The DocumentBuilderFactoryImpl class has static methods that allow to switch between DOOM and the default DOM implementation as returned by JAXP. This was a hack introduced for Rampart. Recent versions of Rampart no longer rely on this hack. On the other hand usage of setDOOMRequired in a concurrent environment can lead to unexpected behavior and severe bugs, as shown in WSCOMMONS-210 and AXIS2-1570. Therefore we should get rid of this hack.
> We should do this in a way that doesn't break existing code and with a clear migration path. The proposal is to first deprecate the related methods and to remove them altogether in the next major release.
> One problem is the current implementation of newDocumentBuilder:
> public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException {
>     return isDOOMRequired() ? new DocumentBuilderImpl(this) : originalDocumentBuilderFactory.newDocumentBuilder();
> }
> Since isDOMMRequired returns false by default, this means that the current implementation of DocumentBuilderFactoryImpl can only be used in a meaningful way in conjunction with setDOOMRequired. This in turn implies that deprecation of setDOOMRequired is not sufficient.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.