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

Manik Surtani manik at jboss.org
Thu Jun 14 13:56:07 EDT 2007


  User: msurtani
  Date: 07/06/14 13:56:07

  Modified:    src/org/jboss/cache/notifications  Notifier.java
  Log:
  JBCACHE-1107 and added more unit tests to cover notification and transactions
  
  Revision  Changes    Path
  1.30      +13 -8     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.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- Notifier.java	14 Jun 2007 15:19:24 -0000	1.29
  +++ Notifier.java	14 Jun 2007 17:56:07 -0000	1.30
  @@ -451,11 +451,11 @@
       * @param ctx
       * @param queue queue to process.
       */
  -   public void invokeQueuedNotifications(InvocationContext ctx, List<MethodCall> queue)
  +   public void invokeQueuedNotifications(InvocationContext ctx, final List<MethodCall> queue)
      {
   //      InvocationContext backup = resetInvocationContext(ctx);
   
  -      for (final MethodCall c : queue)
  +      for (MethodCall c : queue)
         {
            if (log.isTraceEnabled()) log.trace("Invoking queued notification " + c);
            if (evictionPolicyListener != null)
  @@ -469,14 +469,18 @@
                  log.error("Unable to deliver queued notification " + c + " to eviction policy listener", throwable);
               }
            }
  +      }
            if (hasListeners)
            {
               getExecutor().execute(new Runnable()
               {
                  public void run()
                  {
  +
                     for (CacheListener listener : listeners)
                     {
  +                  for (MethodCall c : queue)
  +                  {
                        try
                        {
                           c.invoke(listener);
  @@ -487,9 +491,10 @@
                        }
                     }
                  }
  -            });
            }
  +         });
         }
  +
   //      restoreInvocationContext(backup);
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list