[jboss-cvs] JBossAS SVN: r57950 - trunk/cluster/src/main/org/jboss/ha/framework/server
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 31 14:52:59 EST 2006
Author: jerrygauth
Date: 2006-10-31 14:52:57 -0500 (Tue, 31 Oct 2006)
New Revision: 57950
Modified:
trunk/cluster/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java
Log:
JBAS-3795, JBAS-3473
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java 2006-10-31 18:41:04 UTC (rev 57949)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java 2006-10-31 19:52:57 UTC (rev 57950)
@@ -496,7 +496,14 @@
* FIXME JBAS-3473
*/
public void nodeRemove(Fqn fqn, boolean pre, boolean isLocal) {
- if (pre && fqn.isChildOf(ROOTFQN) && fqn.size() == ROOTFQNSIZE + 2) {
+ // we're not interested in pre events or changes to another root in a shared cache instance
+ // we're also not interested in local changes as we issue our own notification
+ if (isLocal || pre || !fqn.isChildOf(ROOTFQN))
+ return;
+
+ // this logic currently doesn't work because key isn't stored as a node
+ /*
+ if (fqn.size() == ROOTFQNSIZE + 2) {
String category = (String) fqn.get(ROOTFQNSIZE);
Serializable key = (Serializable) fqn.get(ROOTFQNSIZE + 1);
try
@@ -511,6 +518,9 @@
", key " + key);
}
}
+ */
+ // for now, just return category name
+ notifyKeyListenersOfRemove((String)fqn.get(ROOTFQNSIZE), "", "", isLocal);
}
/**
@@ -524,7 +534,14 @@
* @see TreeCacheListener#nodeModified(Fqn)
*/
public void nodeModify(Fqn fqn, boolean pre, boolean isLocal) {
- if (!pre && fqn.isChildOf(ROOTFQN) && fqn.size() == ROOTFQNSIZE + 2) {
+ // we're not interested in pre events or changes to another root in a shared cache instance
+ // we're also not interested in local changes as we issue our own notification
+ if (isLocal || pre || !fqn.isChildOf(ROOTFQN))
+ return;
+
+ // this logic currently doesn't work because key isn't stored as a node
+ /*
+ if (fqn.size() == ROOTFQNSIZE + 2) {
String category = (String) fqn.get(ROOTFQNSIZE);
Serializable key = (Serializable)fqn.get(ROOTFQNSIZE + 1);
try
@@ -539,8 +556,11 @@
{
log.error("Caught exception getting value for category " + category +
", key " + key);
- }
+ }
}
+ */
+ // for now, just return category name
+ notifyKeyListeners((String)fqn.get(ROOTFQNSIZE), "", "", isLocal);
}
/** TreeCacheListener methods */
More information about the jboss-cvs-commits
mailing list