You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Andy Clark <an...@apache.org> on 2001/02/01 03:36:23 UTC

Re: Thread safety

Siddangouda Sankanagouda wrote:
> Anybody knows 'importNode' of DocumentImpl is thread safe. When mutiple
> threads calls importNode of DocumentImpl and trying to import the same Node
> I am getting this error. But with only one thread running,it works fine.
> Please help me..

One more time: THE DOM IMPLEMENTATION IS ___NOT___ THREAD SAFE.
You must supply your own synchronization around the operations
that you want to be thread safe. It is not worth the performance
penalty of synchronizing the entire DOM implementation, so you
are required to do that work when you access the tree from
multiple threads.

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org