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

Manik Surtani msurtani at jboss.com
Tue Aug 22 08:27:51 EDT 2006


  User: msurtani
  Date: 06/08/22 08:27:51

  Modified:    src/org/jboss/cache/factories  InterceptorChainFactory.java
  Log:
  Problem with invocation context leaking into notifications
  
  Revision  Changes    Path
  1.26      +24 -10    JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InterceptorChainFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- InterceptorChainFactory.java	17 Aug 2006 21:57:58 -0000	1.25
  +++ InterceptorChainFactory.java	22 Aug 2006 12:27:51 -0000	1.26
  @@ -29,14 +29,28 @@
      {
         if (cache.getConfiguration().isNodeLockingOptimistic())
         {
  -         return createOptimisticInterceptorChain(cache);
  +         return setLastInterceptorPointer(createOptimisticInterceptorChain(cache));
         }
         else
         {
  -         return createPessimisticInterceptorChain(cache);
  +         return setLastInterceptorPointer(createPessimisticInterceptorChain(cache));
         }
      }
   
  +    private Interceptor setLastInterceptorPointer(Interceptor first)
  +    {
  +        Interceptor i = first;
  +        while (i.getNext() != null) i = i.getNext();
  +        Interceptor last = i;
  +        i = first;
  +        while (i.getNext() != null)
  +        {
  +            i.setLast(last);
  +            i = i.getNext();
  +        }
  +        return first;
  +    }
  +
   
      private Interceptor createInterceptor(String classname, TreeCache cache) throws ClassNotFoundException, IllegalAccessException, InstantiationException
      {
  
  
  



More information about the jboss-cvs-commits mailing list