Hi Michael,

 

This is really strange that read also needs to be synchronized and due to the performance / caching mechanism developers will get the nullpointerexception while reading it in multi threaded environment.

 

Is our case, we need to create the DOM once and reads multiple times in a concurrent access. I think it may be worth implementing a higher level read-only(immutable) Data tree that reads only once from the DOM/SAX.

 

Thanks again for all the help.

Thanks,
Soumya Chatterjee
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________


Michael Glavassevich <[EMAIL PROTECTED]>

07/24/2007 09:57 AST


To  

Soumya Chatterjee <[EMAIL PROTECTED]>

cc  

j-users@xerces.apache.org

bcc  


Subject  

Re: Got the Issue


Hi Soumya,

Xerces' DOM implementation isn't thread-safe. If you try to access the
same DOM instance from multiple threads without synchronizing it you'll
run into these problems. You either need to synchronize your code or
create an instance of the DOM tree per thread. There's really no way
around it.

Thanks.

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

Soumya Chatterjee <[EMAIL PROTECTED]> wrote on 07/24/2007 09:42:08
AM:

> Hi Michael,
>
> I found out the response from you regarding the "xerces DOM
> concurrent access" and I think it is the same as our application in
> the case.  http://spteam-lists.blogspot.com/2007/04/re-xerces-dom-
> concurrent-access-and.html
>
> By the way we were not getting the exception as frequently  in the
> weblogic 7.1 ( JDK 1.3) when we are using the following Xerces.
>
> But we are getting the exception in case of weblogic 9.1 much more
> frequently which uses JDK1.5 and different version of Xerces.
>
> Synchronization is not an option in this case because there is a
> huge performance issue here. Please let me know if any way we can
> get read of this problem without using the Synchronization  block.
>
> Thanks,
> Soumya Chatterjee
> Tata Consultancy Services
> Mailto: [EMAIL PROTECTED]
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty.        IT Services
>                        Business Solutions
>                        Outsourcing
> ____________________________________________
ForwardSourceID:NT00020C32
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Reply via email to