FYI the term 'read only' is a convention not a enforcement in java. In Java, methods cannot be annotated as 'read only' so its a convention which may or may not be known to the user what methods may affect the underlying model.
In C++ its slightly better as you can annotate a method as 'const' which tells the user and compiler its a 'read only' method but imlementors can choose to implement const methods not thread-safe ... 'const' is only a hint to the caller that the model doesnt change semantically, not that it is thread-safe. So in some implementations of any class ... 'read' methods may or may not be thread safe depending on the implementation. ---------------------------------------- David A. Lee d...@calldei.com http://www.xmlsh.org -----Original Message----- From: David Lee [mailto:d...@calldei.com] Sent: Thursday, June 09, 2011 6:55 AM To: j-users@xerces.apache.org Cc: muk...@apache.org Subject: RE: DOM thread safety issues & disapearring children As per the discussions on this thread, the DOM implementations even when you only do only 'read' operations are not thread safe. ---------------------------------------- David A. Lee d...@calldei.com http://www.xmlsh.org -----Original Message----- From: Andrew Welch [mailto:andrew.j.we...@gmail.com] Sent: Thursday, June 09, 2011 6:39 AM To: j-users@xerces.apache.org Cc: muk...@apache.org Subject: Re: DOM thread safety issues & disapearring children On 9 June 2011 10:57, David Lee <d...@calldei.com> wrote: > Along this lines, there are thread save read-only XML tree models available, just not DOM. > Saxon's tree model is thread safe during read operations. I believe XOM is as well (not 100%). How can anything that is read-only not be thread safe? -- Andrew Welch http://andrewjwelch.com --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org