activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [44/48] activemq-artemis git commit: Fix SimpleOpenWireTest and a few other things
Date Wed, 23 Nov 2016 17:43:45 GMT
Fix SimpleOpenWireTest and a few other things


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/31ee2184
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/31ee2184
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/31ee2184

Branch: refs/heads/ARTEMIS-780
Commit: 31ee2184c5739a9db71e6b6bcb70317a19913725
Parents: 47e5a66
Author: jbertram <jbertram@apache.com>
Authored: Tue Nov 22 08:38:23 2016 -0600
Committer: jbertram <jbertram@apache.com>
Committed: Wed Nov 23 09:04:37 2016 -0600

----------------------------------------------------------------------
 .../core/protocol/openwire/OpenWireConnection.java     | 13 ++-----------
 .../artemis/core/protocol/openwire/amq/AMQSession.java |  2 +-
 .../management/impl/ActiveMQServerControlImpl.java     |  8 ++++----
 .../artemis/core/server/impl/ActiveMQServerImpl.java   |  5 ++---
 .../tests/integration/openwire/SimpleOpenWireTest.java |  2 +-
 5 files changed, 10 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31ee2184/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
index cdc62fd..b4e594f 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
@@ -712,17 +712,8 @@ public class OpenWireConnection extends AbstractRemotingConnection implements
Se
       if (dest.isQueue()) {
          SimpleString qName = new SimpleString(dest.getPhysicalName());
          QueueBinding binding = (QueueBinding) server.getPostOffice().getBinding(qName);
-         if (binding == null) {
-            if (dest.isTemporary()) {
-               internalSession.createQueue(qName, qName, null, dest.isTemporary(), false);
-            } else {
-               ConnectionInfo connInfo = getState().getInfo();
-               CheckType checkType = dest.isTemporary() ? CheckType.CREATE_NON_DURABLE_QUEUE
: CheckType.CREATE_DURABLE_QUEUE;
-               server.getSecurityStore().check(qName, checkType, this);
-               server.checkQueueCreationLimit(getUsername());
-               server.createQueue(qName, qName, null, connInfo == null ? null : SimpleString.toSimpleString(connInfo.getUserName()),
true, false);
-
-            }
+         if (binding == null && server.getAddressSettingsRepository().getMatch(qName.toString()).isAutoCreateQueues())
{
+            internalSession.createQueue(qName, qName, null, dest.isTemporary(), true, null,
null, true);
          }
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31ee2184/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
index 35fd733..b2a2068 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
@@ -168,7 +168,7 @@ public class AMQSession implements SessionCallback {
          BindingQueryResult bindingQuery = server.bindingQuery(queueName);
          QueueQueryResult queueBinding = server.queueQuery(queueName);
 
-         boolean isAutoCreate = bindingQuery.isExists() ? bindingQuery.isAutoCreateJmsQueues()
: true;
+         boolean isAutoCreate = bindingQuery.isExists() ?  true : bindingQuery.isAutoCreateJmsQueues();
 
          if (!queueBinding.isExists()) {
             if (isAutoCreate) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31ee2184/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index f8880fc..f524062 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -1831,10 +1831,10 @@ public class ActiveMQServerControlImpl extends AbstractControl implements
Active
       addressSettings.setAutoDeleteJmsQueues(autoDeleteJmsQueues);
       addressSettings.setAutoCreateJmsTopics(autoCreateJmsTopics);
       addressSettings.setAutoDeleteJmsTopics(autoDeleteJmsTopics);
-      addressSettings.setAutoCreateQueues(autoCreateJmsQueues);
-      addressSettings.setAutoDeleteQueues(autoDeleteJmsQueues);
-      addressSettings.setAutoCreateAddresses(autoCreateJmsTopics);
-      addressSettings.setAutoDeleteAddresses(autoDeleteJmsTopics);
+      addressSettings.setAutoCreateQueues(autoCreateQueues);
+      addressSettings.setAutoDeleteQueues(autoDeleteQueues);
+      addressSettings.setAutoCreateAddresses(autoCreateAddresses);
+      addressSettings.setAutoDeleteAddresses(autoDeleteAddresses);
       server.getAddressSettingsRepository().addMatch(address, addressSettings);
 
       storageManager.storeAddressSetting(new PersistedAddressSetting(new SimpleString(address),
addressSettings));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31ee2184/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 990e2e0..a21e5be 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -620,8 +620,8 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          throw ActiveMQMessageBundle.BUNDLE.addressIsNull();
       }
 
-      boolean autoCreateJmsQueues = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateJmsQueues();
-      boolean autoCreateJmsTopics = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateJmsTopics();
+      boolean autoCreateJmsQueues = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateQueues();
+      boolean autoCreateJmsTopics = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateAddresses();
 
       List<SimpleString> names = new ArrayList<>();
 
@@ -2347,7 +2347,6 @@ public class ActiveMQServerImpl implements ActiveMQServer {
 
       final long txID = storageManager.generateID();
       final long queueID = storageManager.generateID();
-      final long addressID = storageManager.generateID();
 
       final QueueConfig.Builder queueConfigBuilder;
       if (addressName == null) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31ee2184/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
index c79f055..3842b67 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
@@ -502,7 +502,7 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
    @Test
    public void testAutoDestinationNoCreationOnConsumer() throws JMSException {
       AddressSettings addressSetting = new AddressSettings();
-      addressSetting.setAutoCreateJmsQueues(false);
+      addressSetting.setAutoCreateQueues(false);
 
       String address = "foo";
       server.getAddressSettingsRepository().addMatch(address, addressSetting);


Mime
View raw message