I'm not too sure the lazy copy approach helps here. I think it is a good idea, but
won't solve the scalability issue in the original post since it will still involve a
map copy of tens of thousands of entries.
And this will happen every time you put an entity in the 2nd level cache.
Going back to my suggestion of not actually copying the child map but only loading
specific children as they are accessed, this does add a bit more complexity by way of
keeping track of each child node loaded and it's status, but I think this quite
effectively solves your scalability problem.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060311#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...