[jboss-cvs] JBossCache/src/org/jboss/cache/loader ...
Manik Surtani
msurtani at jboss.com
Thu Nov 9 09:47:04 EST 2006
User: msurtani
Date: 06/11/09 09:47:04
Modified: src/org/jboss/cache/loader Tag: Branch_JBossCache_1_4_0
ClusteredCacheLoader.java
Log:
Fixed recursive call on clustered get() when doing a put()
Revision Changes Path
No revision
No revision
1.9.2.1 +8 -0 JBossCache/src/org/jboss/cache/loader/ClusteredCacheLoader.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ClusteredCacheLoader.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/ClusteredCacheLoader.java,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -b -r1.9 -r1.9.2.1
--- ClusteredCacheLoader.java 16 May 2006 22:42:28 -0000 1.9
+++ ClusteredCacheLoader.java 9 Nov 2006 14:47:04 -0000 1.9.2.1
@@ -136,10 +136,18 @@
public Object put(Fqn name, Object key, Object value) throws Exception
{
+ if (cache.getInvocationContext().isOriginLocal())
+ {
Object o[] = { name, key, Boolean.TRUE };
MethodCall call = MethodCallFactory.create(MethodDeclarations.getKeyValueMethodLocal, o);
return callRemote(call);
}
+ else
+ {
+ log.trace("Call originated remotely. Not bothering to try and do a clustered get() for this put(). Returning null.");
+ return null;
+ }
+ }
/**
* Does nothing; replication handles put.
More information about the jboss-cvs-commits
mailing list