[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Sat Dec 9 10:14:26 EST 2006
User: msurtani
Date: 06/12/09 10:14:26
Modified: src/org/jboss/cache Tag: Branch_JBossCache_1_4_0
TreeCache.java
Log:
Temporarily disabled anycast
Revision Changes Path
No revision
No revision
1.195.2.32 +23 -12 JBossCache/src/org/jboss/cache/TreeCache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
retrieving revision 1.195.2.31
retrieving revision 1.195.2.32
diff -u -b -r1.195.2.31 -r1.195.2.32
--- TreeCache.java 8 Dec 2006 12:35:35 -0000 1.195.2.31
+++ TreeCache.java 9 Dec 2006 15:14:26 -0000 1.195.2.32
@@ -99,7 +99,7 @@
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @author Brian Stansberry
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Id: TreeCache.java,v 1.195.2.31 2006/12/08 12:35:35 msurtani Exp $
+ * @version $Id: TreeCache.java,v 1.195.2.32 2006/12/09 15:14:26 msurtani Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -1461,6 +1461,8 @@
cacheLoaderManager.startCacheLoader();
}
+ boolean startBuddyManager = false;
+
switch (cache_mode)
{
case LOCAL:
@@ -1487,16 +1489,7 @@
throw e;
}
}
- if (buddyManager != null)
- {
- buddyManager.init(this);
- if (use_repl_queue)
- {
- log.warn("Replication queue not supported when using buddy replication. Disabling repliction queue.");
- use_repl_queue = false;
- repl_queue = null;
- }
- }
+ startBuddyManager = true;
break;
default:
throw new IllegalArgumentException("cache mode " + cache_mode + " is invalid");
@@ -1508,10 +1501,23 @@
cacheLoaderManager.preloadCache();
}
+
// Find out if we are coordinator (blocks until view is received)
// TODO should this be moved above the buddy manager code??
determineCoordinator();
+ if (buddyManager != null && startBuddyManager)
+ {
+ buddyManager.init(this);
+ if (use_repl_queue)
+ {
+ log.warn("Replication queue not supported when using buddy replication. Disabling repliction queue.");
+ use_repl_queue = false;
+ repl_queue = null;
+ }
+ }
+
+
notifyCacheStarted();
}
@@ -4325,7 +4331,11 @@
log.trace("callRemoteMethods(): valid members are " + validMembers + " method: " + method_call);
// if we are using buddy replication, all calls should use ANYCAST. Otherwise, use the default (multicast). Unless anycast is forced
- rsps = callRemoteMethodsViaReflection(validMembers, method_call, mode, timeout, forceAnycast || buddyManager != null && buddyManager.isEnabled());
+
+ // TODO; Disabling anycast for now. Fix once this bug is fixed in JGroups.
+
+ rsps = callRemoteMethodsViaReflection(validMembers, method_call, mode, timeout, false);//forceAnycast || buddyManager != null && buddyManager.isEnabled());
+ //rsps = callRemoteMethodsViaReflection(validMembers, method_call, mode, timeout, forceAnycast || buddyManager != null && buddyManager.isEnabled());
// a null response is 99% likely to be due to a marshalling problem - we throw a NSE, this needs to be changed when
// JGroups supports http://jira.jboss.com/jira/browse/JGRP-193
@@ -5066,6 +5076,7 @@
*/
public Object _replicate(MethodCall method_call) throws Throwable
{
+ if (log.isTraceEnabled()) log.trace(getLocalAddress() + " received call " + method_call);
JBCMethodCall jbcCall = (JBCMethodCall) method_call;
try
{
More information about the jboss-cvs-commits
mailing list