[jbosscache-commits] JBoss Cache SVN: r6652 - in core/trunk/src/main/java/org/jboss/cache: notifications and 1 other directory.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Mon Sep 1 03:45:37 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-09-01 03:45:36 -0400 (Mon, 01 Sep 2008)
New Revision: 6652

Modified:
   core/trunk/src/main/java/org/jboss/cache/invocation/LegacyInvocationContext.java
   core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java
Log:
Fixed stuff in invocation context

Modified: core/trunk/src/main/java/org/jboss/cache/invocation/LegacyInvocationContext.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/LegacyInvocationContext.java	2008-09-01 07:08:56 UTC (rev 6651)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/LegacyInvocationContext.java	2008-09-01 07:45:36 UTC (rev 6652)
@@ -5,6 +5,7 @@
 import org.jboss.cache.InvocationContext;
 import org.jboss.cache.NodeSPI;
 
+import java.util.Collections;
 import java.util.Map;
 
 /**
@@ -31,7 +32,7 @@
 
    public void putLookedUpNode(Fqn f, NodeSPI n)
    {
-      throw new UnsupportedOperationException("Should not be called on legacy locking schemes!");
+      // a no-op by default.
    }
 
    public void putLookedUpNodes(Map<Fqn, NodeSPI> lookedUpNodes)
@@ -46,7 +47,8 @@
 
    public Map<Fqn, NodeSPI> getLookedUpNodes()
    {
-      throw new UnsupportedOperationException("Should not be called on legacy locking schemes!");
+      // a no-op by default.
+      return Collections.emptyMap();
    }
 
    public InvocationContext copy()

Modified: core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java	2008-09-01 07:08:56 UTC (rev 6651)
+++ core/trunk/src/main/java/org/jboss/cache/notifications/NotifierImpl.java	2008-09-01 07:45:36 UTC (rev 6652)
@@ -612,6 +612,8 @@
 
    private void restoreInvocationContext(InvocationContext backup)
    {
+      InvocationContext currentIC = cache.getInvocationContext();
+      backup.putLookedUpNodes(currentIC.getLookedUpNodes());
       cache.setInvocationContext(backup);
    }
 




More information about the jbosscache-commits mailing list