You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2015/03/15 00:26:24 UTC

svn commit: r1666767 - /qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java

Author: rgodfrey
Date: Sat Mar 14 23:26:24 2015
New Revision: 1666767

URL: http://svn.apache.org/r1666767
Log:
QPID-6428 : Remove explicit call to update store from within AbstractQueue

Modified:
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java?rev=1666767&r1=1666766&r2=1666767&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java Sat Mar 14 23:26:24 2015
@@ -3008,40 +3008,31 @@ public abstract class AbstractQueue<X ex
     @Override
     public boolean changeAttribute(String name, Object expected, Object desired) throws IllegalStateException, AccessControlException, IllegalArgumentException
     {
-        try
+        if(EXCLUSIVE.equals(name))
         {
-            if(EXCLUSIVE.equals(name))
+            ExclusivityPolicy existingPolicy = getExclusive();
+            if(super.changeAttribute(name, expected, desired))
             {
-                ExclusivityPolicy existingPolicy = getExclusive();
-                if(super.changeAttribute(name, expected, desired))
+                try
                 {
-                    try
+                    if(existingPolicy != _exclusive)
                     {
-                        if(existingPolicy != _exclusive)
-                        {
-                            ExclusivityPolicy newPolicy = _exclusive;
-                            _exclusive = existingPolicy;
-                            updateExclusivityPolicy(newPolicy);
-                        }
-                        return true;
-                    }
-                    catch (ExistingConsumerPreventsExclusive existingConsumerPreventsExclusive)
-                    {
-                        throw new IllegalArgumentException("Unable to set exclusivity policy to " + desired + " as an existing combinations of consumers prevents this");
+                        ExclusivityPolicy newPolicy = _exclusive;
+                        _exclusive = existingPolicy;
+                        updateExclusivityPolicy(newPolicy);
                     }
+                    return true;
+                }
+                catch (ExistingConsumerPreventsExclusive existingConsumerPreventsExclusive)
+                {
+                    throw new IllegalArgumentException("Unable to set exclusivity policy to " + desired + " as an existing combinations of consumers prevents this");
                 }
-                return false;
-            }
-
-            return super.changeAttribute(name, expected, desired);
-        }
-        finally
-        {
-            if (isDurable() && getState() != State.DELETED)
-            {
-                this.getVirtualHost().getDurableConfigurationStore().update(false, asObjectRecord());
             }
+            return false;
         }
+
+        return super.changeAttribute(name, expected, desired);
+
     }
 
     int getMaxAsyncDeliveries()



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org