[jdom-interest] Thread safe question: OK for simultaneous read-only access?

Bradley S. Huffman hip at a.cs.okstate.edu
Sun Oct 28 09:11:04 PST 2001

> > > If one thread is processing <c>, and another takes <b>, and removes
> > > it from the document altogether, then where does that leave the guy
> > > processing <c>?
> > 
> > Does he really care?  His view is at <c> and it's descendents.  
> The kicker is that he *might not* be only concerned with descendants.

My response would be he should of took a lock higher up.  But I agree,
leave locking out of JDOM, to many issues which go against the original
goal of simplification and ease of use, and delegate it to the application.

But if anyone is interested it might be worthwhile to take a look at
the design of IBM's IMS database.  It's hierarchical (before relational
DBs became the rage) and had to deal with these same issues back in
the 70's.  Which leads me to wonder why IBM hasn't dusty off the code,
put a wrapper around it, and sold it as a new enterprise class XML
database :)

More information about the jdom-interest mailing list