[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Tue Oct 31 10:05:10 EST 2006
User: msurtani
Date: 06/10/31 10:05:10
Modified: src/org/jboss/cache TreeCache.java
Log:
JBCACHE-813
Revision Changes Path
1.260 +29 -13 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.259
retrieving revision 1.260
diff -u -b -r1.259 -r1.260
--- TreeCache.java 30 Oct 2006 03:53:03 -0000 1.259
+++ TreeCache.java 31 Oct 2006 15:05:10 -0000 1.260
@@ -49,7 +49,6 @@
import org.jgroups.Message;
import org.jgroups.MessageListener;
import org.jgroups.View;
-import org.jgroups.ViewId;
import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.RpcDispatcher;
import org.jgroups.stack.IpAddress;
@@ -92,7 +91,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.259 2006/10/30 03:53:03 bstansberry Exp $
+ * @version $Id: TreeCache.java,v 1.260 2006/10/31 15:05:10 msurtani Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -2334,9 +2333,26 @@
log.trace("callRemoteMethods(): valid members are " + validMembers + " methods: " + method_call.getArgs()[0]);
}
- // checkForNonSerializableArgs(method_call);
-
+ // this is a temporary workaround (JBCACHE-813) until AnyCast (JGRP-338) is available.
+ if (validMembers.size() == 1)
+ {
+ // use a UNICAST
+ try
+ {
+ Address recipient = (Address) validMembers.get(0);
+ Object r = disp.callRemoteMethod(recipient, method_call, mode, timeout);
+ rsps = new RspList();
+ rsps.addRsp(recipient, r);
+ }
+ catch (Throwable throwable)
+ {
+ throw new ReplicationException(throwable);
+ }
+ }
+ else
+ {
rsps = disp.callRemoteMethods(validMembers, method_call, mode, timeout);
+ }
// 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
More information about the jboss-cvs-commits
mailing list