[jdom-interest] JDOM/Xerces: Thread Safe
Bradley S. Huffman
hip at cs.okstate.edu
Fri Oct 31 09:36:22 PST 2003
JDOM is not thread safe, neither is Xerces :(
Brad
"New, Cecil (GEAE)" writes:
> We have a number of apps that use some common JDOM/Xerces code. We have
> seen periodic failures and our testing points to some sort of
> multithreading/concurrency issues.
>
> Setup:
> Weblogic 5.1 on Sun OS
> JDK 1.3.0_03
> Xerces 1.2.1
> JDOM beta8
> Using DOM Parser
>
> Some findings might help:
> (note:parser instance is different in each thread)
>
> (1) set validation to false ... seems to work fine with threads. However,
> we don't consider this a viable solution or workaround :-)
>
> (2) if each thread parses the same xml ... all threads fail invariably ..
> gives a "duplicate element " kind of exception
> If i print the Document from memory, sometimes it prints all the files
> properly, sometimes more than 1 fail.
>
> (3) if each thread parses a differnt xml
> Seems to pass ... if the xml is small ... fails erratically sometimes with
> NullPointerException.
>
> Thanks for your help!
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost
> .com
More information about the jdom-interest
mailing list