Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] JDOM/Xerces: Thread Safe

New, Cecil (GEAE)

2003-10-31

Replies:

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@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.