[jdom-interest] static data needs to be thread data for
jools at jools.org
Wed Sep 20 03:09:30 PDT 2000
Nick Reeves wrote:
> Let me make clear first of all I am not asking for individual JDOM Objects
> to be thread safe. I fully agree that the caller should be responsible for
> this, following the example of the Java Collections API.
> However where the class has hidden static data (such as
> Namespace.namespaces)the class must be responsible for making access to this
> thread safe otherwise multithreaded applications such as your typical Web or
> EJB case, have no choice but to single thread all use of the JDOM packages
> :(. This would lead to appalling performance in any realistic use.
> At present multihreaded use of Namespace.getNamespace even indirectly (eg by
> importing files in different threads) will cause random failures with
I'm using JDOM in a multithreaded EJB application, and I've not come
any issues so far, and I'd hate to have something like this slip through
fingers prior to deployment ;-(
BTW I'm using a fairly simple methodology, one update thread, and
read threads. I've not seen any problems as yet.
More information about the jdom-interest