Author: manik.surtani(a)jboss.com
Date: 2007-12-19 22:30:17 -0500 (Wed, 19 Dec 2007)
New Revision: 4890
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
Log:
fixed recursive invocations, e.g., via cache listeners where the context is set to null
(i.e., removed)
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2007-12-20
03:11:39 UTC (rev 4889)
+++
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2007-12-20
03:30:17 UTC (rev 4890)
@@ -289,7 +289,9 @@
public void setInvocationContext(InvocationContext ctx)
{
- invocationContextContainer.set(ctx);
+ // assume a null ctx is meant to "un-set" the context?
+ if (ctx == null) invocationContextContainer.remove();
+ else invocationContextContainer.set(ctx);
}
public Address getLocalAddress()