[jboss-cvs] JBossCache/src/org/jboss/cache/notifications ...

Manik Surtani msurtani at jboss.com
Fri Aug 18 11:40:40 EDT 2006


  User: msurtani
  Date: 06/08/18 11:40:40

  Modified:    src/org/jboss/cache/notifications  Notifier.java
  Log:
  Habanero stabilisation efforts - scoping problems with more than one cache instance in the same thread/namespace.
  
  Revision  Changes    Path
  1.2       +9 -5      JBossCache/src/org/jboss/cache/notifications/Notifier.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Notifier.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/notifications/Notifier.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- Notifier.java	16 Aug 2006 10:52:50 -0000	1.1
  +++ Notifier.java	18 Aug 2006 15:40:40 -0000	1.2
  @@ -10,7 +10,6 @@
   import org.jboss.cache.CacheListener;
   import org.jboss.cache.CacheSPI;
   import org.jboss.cache.Fqn;
  -import org.jboss.cache.InvocationContext;
   import org.jgroups.View;
   
   import java.util.Collections;
  @@ -37,7 +36,12 @@
       private CacheListener evictionPolicyListener;
   
       private Set<CacheListener> listeners = new CopyOnWriteArraySet();
  +    private CacheSPI cache;
   
  +    public Notifier(CacheSPI cache)
  +    {
  +        this.cache = cache;
  +    }
   
       /**
        * Sets an eviction policy listener.
  @@ -99,7 +103,7 @@
       public void notifyNodeCreated(Fqn fqn, boolean pre)
       {
   
  -        boolean originLocal = InvocationContext.getCurrent().isOriginLocal();
  +        boolean originLocal = cache.getInvocationContext().isOriginLocal();
           if (evictionPolicyListener != null)
           {
               evictionPolicyListener.nodeCreated(fqn, pre, originLocal);
  @@ -121,7 +125,7 @@
        */
       public void notifyNodeModified(Fqn fqn, boolean pre, Map data)
       {
  -        boolean originLocal = InvocationContext.getCurrent().isOriginLocal();
  +        boolean originLocal = cache.getInvocationContext().isOriginLocal();
           if (evictionPolicyListener != null)
           {
               evictionPolicyListener.nodeModified(fqn, pre, originLocal, data);
  @@ -143,7 +147,7 @@
        */
       public void notifyNodeRemoved(Fqn fqn, boolean pre, Map data)
       {
  -        boolean originLocal = InvocationContext.getCurrent().isOriginLocal();
  +        boolean originLocal = cache.getInvocationContext().isOriginLocal();
           if (evictionPolicyListener != null)
           {
               evictionPolicyListener.nodeRemoved(fqn, pre, originLocal, data);
  @@ -184,7 +188,7 @@
        */
       public void notifyNodeEvicted(Fqn fqn, boolean pre)
       {
  -        boolean originLocal = InvocationContext.getCurrent().isOriginLocal();
  +        boolean originLocal = cache.getInvocationContext().isOriginLocal();
           if (evictionPolicyListener != null)
           {
               evictionPolicyListener.nodeEvicted(fqn, pre, originLocal);
  
  
  



More information about the jboss-cvs-commits mailing list