axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yevgeny Rouban" <>
Subject Re: [Axis2-1.0] Rampart/Axoim Threading Issues
Date Fri, 09 Feb 2007 13:21:49 GMT

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,
Then the slower thread executes originalDocumentBuilderFactory =
DocumentBuilderFactory.newInstance(). This time the
originalDocumentBuilderFactory gets lost, because it becomes

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 in
DOOMRequired state and delegate to the parent class loader in
non-DOOMRequired state.


Yevgeny Rouban
INTEL Middleware Products Division

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message