[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Brian Stansberry
brian.stansberry at jboss.com
Tue Jan 23 00:37:34 EST 2007
User: bstansberry
Date: 07/01/23 00:37:34
Modified: src/org/jboss/cache/interceptors
CacheLoaderInterceptor.java
Log:
[JBCACHE-945] Send post-activation notification after the node is in the tree
Revision Changes Path
1.75 +27 -12 JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- CacheLoaderInterceptor.java 19 Jan 2007 14:47:40 -0000 1.74
+++ CacheLoaderInterceptor.java 23 Jan 2007 05:37:34 -0000 1.75
@@ -28,7 +28,7 @@
* Loads nodes that don't exist at the time of the call into memory from the CacheLoader
*
* @author Bela Ban
- * @version $Id: CacheLoaderInterceptor.java,v 1.74 2007/01/19 14:47:40 msurtani Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.75 2007/01/23 05:37:34 bstansberry Exp $
*/
public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
{
@@ -427,9 +427,22 @@
if (nodeData != null)
{
log.trace("Node data is not null, loading");
+
+ cache.getNotifier().notifyNodeLoaded(fqn, true, Collections.emptyMap(), true);
+ if (isActivation)
+ {
+ cache.getNotifier().notifyNodeActivated(fqn, true, true);
+ }
+
n = createNodes(fqn, entry);
// n.clearDataDirect();
n.putAllDirect(nodeData);
+
+ cache.getNotifier().notifyNodeLoaded(fqn, false, nodeData, true);
+ if (isActivation)
+ {
+ cache.getNotifier().notifyNodeActivated(fqn, false, true);
+ }
}
if (n != null && !n.getDataLoaded())
@@ -553,17 +566,19 @@
// warnCustom();
// }
- if (nodeExists)
- {
- cache.getNotifier().notifyNodeLoaded(fqn, true, Collections.emptyMap(), true);
- cache.getNotifier().notifyNodeLoaded(fqn, false, nodeData, true);
-
- if (isActivation)
- {
- cache.getNotifier().notifyNodeActivated(fqn, true, true);
- cache.getNotifier().notifyNodeActivated(fqn, false, true);
- }
- }
+ // BES Jan-21-2007 Do the notifications in loadNode, before and after
+ // we create nodes
+// if (nodeExists)
+// {
+// cache.getNotifier().notifyNodeLoaded(fqn, true, Collections.emptyMap(), true);
+// cache.getNotifier().notifyNodeLoaded(fqn, false, nodeData, true);
+//
+// if (isActivation)
+// {
+// cache.getNotifier().notifyNodeActivated(fqn, true, true);
+// cache.getNotifier().notifyNodeActivated(fqn, false, true);
+// }
+// }
return nodeData;
}
More information about the jboss-cvs-commits
mailing list