activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [01/38] activemq-artemis git commit: ARTEMIS-401 Refactoring Acceptors and ProtocolManager to support parameters [Forced Update!]
Date Thu, 18 Feb 2016 02:48:17 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/refactor-openwire 690a64c14 -> fa50a9131 (forced update)


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
index 2a07606..7fed534 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.artemis.core.protocol.core.impl;
 
 import java.util.List;
+import java.util.Map;
 
 import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.api.core.Interceptor;
@@ -24,6 +25,7 @@ import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManagerFactory;
 import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 
 public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory<Interceptor> {
 
@@ -41,9 +43,10 @@ public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory<I
     */
    @Override
    public ProtocolManager createProtocolManager(final ActiveMQServer server,
-                                                final List<Interceptor> incomingInterceptors,
-                                                List<Interceptor> outgoingInterceptors) {
-      return new CoreProtocolManager(this, server, incomingInterceptors, outgoingInterceptors);
+                                                Map<String, Object> parameters,
+                                                final List<BaseInterceptor> incomingInterceptors,
+                                                List<BaseInterceptor> outgoingInterceptors) throws Exception {
+      return BeanSupport.setData(new CoreProtocolManager(this, server, filterInterceptors(incomingInterceptors), filterInterceptors(outgoingInterceptors)), parameters);
    }
 
    @Override
@@ -51,7 +54,7 @@ public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory<I
       // This is using this tool method
       // it wouldn't be possible to write a generic method without this class parameter
       // and I didn't want to bloat the cllaers for this
-      return filterInterceptors(Interceptor.class, interceptors);
+      return internalFilterInterceptors(Interceptor.class, interceptors);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java
new file mode 100644
index 0000000..851f486
--- /dev/null
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.core.remoting.impl;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.activemq.artemis.api.core.BaseInterceptor;
+import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
+import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
+
+public abstract class AbstractAcceptor implements Acceptor {
+
+   protected final Map<String, ProtocolManager> protocolMap;
+
+
+   public AbstractAcceptor(Map<String, ProtocolManager> protocolMap) {
+      this.protocolMap = protocolMap;
+   }
+   /**
+    * This will update the list of interceptors for each ProtocolManager inside the acceptor.
+    * */
+   public void updateInterceptors(List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors) {
+      for (ProtocolManager manager : protocolMap.values()) {
+         manager.updateInterceptors(incomingInterceptors, outgoingInterceptors);
+      }
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java
index 795a711..2967b2a 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java
@@ -25,28 +25,29 @@ import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.management.CoreNotificationType;
+import org.apache.activemq.artemis.core.remoting.impl.AbstractAcceptor;
 import org.apache.activemq.artemis.core.security.ActiveMQPrincipal;
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
 import org.apache.activemq.artemis.core.server.management.Notification;
 import org.apache.activemq.artemis.core.server.management.NotificationService;
-import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
+import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 import org.apache.activemq.artemis.utils.ConfigurationHelper;
 import org.apache.activemq.artemis.utils.ExecutorFactory;
 import org.apache.activemq.artemis.utils.OrderedExecutorFactory;
 import org.apache.activemq.artemis.utils.TypedProperties;
 
-public final class InVMAcceptor implements Acceptor {
+public final class InVMAcceptor extends AbstractAcceptor {
 
    private final int id;
 
    private final BufferHandler handler;
 
-   private final ConnectionLifeCycleListener listener;
+   private final ServerConnectionLifeCycleListener listener;
 
    private final ConcurrentMap<String, Connection> connections = new ConcurrentHashMap<>();
 
@@ -72,8 +73,10 @@ public final class InVMAcceptor implements Acceptor {
                        final ClusterConnection clusterConnection,
                        final Map<String, Object> configuration,
                        final BufferHandler handler,
-                       final ConnectionLifeCycleListener listener,
+                       final ServerConnectionLifeCycleListener listener,
+                       final Map<String, ProtocolManager> protocolMap,
                        final Executor threadPool) {
+      super(protocolMap);
 
       this.name = name;
 
@@ -219,7 +222,7 @@ public final class InVMAcceptor implements Acceptor {
 
       InVMConnection inVMConnection = new InVMConnection(id, connectionID, remoteHandler, connectionListener, clientExecutor, defaultActiveMQPrincipal);
 
-      connectionListener.connectionCreated(this, inVMConnection, ActiveMQClient.DEFAULT_CORE_PROTOCOL);
+      connectionListener.connectionCreated(this, inVMConnection, protocolMap.get(ActiveMQClient.DEFAULT_CORE_PROTOCOL));
    }
 
    public void disconnect(final String connectionID) {
@@ -249,7 +252,7 @@ public final class InVMAcceptor implements Acceptor {
       this.defaultActiveMQPrincipal = defaultActiveMQPrincipal;
    }
 
-   private class Listener implements ConnectionLifeCycleListener {
+   private class Listener implements ServerConnectionLifeCycleListener {
       //private static Listener instance = new Listener();
 
       private final InVMConnector connector;
@@ -261,7 +264,7 @@ public final class InVMAcceptor implements Acceptor {
       @Override
       public void connectionCreated(final ActiveMQComponent component,
                                     final Connection connection,
-                                    final String protocol) {
+                                    final ProtocolManager protocol) {
          if (connections.putIfAbsent((String) connection.getID(), connection) != null) {
             throw ActiveMQMessageBundle.BUNDLE.connectionExists(connection.getID());
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java
index e28ee3a..883b116 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java
@@ -25,7 +25,7 @@ import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
 import org.apache.activemq.artemis.spi.core.remoting.AcceptorFactory;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 
 public class InVMAcceptorFactory implements AcceptorFactory {
 
@@ -34,10 +34,10 @@ public class InVMAcceptorFactory implements AcceptorFactory {
                                   final ClusterConnection clusterConnection,
                                   final Map<String, Object> configuration,
                                   final BufferHandler handler,
-                                  final ConnectionLifeCycleListener listener,
+                                  final ServerConnectionLifeCycleListener listener,
                                   final Executor threadPool,
                                   final ScheduledExecutorService scheduledThreadPool,
-                                  final Map<String, ProtocolManager> protocolHandler) {
-      return new InVMAcceptor(name, clusterConnection, configuration, handler, listener, threadPool);
+                                  final Map<String, ProtocolManager> protocolMap) {
+      return new InVMAcceptor(name, clusterConnection, configuration, handler, listener, protocolMap, threadPool);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java
index 2af8a16..70d6289 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java
@@ -31,9 +31,9 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.core.security.ActiveMQPrincipal;
 import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
+import org.apache.activemq.artemis.spi.core.remoting.BaseConnectionLifeCycleListener;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
 import org.apache.activemq.artemis.spi.core.remoting.ReadyListener;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 
@@ -43,7 +43,7 @@ public class InVMConnection implements Connection {
 
    private final BufferHandler handler;
 
-   private final ConnectionLifeCycleListener listener;
+   private final BaseConnectionLifeCycleListener listener;
 
    private final String id;
 
@@ -64,7 +64,7 @@ public class InVMConnection implements Connection {
 
    public InVMConnection(final int serverID,
                          final BufferHandler handler,
-                         final ConnectionLifeCycleListener listener,
+                         final BaseConnectionLifeCycleListener listener,
                          final Executor executor) {
       this(serverID, UUIDGenerator.getInstance().generateSimpleStringUUID().toString(), handler, listener, executor);
    }
@@ -72,7 +72,7 @@ public class InVMConnection implements Connection {
    public InVMConnection(final int serverID,
                          final String id,
                          final BufferHandler handler,
-                         final ConnectionLifeCycleListener listener,
+                         final BaseConnectionLifeCycleListener listener,
                          final Executor executor) {
       this(serverID, id, handler, listener, executor, null);
    }
@@ -80,7 +80,7 @@ public class InVMConnection implements Connection {
    public InVMConnection(final int serverID,
                          final String id,
                          final BufferHandler handler,
-                         final ConnectionLifeCycleListener listener,
+                         final BaseConnectionLifeCycleListener listener,
                          final Executor executor,
                          final ActiveMQPrincipal defaultActiveMQPrincipal) {
       this.serverID = serverID;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
index 33a3147..c1fab77 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
@@ -29,7 +29,9 @@ import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
 import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
 import org.apache.activemq.artemis.spi.core.remoting.AbstractConnector;
 import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
+import org.apache.activemq.artemis.spi.core.remoting.BaseConnectionLifeCycleListener;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
+import org.apache.activemq.artemis.spi.core.remoting.ClientConnectionLifeCycleListener;
 import org.apache.activemq.artemis.spi.core.remoting.ClientProtocolManager;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
 import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
@@ -72,7 +74,7 @@ public class InVMConnector extends AbstractConnector {
 
    private final BufferHandler handler;
 
-   private final ConnectionLifeCycleListener listener;
+   private final BaseConnectionLifeCycleListener listener;
 
    private final InVMAcceptor acceptor;
 
@@ -86,7 +88,7 @@ public class InVMConnector extends AbstractConnector {
 
    public InVMConnector(final Map<String, Object> configuration,
                         final BufferHandler handler,
-                        final ConnectionLifeCycleListener listener,
+                        final ClientConnectionLifeCycleListener listener,
                         final Executor closeExecutor,
                         final Executor threadPool,
                         ClientProtocolManager protocolManager) {
@@ -181,11 +183,11 @@ public class InVMConnector extends AbstractConnector {
 
    // This may be an injection point for mocks on tests
    protected Connection internalCreateConnection(final BufferHandler handler,
-                                                 final ConnectionLifeCycleListener listener,
+                                                 final ClientConnectionLifeCycleListener listener,
                                                  final Executor serverExecutor) {
       // No acceptor on a client connection
       InVMConnection inVMConnection = new InVMConnection(id, handler, listener, serverExecutor);
-      listener.connectionCreated(null, inVMConnection, protocolManager.getName());
+      listener.connectionCreated(null, inVMConnection, protocolManager);
       return inVMConnection;
    }
 
@@ -195,17 +197,23 @@ public class InVMConnector extends AbstractConnector {
       return id == serverId;
    }
 
-   private class Listener implements ConnectionLifeCycleListener {
+   private class Listener implements ClientConnectionLifeCycleListener {
 
       @Override
       public void connectionCreated(final ActiveMQComponent component,
                                     final Connection connection,
-                                    final String protocol) {
+                                    final ClientProtocolManager protocol) {
          if (connections.putIfAbsent((String) connection.getID(), connection) != null) {
             throw ActiveMQMessageBundle.BUNDLE.connectionExists(connection.getID());
          }
 
-         listener.connectionCreated(component, connection, protocol);
+         if (listener instanceof ConnectionLifeCycleListener) {
+            listener.connectionCreated(component, connection, protocol.getName());
+         }
+         else {
+            listener.connectionCreated(component, connection, protocol);
+         }
+
       }
 
       @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java
index 77ca86b..112e3f4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java
@@ -21,8 +21,8 @@ import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
+import org.apache.activemq.artemis.spi.core.remoting.ClientConnectionLifeCycleListener;
 import org.apache.activemq.artemis.spi.core.remoting.ClientProtocolManager;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
 import org.apache.activemq.artemis.spi.core.remoting.Connector;
 import org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory;
 
@@ -31,7 +31,7 @@ public class InVMConnectorFactory implements ConnectorFactory {
    @Override
    public Connector createConnector(final Map<String, Object> configuration,
                                     final BufferHandler handler,
-                                    final ConnectionLifeCycleListener listener,
+                                    final ClientConnectionLifeCycleListener listener,
                                     final Executor closeExecutor,
                                     final Executor threadPool,
                                     final ScheduledExecutorService scheduledThreadPool,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
index 345981e..a5067c6 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
@@ -62,6 +62,7 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.management.CoreNotificationType;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl;
 import org.apache.activemq.artemis.core.protocol.ProtocolHandler;
+import org.apache.activemq.artemis.core.remoting.impl.AbstractAcceptor;
 import org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport;
 import org.apache.activemq.artemis.core.security.ActiveMQPrincipal;
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
@@ -71,18 +72,17 @@ import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
 import org.apache.activemq.artemis.core.server.management.Notification;
 import org.apache.activemq.artemis.core.server.management.NotificationService;
 import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
-import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 import org.apache.activemq.artemis.utils.ConfigurationHelper;
 import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
 import org.apache.activemq.artemis.utils.TypedProperties;
 
 /**
- * A Netty TCP Acceptor that supports SSL
+ * A Netty TCP Acceptor that is embedding Netty.
  */
-public class NettyAcceptor implements Acceptor {
+public class NettyAcceptor extends AbstractAcceptor {
 
    static {
       // Disable resource leak detection for performance reasons by default
@@ -107,7 +107,7 @@ public class NettyAcceptor implements Acceptor {
 
    private final BufferHandler handler;
 
-   private final ConnectionLifeCycleListener listener;
+   private final ServerConnectionLifeCycleListener listener;
 
    private final boolean sslEnabled;
 
@@ -173,9 +173,11 @@ public class NettyAcceptor implements Acceptor {
                         final ClusterConnection clusterConnection,
                         final Map<String, Object> configuration,
                         final BufferHandler handler,
-                        final ConnectionLifeCycleListener listener,
+                        final ServerConnectionLifeCycleListener listener,
                         final ScheduledExecutorService scheduledThreadPool,
                         final Map<String, ProtocolManager> protocolMap) {
+      super(protocolMap);
+
       this.name = name;
 
       this.clusterConnection = clusterConnection;
@@ -604,7 +606,7 @@ public class NettyAcceptor implements Acceptor {
 
       ActiveMQServerChannelHandler(final ChannelGroup group,
                                    final BufferHandler handler,
-                                   final ConnectionLifeCycleListener listener) {
+                                   final ServerConnectionLifeCycleListener listener) {
          super(group, handler, listener);
       }
 
@@ -618,7 +620,7 @@ public class NettyAcceptor implements Acceptor {
 
             NettyServerConnection nc = new NettyServerConnection(configuration, ctx.channel(), connectionListener, !httpEnabled && batchDelay > 0, directDeliver);
 
-            connectionListener.connectionCreated(NettyAcceptor.this, nc, protocol);
+            connectionListener.connectionCreated(NettyAcceptor.this, nc, protocolHandler.getProtocol(protocol));
 
             SslHandler sslHandler = ctx.pipeline().get(SslHandler.class);
             if (sslHandler != null) {
@@ -648,12 +650,12 @@ public class NettyAcceptor implements Acceptor {
       }
    }
 
-   private class Listener implements ConnectionLifeCycleListener {
+   private class Listener implements ServerConnectionLifeCycleListener {
 
       @Override
       public void connectionCreated(final ActiveMQComponent component,
                                     final Connection connection,
-                                    final String protocol) {
+                                    final ProtocolManager protocol) {
          if (connections.putIfAbsent(connection.getID(), (NettyServerConnection) connection) != null) {
             throw ActiveMQMessageBundle.BUNDLE.connectionExists(connection.getID());
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java
index 880522f..5628a7f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java
@@ -25,7 +25,7 @@ import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
 import org.apache.activemq.artemis.spi.core.remoting.AcceptorFactory;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 
 public class NettyAcceptorFactory implements AcceptorFactory {
 
@@ -34,7 +34,7 @@ public class NettyAcceptorFactory implements AcceptorFactory {
                                   final ClusterConnection connection,
                                   final Map<String, Object> configuration,
                                   final BufferHandler handler,
-                                  final ConnectionLifeCycleListener listener,
+                                  final ServerConnectionLifeCycleListener listener,
                                   final Executor threadPool,
                                   final ScheduledExecutorService scheduledThreadPool,
                                   final Map<String, ProtocolManager> protocolMap) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyServerConnection.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyServerConnection.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyServerConnection.java
index 31957c4..29e39d5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyServerConnection.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyServerConnection.java
@@ -21,13 +21,13 @@ import java.util.Map;
 import io.netty.channel.Channel;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 
 public class NettyServerConnection extends NettyConnection {
 
    public NettyServerConnection(Map<String, Object> configuration,
                                 Channel channel,
-                                ConnectionLifeCycleListener listener,
+                                ServerConnectionLifeCycleListener listener,
                                 boolean batchingEnabled,
                                 boolean directDeliver) {
       super(configuration, channel, listener, batchingEnabled, directDeliver);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
index 4b83657..03fadd7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
@@ -65,12 +65,12 @@ import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
 import org.apache.activemq.artemis.spi.core.remoting.AcceptorFactory;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
 import org.apache.activemq.artemis.utils.ConfigurationHelper;
 import org.apache.activemq.artemis.utils.ReusableLatch;
 
-public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycleListener {
+public class RemotingServiceImpl implements RemotingService, ServerConnectionLifeCycleListener {
    // Constants -----------------------------------------------------
 
    private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled();
@@ -107,7 +107,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
 
    private final ClusterManager clusterManager;
 
-   private final Map<String, ProtocolManager> protocolMap = new ConcurrentHashMap();
+   private final Map<String, ProtocolManagerFactory> protocolMap = new ConcurrentHashMap();
 
    private ActiveMQPrincipal defaultInvmSecurityPrincipal;
 
@@ -144,7 +144,8 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
       this.flushExecutor = flushExecutor;
 
       ActiveMQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory.getModuleName());
-      this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory.createProtocolManager(server, coreProtocolManagerFactory.filterInterceptors(incomingInterceptors), coreProtocolManagerFactory.filterInterceptors(outgoingInterceptors)));
+//      this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory.createProtocolManager(server, coreProtocolManagerFactory.filterInterceptors(incomingInterceptors), coreProtocolManagerFactory.filterInterceptors(outgoingInterceptors)));
+      this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory);
 
       if (config.isResolveProtocols()) {
          resolveProtocols(server, this.getClass().getClassLoader());
@@ -157,9 +158,10 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
       if (protocolManagerFactories != null) {
          for (ProtocolManagerFactory protocolManagerFactory : protocolManagerFactories) {
             String[] protocols = protocolManagerFactory.getProtocols();
-            for (String protocol : protocols) {
-               ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol, protocolManagerFactory.getModuleName());
-               protocolMap.put(protocol, protocolManagerFactory.createProtocolManager(server, incomingInterceptors, outgoingInterceptors));
+            for (String protocolName : protocols) {
+               ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocolName, protocolManagerFactory.getModuleName());
+               //               protocolMap.put(protocol, protocolManagerFactory.createProtocolManager(server, incomingInterceptors, outgoingInterceptors));
+               protocolMap.put(protocolName, protocolManagerFactory);
             }
          }
       }
@@ -172,7 +174,8 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
             String[] protocols = next.getProtocols();
             for (String protocol : protocols) {
                ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol, next.getModuleName());
-               protocolMap.put(protocol, next.createProtocolManager(server, next.filterInterceptors(incomingInterceptors), next.filterInterceptors(outgoingInterceptors)));
+               //               protocolMap.put(protocol, next.createProtocolManager(server, next.filterInterceptors(incomingInterceptors), next.filterInterceptors(outgoingInterceptors)));
+               protocolMap.put(protocol, next);
             }
          }
       }
@@ -210,45 +213,35 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
          try {
             AcceptorFactory factory = server.getServiceRegistry().getAcceptorFactory(info.getName(), info.getFactoryClassName());
 
-            Map<String, ProtocolManager> supportedProtocols = new ConcurrentHashMap();
+            Map<String, ProtocolManagerFactory> selectedProtocolFactories = new ConcurrentHashMap();
 
             @SuppressWarnings("deprecation")
             String protocol = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOL_PROP_NAME, null, info.getParams());
-
             if (protocol != null) {
                ActiveMQServerLogger.LOGGER.warnDeprecatedProtocol();
-               ProtocolManager protocolManager = protocolMap.get(protocol);
-
-               if (protocolManager == null) {
-                  ActiveMQServerLogger.LOGGER.noProtocolManagerFound(protocol, info.toString());
-               }
-               else {
-                  supportedProtocols.put(protocol, protocolManager);
-               }
+               locateProtocols(protocol, info, selectedProtocolFactories);
             }
 
             String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null, info.getParams());
 
             if (protocols != null) {
-               String[] actualProtocols = protocols.split(",");
+               locateProtocols(protocols, info, selectedProtocolFactories);
+            }
 
-               if (actualProtocols != null) {
-                  for (String actualProtocol : actualProtocols) {
-                     ProtocolManager protocolManager = protocolMap.get(actualProtocol);
+            ClusterConnection clusterConnection = lookupClusterConnection(info);
 
-                     if (protocolManager == null) {
-                        ActiveMQServerLogger.LOGGER.noProtocolManagerFound(actualProtocol, info.toString());
-                     }
-                     else {
-                        supportedProtocols.put(actualProtocol, protocolManager);
-                     }
-                  }
-               }
+            // If empty: we get the default list
+            if (selectedProtocolFactories.isEmpty()) {
+               selectedProtocolFactories = protocolMap;
             }
 
-            ClusterConnection clusterConnection = lookupClusterConnection(info);
+            Map<String, ProtocolManager> selectedProtocols = new ConcurrentHashMap();
+            for (Map.Entry<String, ProtocolManagerFactory> entry: selectedProtocolFactories.entrySet()) {
+               selectedProtocols.put(entry.getKey(), entry.getValue().createProtocolManager(server, info.getExtraParams(), incomingInterceptors, outgoingInterceptors));
+            }
 
-            Acceptor acceptor = factory.createAcceptor(info.getName(), clusterConnection, info.getParams(), new DelegatingBufferHandler(), this, threadPool, scheduledThreadPool, supportedProtocols.isEmpty() ? protocolMap : supportedProtocols);
+
+            Acceptor acceptor = factory.createAcceptor(info.getName(), clusterConnection, info.getParams(), new DelegatingBufferHandler(), this, threadPool, scheduledThreadPool, selectedProtocols);
 
             if (defaultInvmSecurityPrincipal != null && acceptor.isUnsecurable()) {
                acceptor.setDefaultActiveMQPrincipal(defaultInvmSecurityPrincipal);
@@ -280,6 +273,25 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
       started = true;
    }
 
+   private void locateProtocols(String protocolList,
+                                Object transportConfig,
+                                Map<String, ProtocolManagerFactory> protocolMap) {
+      String[] protocolsSplit = protocolList.split(",");
+
+      if (protocolsSplit != null) {
+         for (String protocolItem : protocolsSplit) {
+            ProtocolManagerFactory protocolManagerFactory = protocolMap.get(protocolItem);
+
+            if (protocolManagerFactory == null) {
+               ActiveMQServerLogger.LOGGER.noProtocolManagerFound(protocolItem, transportConfig.toString());
+            }
+            else {
+               protocolMap.put(protocolItem, protocolManagerFactory);
+            }
+         }
+      }
+   }
+
    @Override
    public synchronized void startAcceptors() throws Exception {
       if (isStarted()) {
@@ -469,25 +481,19 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
 
    // ConnectionLifeCycleListener implementation -----------------------------------
 
-   private ProtocolManager getProtocolManager(String protocol) {
+   private ProtocolManagerFactory getProtocolManager(String protocol) {
       return protocolMap.get(protocol);
    }
 
    @Override
    public void connectionCreated(final ActiveMQComponent component,
                                  final Connection connection,
-                                 final String protocol) {
+                                 final ProtocolManager protocol) {
       if (server == null) {
          throw new IllegalStateException("Unable to create connection, server hasn't finished starting up");
       }
 
-      ProtocolManager pmgr = this.getProtocolManager(protocol.toString());
-
-      if (pmgr == null) {
-         throw ActiveMQMessageBundle.BUNDLE.unknownProtocol(protocol);
-      }
-
-      ConnectionEntry entry = pmgr.createConnectionEntry((Acceptor) component, connection);
+      ConnectionEntry entry = protocol.createConnectionEntry((Acceptor) component, connection);
 
       if (isTrace) {
          ActiveMQServerLogger.LOGGER.trace("Connection created " + connection);
@@ -720,10 +726,9 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
    }
 
    protected void updateProtocols() {
-      for (ProtocolManager<?> protocolManager : this.protocolMap.values()) {
-         protocolManager.updateInterceptors(incomingInterceptors, outgoingInterceptors);
+      for (Acceptor acceptor : this.acceptors.values()) {
+         acceptor.updateInterceptors(incomingInterceptors, outgoingInterceptors);
       }
-
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java
index d9a8688..cb48b49 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/MessageLoadBalancingType.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.core.server.cluster.impl;
 
-import org.apache.activemq.artemis.utils.uri.URISchema;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.commons.beanutils.Converter;
 
 public enum MessageLoadBalancingType {
@@ -24,7 +24,7 @@ public enum MessageLoadBalancingType {
 
    static {
       // for URI support on ClusterConnection
-      URISchema.registerConverter(new MessageLoadBalancingTypeConverter(), MessageLoadBalancingType.class);
+      BeanSupport.registerConverter(new MessageLoadBalancingTypeConverter(), MessageLoadBalancingType.class);
    }
 
    static class MessageLoadBalancingTypeConverter implements Converter {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
index 6c4eb8b..6a61065 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
@@ -34,7 +34,7 @@ public abstract class AbstractProtocolManagerFactory<P extends BaseInterceptor>
     * @param listIn
     * @return
     */
-   protected List<P> filterInterceptors(Class<P> type, List<? extends BaseInterceptor> listIn) {
+   protected List<P> internalFilterInterceptors(Class<P> type, List<? extends BaseInterceptor> listIn) {
       if (listIn == null) {
          return Collections.emptyList();
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
index e7c1d07..d3b1b2e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.artemis.spi.core.protocol;
 
 import java.util.List;
+import java.util.Map;
 
 import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
@@ -34,8 +35,9 @@ public interface ProtocolManagerFactory<P extends BaseInterceptor> {
     * @return
     */
    ProtocolManager createProtocolManager(ActiveMQServer server,
-                                         List<P> incomingInterceptors,
-                                         List<P> outgoingInterceptors);
+                                         Map<String, Object> parameters,
+                                         List<BaseInterceptor> incomingInterceptors,
+                                         List<BaseInterceptor> outgoingInterceptors) throws Exception;
 
    /**
     * This should get the entire list and only return the ones this factory can deal with *

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
index dbd2618..b4c1952 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
@@ -16,8 +16,10 @@
  */
 package org.apache.activemq.artemis.spi.core.remoting;
 
+import java.util.List;
 import java.util.Map;
 
+import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.core.security.ActiveMQPrincipal;
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
@@ -39,6 +41,11 @@ public interface Acceptor extends ActiveMQComponent {
    void pause();
 
    /**
+    * This will update the list of interceptors for each ProtocolManager inside the acceptor.
+    * */
+   void updateInterceptors(List<BaseInterceptor> incomingInterceptors,  List<BaseInterceptor> outgoingInterceptors);
+
+   /**
     * @return the cluster connection associated with this Acceptor
     */
    ClusterConnection getClusterConnection();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/AcceptorFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/AcceptorFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/AcceptorFactory.java
index 1580d18..4390d4f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/AcceptorFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/AcceptorFactory.java
@@ -46,7 +46,7 @@ public interface AcceptorFactory {
                            ClusterConnection clusterConnection,
                            Map<String, Object> configuration,
                            BufferHandler handler,
-                           ConnectionLifeCycleListener listener,
+                           ServerConnectionLifeCycleListener listener,
                            Executor threadPool,
                            ScheduledExecutorService scheduledThreadPool,
                            Map<String, ProtocolManager> protocolMap);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
index 1d8d5b0..7e3c8fd 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
@@ -16,15 +16,7 @@
  */
 package org.apache.activemq.artemis.spi.core.remoting;
 
-public interface ServerConnectionLifeCycleListener extends ConnectionLifeCycleListener {
+import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 
-   /**
-    * This method is used both by client connector creation and server connection creation through acceptors.
-    * the acceptor will be set to null on client operations
-    *
-    * @param acceptor   The acceptor here will be always null on a client connection created event.
-    * @param connection the connection that has been created
-    * @param protocol   the protocol to use
-    */
-   void connectionCreated(Acceptor acceptor, Connection connection, String protocol);
+public interface ServerConnectionLifeCycleListener extends BaseConnectionLifeCycleListener<ProtocolManager> {
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
index f776924..b465be4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
@@ -21,6 +21,7 @@ import java.net.URI;
 import java.util.Map;
 
 import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.URISupport;
 
 public class ClusterConnectionMulticastSchema extends ClusterConnectionStaticSchema {
@@ -40,7 +41,7 @@ public class ClusterConnectionMulticastSchema extends ClusterConnectionStaticSch
       else {
          bean.setDiscoveryGroupName(uri.getHost());
          Map<String, String> parameters = URISupport.parseParameters(uri);
-         setData(uri, bean, parameters);
+         BeanSupport.setData(uri, bean, parameters);
 
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
index f81aa58..0f62d26 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
@@ -21,6 +21,7 @@ import java.net.URI;
 import java.util.Map;
 
 import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.URISchema;
 import org.apache.activemq.artemis.utils.uri.URISupport;
 
@@ -50,7 +51,7 @@ public class ClusterConnectionStaticSchema extends URISchema<ClusterConnectionCo
       URISupport.CompositeData compositeData = URISupport.parseComposite(uri);
       bean.setCompositeMembers(compositeData);
 
-      setData(uri, bean, compositeData.getParameters());
+      BeanSupport.setData(uri, bean, compositeData.getParameters());
    }
 
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/test/java/org/apache/activemq/artemis/uri/AcceptorParserTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/uri/AcceptorParserTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/uri/AcceptorParserTest.java
new file mode 100644
index 0000000..be26473
--- /dev/null
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/uri/AcceptorParserTest.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.uri;
+
+import java.net.URI;
+import java.util.List;
+
+import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class AcceptorParserTest {
+
+   @Test
+   public void testAcceptor() throws Exception {
+      AcceptorTransportConfigurationParser parser = new AcceptorTransportConfigurationParser();
+      List<TransportConfiguration> configs = parser.newObject(new URI("tcp://localhost:8080?tcpSendBufferSize=1048576&tcpReceiveBufferSize=1048576&protocols=openwire&banana=x"), "test");
+
+      for (TransportConfiguration config : configs) {
+         System.out.println("config:" + config);
+         Assert.assertTrue(config.getExtraParams().get("banana").equals("x"));
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/artemis-server/src/test/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationTest.java
index 771d89c..3df2ecf 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationTest.java
@@ -41,7 +41,6 @@ public class ClusterConnectionConfigurationTest {
       ClusterConnectionConfigurationParser parser = new ClusterConnectionConfigurationParser();
       ClusterConnectionConfiguration configuration = parser.newObject(new URI("static://(tcp://localhost:6556,tcp://localhost:6557)?minLargeMessageSize=132;messageLoadBalancingType=OFF"), null);
       Assert.assertEquals(132, configuration.getMinLargeMessageSize());
-      Assert.assertEquals(MessageLoadBalancingType.OFF, configuration.getMessageLoadBalancingType());
       Assert.assertEquals(2, configuration.getCompositeMembers().getComponents().length);
       Assert.assertEquals("tcp://localhost:6556", configuration.getCompositeMembers().getComponents()[0].toString());
       Assert.assertEquals("tcp://localhost:6557", configuration.getCompositeMembers().getComponents()[1].toString());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java
index ac2ff3c..260fcfe 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java
@@ -26,10 +26,11 @@ import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor;
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
+import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Test;
@@ -48,7 +49,7 @@ public class NettyAcceptorFactoryTest extends ActiveMQTestBase {
          }
       };
 
-      ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() {
+      ServerConnectionLifeCycleListener listener = new ServerConnectionLifeCycleListener() {
 
          @Override
          public void connectionException(final Object connectionID, final ActiveMQException me) {
@@ -61,7 +62,7 @@ public class NettyAcceptorFactoryTest extends ActiveMQTestBase {
          @Override
          public void connectionCreated(ActiveMQComponent component,
                                        final Connection connection,
-                                       final String protocol) {
+                                       final ProtocolManager protocol) {
          }
 
          @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java
index f0ea5db..3b1b025 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java
@@ -25,13 +25,14 @@ import java.util.concurrent.TimeUnit;
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
+import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor;
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -72,7 +73,7 @@ public class NettyAcceptorTest extends ActiveMQTestBase {
       };
 
       Map<String, Object> params = new HashMap<>();
-      ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() {
+      ServerConnectionLifeCycleListener listener = new ServerConnectionLifeCycleListener() {
 
          @Override
          public void connectionException(final Object connectionID, final ActiveMQException me) {
@@ -85,7 +86,7 @@ public class NettyAcceptorTest extends ActiveMQTestBase {
          @Override
          public void connectionCreated(final ActiveMQComponent component,
                                        final Connection connection,
-                                       final String protocol) {
+                                       final ProtocolManager protocol) {
          }
 
          @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9104ac9/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java
index 838c829..1c15c69 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java
@@ -16,10 +16,12 @@
  */
 package org.apache.activemq.artemis.tests.unit.core.remoting.server.impl.fake;
 
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 
+import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.core.security.ActiveMQPrincipal;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
 import org.apache.activemq.artemis.core.server.management.NotificationService;
@@ -27,7 +29,7 @@ import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
 import org.apache.activemq.artemis.spi.core.remoting.AcceptorFactory;
 import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
-import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener;
+import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
 
 public class FakeAcceptorFactory implements AcceptorFactory {
 
@@ -38,7 +40,7 @@ public class FakeAcceptorFactory implements AcceptorFactory {
                                   ClusterConnection clusterConnection,
                                   Map<String, Object> configuration,
                                   BufferHandler handler,
-                                  ConnectionLifeCycleListener listener,
+                                  ServerConnectionLifeCycleListener listener,
                                   Executor threadPool,
                                   ScheduledExecutorService scheduledThreadPool,
                                   Map<String, ProtocolManager> protocolMap) {
@@ -58,6 +60,11 @@ public class FakeAcceptorFactory implements AcceptorFactory {
       }
 
       @Override
+      public void updateInterceptors(List<BaseInterceptor> incomingInterceptors,
+                                     List<BaseInterceptor> outgoingInterceptors) {
+      }
+
+      @Override
       public ClusterConnection getClusterConnection() {
          return null;
       }


Mime
View raw message