[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Wed Oct 11 10:14:58 EDT 2006
User: msurtani
Date: 06/10/11 10:14:58
Modified: src/org/jboss/cache Tag: Branch_JBossCache_1_4_0
TreeCache.java
Log:
JBCACHE-786
Revision Changes Path
No revision
No revision
1.195.2.13 +13 -2 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.12
retrieving revision 1.195.2.13
diff -u -b -r1.195.2.12 -r1.195.2.13
--- TreeCache.java 11 Oct 2006 13:16:32 -0000 1.195.2.12
+++ TreeCache.java 11 Oct 2006 14:14:58 -0000 1.195.2.13
@@ -80,7 +80,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.12 2006/10/11 13:16:32 msurtani Exp $
+ * @version $Id: TreeCache.java,v 1.195.2.13 2006/10/11 14:14:58 msurtani Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -4833,6 +4833,7 @@
*/
public Object _replicate(MethodCall method_call) throws Throwable
{
+ JBCMethodCall jbcCall = (JBCMethodCall) method_call;
try
{
getInvocationContext().setOriginLocal(false);
@@ -4843,7 +4844,6 @@
// We replicating, we don't need to return the return value of the put-key-value
// methods and the return values will cause marshalling problems, so we
// omit them.
- JBCMethodCall jbcCall = (JBCMethodCall) method_call;
if (jbcCall.getMethodId() == MethodDeclarations.putKeyValMethodLocal_id ||
jbcCall.getMethodId() == MethodDeclarations.putFailFastKeyValueMethodLocal_id ||
jbcCall.getMethodId() == MethodDeclarations.removeKeyMethodLocal_id)
@@ -4853,6 +4853,17 @@
}
catch (Exception ex)
{
+ // patch from Owen Taylor (otaylor at redhat.com) to fix JBCACHE-786
+ // The point of putFailFast() is to allow the caller to catch and ignore timeouts;
+ // but they don't get a chance to do that for the (always async) replicated version,
+ // so we just ignore timeout exceptions for putFailFast here.
+
+ if (jbcCall.getMethodId() == MethodDeclarations.putFailFastKeyValueMethodLocal_id && ex instanceof TimeoutException)
+ {
+ log.debug("ignoring timeout exception when replicating putFailFast");
+ return null;
+ }
+
log.warn("replication failure with method_call " +method_call + " exception: " +ex);
throw ex;
}
More information about the jboss-cvs-commits
mailing list