-
1. Re: TreeCacheListener doesn't receive all cache events
brian.stansberry Jun 1, 2006 9:42 PM (in response to sgielen)From what you wrote I'm guessing that the other class directly manipulated the Node object to do its update, rather than calling cache.put().
You'll only get notifications if operations are performed on the cache. Directly manipulating Node objects will bypass all the logic that results in things like notifications, replication, locking, etc.
In 2.0 we are going to change the JBossCache API won't even expose the Node object so people won't be tempted to bypass the cache. -
2. Re: TreeCacheListener doesn't receive all cache events
sgielen Jun 1, 2006 9:55 PM (in response to sgielen)You guessed right...
So that means I have to pass a reference to the TreeCache object instead? The nice thing of being able to just pass the Node is that the class doesn't have to worry about the location in the tree. Now I'll need to pass the Fqn of the branch as well as a reference point. Because I didn't want the whole tree exposed in the sub class, just the branch it's allowed to use.
Is that correct? -
3. Re: TreeCacheListener doesn't receive all cache events
brian.stansberry Jun 2, 2006 12:23 AM (in response to sgielen)If you don't want to expose the cache, pass an object that talks to the cache and exposes the API you need.
-
4. Re: TreeCacheListener doesn't receive all cache events
manik Jun 2, 2006 11:39 AM (in response to sgielen)
In 2.0 we are going to change the JBossCache API won't even expose the Node object so people won't be tempted to bypass the cache.
This is not actually true at all. We're changing it so that the Node becomes a top level construct, and the Cache is just a wrapper around the root Node. All listeners, interceptors, etc. will intercept calls on the Node.
The reason for doing this is that it leads to a far cleaner object model, and allows for each Node to act independently of the overall Cache - a bit like a JNDI context.
See http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheHabanero for more info.
Cheers,
Manik