I agree that it is less than ideal. Also, there is an additional concern with any approach that relies on the state of the cache nodes -- if you flag that the children have been loaded, what happens when one of them gets evicted. Does the flag get cleared? For consistancies-sake, it would have to, but this adds another layer of complexity.
An alternative would be for CacheLoaderInterceptor to either always call getChildrenNames for that call (and consequently not have to stub-out the children), or to cache the child names separately from the child nodes. My temporary solution to this was actually along the lines of the first option -- I inserted an extra interceptor before the CacheLoaderInterceptor (I know this is probably bad on all kinds of levels) that traps the getChildrenNames call and always calls it on my CacheLoader. ...or you could remove getChildrenNames from CacheLoader altogether, and state that the call on the cache only returns children that are currently loaded, and avoid this whole mess. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3873037#3873037 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3873037 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
