activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-752 fix OSGi protocol parsing
Date Mon, 26 Sep 2016 22:37:47 GMT
ARTEMIS-752 fix OSGi protocol parsing


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

Branch: refs/heads/master
Commit: 6faaf0445d0ea30332d512498893a76b12c6b96c
Parents: 1548a4e
Author: jbertram <jbertram@apache.com>
Authored: Mon Sep 26 16:26:22 2016 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Sep 26 18:37:36 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/artemis/osgi/OsgiBroker.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6faaf044/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java
----------------------------------------------------------------------
diff --git a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java
b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java
index d491b17..8b43d23 100644
--- a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java
+++ b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/OsgiBroker.java
@@ -32,6 +32,7 @@ import org.apache.activemq.artemis.api.core.Interceptor;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.core.config.FileDeploymentManager;
 import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
+import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration;
@@ -144,9 +145,12 @@ public class OsgiBroker {
    private String[] getRequiredProtocols(Set<TransportConfiguration> acceptors) {
       ArrayList<String> protocols = new ArrayList<>();
       for (TransportConfiguration acceptor : acceptors) {
-         String protoName = acceptor.getName().toUpperCase();
-         if (!"ARTEMIS".equals(protoName)) {
-            protocols.add(protoName);
+         String protocolsFromAcceptor = acceptor.getParams().get(TransportConstants.PROTOCOLS_PROP_NAME).toString();
+         String[] protocolsSplit = protocolsFromAcceptor.split(",");
+         for (String protocol : protocolsSplit) {
+            if (!protocol.contains(protocol)) {
+               protocols.add(protocol);
+            }
          }
       }
       return protocols.toArray(new String[protocols.size()]);


Mime
View raw message