diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2015-03-14 23:26:24 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2015-03-14 23:26:24 +0000 |
| commit | 970be2db6117c8727e7757e062c9694dda1e4542 (patch) | |
| tree | e985a48d15a9101a91908f8e487b76c07f8d53ee /qpid/java | |
| parent | d2fafdcce365568113ed4c2dd86dc9683d230826 (diff) | |
| download | qpid-python-970be2db6117c8727e7757e062c9694dda1e4542.tar.gz | |
QPID-6428 : Remove explicit call to update store from within AbstractQueue
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1666767 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java index 33b4d59878..486c501772 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java @@ -3008,40 +3008,31 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>> @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) - { - ExclusivityPolicy newPolicy = _exclusive; - _exclusive = existingPolicy; - updateExclusivityPolicy(newPolicy); - } - return true; - } - catch (ExistingConsumerPreventsExclusive existingConsumerPreventsExclusive) + if(existingPolicy != _exclusive) { - 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() |
