Java Mailing List Archive

http://www.junlu.com/

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

RE: [jdom-interest] Best strategy for caching JDom Document instance and provide concurrent read access to it?

Guillaume Berche

2004-01-09

Replies:

Brad,

Thanks a lot for your quick answer, this will make my day easier :-)

Cheers,

Guillaume.

> -----Original Message-----
> From: Bradley S. Huffman [mailto:hip@(protected)]
> Sent: jeudi 8 janvier 2004 18:36
> To: Guillaume Berche
> Cc: jdom-interest@(protected)
> Subject: Re: [jdom-interest] Best strategy for caching JDom Document
> instance and provide concurrent read access to it?
>
>
> "Guillaume Berche" writes:
>
> > Then I wonder whether JDom beta 8 or beta 9, would have problems with
> > concurrent read accesses. I've haven't yet read the code in
> details, but I
> > think I read somewhere that JDom was internally using lazy
> initialization
> > when traversing the tree and that concurrent accesses to it might cause
> > problems. Is this [still] true?
>
> Shouldn't be a problem in 8/9. Pre beta 7 (?) would create the
> content list
> (if it didn't exist) whenever getContent was called in
> anticipation that the
> user might want to add something through the List interface.
> This meant the
> internal structure got modified just from traversal. 7 and above
> create nothing until require by a actual add operation, so read-only
> traversal by multiple threads shouldn't be a problem.
>
> Brad
>
>

_______________________________________________
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.