You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/09/26 22:37:47 UTC
[2/2] activemq-artemis git commit: ARTEMIS-752 fix OSGi protocol
parsing
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 <jb...@apache.com>
Authored: Mon Sep 26 16:26:22 2016 -0500
Committer: Clebert Suconic <cl...@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()]);