I have implemented a CacheLoader and I noticed that the exists(Fqn) method is being called in respose to TreeCache.get() with the same Fqn multiple times. This is happening as it walks the Fqn down to my node. This seems incorrect - I would expect the Fqn passed to exists() to start at the root and gradually extend in each call.
Is this a bug? If yes, then the erroneous code below is from CacheLoaderInteceptor.loadNode(Fqn) in 1.2 (AS 4.0.1sp1). I think the loader.exists(fqn) call should be load.exists(tmp_fqn).
if(loader.exists(fqn)) { child_node=n.createChild(child_name, tmp_fqn, n, TreeCache.UNINITIALIZED, null); cache.notifyNodeLoaded(tmp_fqn); }
You are right: I'll fix this in CVS and it'll be ready in the next release (1.2.2).
Thanks for this useful bug report !
Bela