activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-4719 - allowLinkStealing was not set/used properly by default on mqtt connector
Date Tue, 05 Aug 2014 14:24:01 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 6dd47bb63 -> c99e2d837


https://issues.apache.org/jira/browse/AMQ-4719 - allowLinkStealing was not set/used properly
by default on mqtt connector


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

Branch: refs/heads/trunk
Commit: c99e2d83721d1d2397384c2121c4cb9052f35db4
Parents: 6dd47bb
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Tue Aug 5 16:23:45 2014 +0200
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Tue Aug 5 16:23:45 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/activemq/broker/TransportConnector.java  | 5 +----
 .../org/apache/activemq/transport/mqtt/MQTTTestSupport.java  | 8 +++++++-
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/c99e2d83/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
index 5aa074b..5e9c645 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
@@ -90,9 +90,6 @@ public class TransportConnector implements Connector, BrokerServiceAware
{
                 setEnableStatusMonitor(false);
             }
         }
-        if (server != null){
-            setAllowLinkStealing(server.isAllowLinkStealing());
-        }
     }
 
     /**
@@ -582,7 +579,7 @@ public class TransportConnector implements Connector, BrokerServiceAware
{
 
     @Override
     public boolean isAllowLinkStealing() {
-        return allowLinkStealing;
+        return server.isAllowLinkStealing();
     }
 
     public void setAllowLinkStealing (boolean allowLinkStealing) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/c99e2d83/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java
b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java
index 470e273..558873f 100644
--- a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java
+++ b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java
@@ -19,6 +19,7 @@ package org.apache.activemq.transport.mqtt;
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.security.ProtectionDomain;
 import java.security.SecureRandom;
 import java.security.cert.CertificateException;
@@ -157,6 +158,7 @@ public class MQTTTestSupport {
 
         brokerService.start();
         brokerService.waitUntilStarted();
+        port = brokerService.getTransportConnectorByName("mqtt").getConnectUri().getPort();
     }
 
     protected void applyMemoryLimitPolicy() throws Exception {
@@ -214,7 +216,11 @@ public class MQTTTestSupport {
             connectorURI.append("?").append(protocolConfig);
         }
 
-        port = brokerService.addConnector(connectorURI.toString()).getConnectUri().getPort();
+        TransportConnector connector = new TransportConnector();
+        connector.setUri(new URI(connectorURI.toString()));
+        connector.setName("mqtt");
+        brokerService.addConnector(connector);
+
         LOG.info("Added connector {} to broker", getProtocolScheme());
     }
 


Mime
View raw message