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

Guillaume Berche guillaume.berche at eloquant.com
Thu Jan 8 23:37:23 PST 2004


Brad,

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

Cheers,

Guillaume. 

> -----Original Message-----
> From: Bradley S. Huffman [mailto:hip at cs.okstate.edu]
> Sent: jeudi 8 janvier 2004 18:36
> To: Guillaume Berche
> Cc: jdom-interest at jdom.org
> 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
> 
> 




More information about the jdom-interest mailing list