Hi Nikolay, nikolayo <[EMAIL PROTECTED]> wrote on 10/07/2008 08:48:21 AM:
> Sorry for resurrecting this but it is probably a very important issue for a big > number of people who e.g. use DOM in JEE environment. My questions are : > > 1/ Is there any new development over the last year or so since the > discussion occurred or is status unchanged? No development and unlikely to happen for the reasons Joe and I gave last year when this thread was started. > 2/ Is it at least thread safe approach to use cloned copies of Documents. If I > provide multiple threads with copies generated from a single Document by > multiple calls to nodeClone() then can those threads safely use their personal > cloned copies? For read only? For read/write? I think in this scenario threads > should be granted full R/W ownership of their cloned copies but I do not > know whether this is the case in Xerces (and I can imagine deferred > execution implementations of cloneNode which would not provide this type of > thread safety). Should probably work with Xerces but no guarantee that it will work in general. Aside from having no general guarantee of thread-safety, the behaviour of cloneNode() [1] for the Document node is implementation dependent. > Regards > Nikolay Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/Node.html#cloneNode(boolean) Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED]