Hi Michael,

Provided that your code is ensuring that only one thread is accessing the 
DOM at a time (i.e. the whole structure, not just one node) you should be 
fine.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

Michael S. Daly <[EMAIL PROTECTED]> wrote on 04/30/2007 03:25:31 PM:

> Michael Glavassevich <mrglavas <at> ca.ibm.com> writes:
> 
> 
> > No. For example, you will run into trouble with NodeLists. Internally 
they 
> > cache the length and previously accessed position to improve the 
> > performance of calls to getLength() and item(i). Invoking these 
methods 
> > from multiple threads (even on different NodeLists) without 
synchronizing 
> > your application code will lead to the exceptions [1] observed by 
> > Prashant. You can't count on the other read operations being 
thread-safe 
> > either.
> > 
> 
> > [1] Caused by: java.lang.NullPointerException
> >  at org.apache.xerces.dom.ParentNode.nodeListGetLength(Unknown Source)
> >  at org.apache.xerces.dom.ParentNode.getLength(Unknown Source)
> > 
> 
> I'm running into this issue within my application. Aside from 
> synchronizing the
> code that calls these methods, are there any additional steps that need 
to be
> taken to resolve this issue?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to