[hornetq-commits] JBoss hornetq SVN: r8486 - in trunk/src/main/org/hornetq/core/server: impl and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Dec 1 18:13:07 EST 2009


Author: timfox
Date: 2009-12-01 18:13:07 -0500 (Tue, 01 Dec 2009)
New Revision: 8486

Modified:
   trunk/src/main/org/hornetq/core/server/Queue.java
   trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
removed some unnecessary locking on QueueImpl

Modified: trunk/src/main/org/hornetq/core/server/Queue.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/Queue.java	2009-12-01 22:43:53 UTC (rev 8485)
+++ trunk/src/main/org/hornetq/core/server/Queue.java	2009-12-01 23:13:07 UTC (rev 8486)
@@ -126,11 +126,7 @@
    Collection<Consumer> getConsumers();
    
    boolean checkDLQ(MessageReference ref) throws Exception;
-   
-   void lockDelivery();
-   
-   void unlockDelivery();
-
+      
    /**
     * @return an immutable iterator which does not allow to remove references
     */

Modified: trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java	2009-12-01 22:43:53 UTC (rev 8485)
+++ trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java	2009-12-01 23:13:07 UTC (rev 8486)
@@ -206,23 +206,6 @@
 
    // Queue implementation ----------------------------------------------------------------------------------------
 
-   public void lockDelivery()
-   {
-      try
-      {
-         lock.acquire();
-      }
-      catch (InterruptedException e)
-      {
-         log.warn(e.getMessage(), e);
-      }
-   }
-
-   public void unlockDelivery()
-   {
-      lock.release();
-   }
-
    public boolean isDurable()
    {
       return durable;
@@ -1475,15 +1458,7 @@
          // Must be set to false *before* executing to avoid race
          waitingToDeliver.set(false);
 
-         lockDelivery();
-         try
-         {
-            deliver();
-         }
-         finally
-         {
-            unlockDelivery();
-         }
+         deliver();
       }
    }
 



More information about the hornetq-commits mailing list