[jboss-cvs] JBossCache/src/org/jboss/cache/loader ...
Manik Surtani
msurtani at jboss.com
Thu Nov 9 09:47:32 EST 2006
User: msurtani
Date: 06/11/09 09:47:32
Modified: src/org/jboss/cache/loader ClusteredCacheLoader.java
Log:
Fixed recursive call on clustered get() when doing a put()
Revision Changes Path
1.17 +14 -8 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.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- ClusteredCacheLoader.java 26 Oct 2006 19:30:20 -0000 1.16
+++ ClusteredCacheLoader.java 9 Nov 2006 14:47:32 -0000 1.17
@@ -44,8 +44,6 @@
/**
* Sets the configuration.
* A property <code>timeout</code> is used as the timeout value.
- *
- * @param props properties to use
*/
public void setConfig(IndividualCacheLoaderConfig base)
{
@@ -141,10 +139,18 @@
public Object put(Fqn name, Object key, Object value) throws Exception
{
+ if (cache.getInvocationContext().isOriginLocal())
+ {
Object o[] = {name, key, 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