Hi, This issue is fixed in Rampart-1.1 which can be used with Axis2-1.1 and Axis2-1.1.1
We are not using the setDOOMRequired(). Instead we figured that we do NOT have to change the document builder factory at all to work with XML-Security. Please try out Rampart-1.1 with any of the applicable Axis2 versions and let us know if you are still having issues. Right now the only place where we change the dom impl is situations where we use SAML in the WS-Trust implementation. This is because of opensaml. We should be able to send a patch to opensaml before the next release of Rampart to rectify this as well. Thanks, Ruchith On 2/9/07, Yevgeny Rouban <[EMAIL PROTECTED]> wrote:
Hello. The threading fix committed to the Axiom DOM by Ruchith Fernando [1] seems to not resolve the problem. 1. Imagine two threads enter the method setDOOMRequired(true). The faster one calls System.setProperty(systemKey, DocumentBuilderFactoryImpl.class.getName()). Then the slower thread executes originalDocumentBuilderFactory = DocumentBuilderFactory.newInstance(). This time the originalDocumentBuilderFactory gets lost, because it becomes org.apache.axiom.om.impl.dom.jaxp.DocumentBuilderFactoryImpl. 2. Another way to break the application for two threads is to call setDOOMRequired(false) by one thread while the other is in DOOMRequired state and is going to get a DocumentBuilderFactory. The later thread will get original Document Builder (probably Xerces) rather than DOOM because the system wide property is reset by the first thread. I do not know a good fix for the problem other than thread synchronization. Another way (a bit clumsy) I see is to remove system property and set up a thread context class loader which overrides Jar Service Provider Mechanism via getResourceAsStream for META-INF/services/javax.xml.parsers.DocumentBuilderFactory. This class loader should return org.apache.axiom.om.impl.dom.jaxp.DocumentBuilderFactoryImpl in DOOMRequired state and delegate to the parent class loader in non-DOOMRequired state. [1] http://marc.theaimsgroup.com/?l=axis-user&m=116237867100030&w=2 -- Yevgeny Rouban INTEL Middleware Products Division --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- www.ruchith.org www.wso2.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
