activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [05/43] activemq-artemis git commit: ARTEMIS-401 Refactoring Acceptors and ProtocolManager to support parameters
Date Thu, 18 Feb 2016 16:19:39 GMT
ARTEMIS-401 Refactoring Acceptors and ProtocolManager to support parameters

https://issues.apache.org/jira/browse/ARTEMIS-401


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

Branch: refs/heads/refactor-openwire
Commit: 9ebc6786b6cb7e025f98ecf69b0173ee1ee9fa84
Parents: 418ef01
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Feb 17 17:13:35 2016 -0500
Committer: jbertram <jbertram@apache.org>
Committed: Thu Feb 18 10:14:26 2016 -0600

----------------------------------------------------------------------
 .../activemq/artemis/utils/uri/BeanSupport.java | 148 +++++++++++++++++++
 .../activemq/artemis/utils/uri/URISchema.java   | 127 ++--------------
 .../activemq/artemis/utils/URIParserTest.java   |  31 +++-
 .../api/core/TransportConfiguration.java        |  90 +++++++----
 .../client/impl/ClientSessionFactoryImpl.java   |   6 +-
 .../impl/netty/ActiveMQChannelHandler.java      |   6 +-
 .../remoting/impl/netty/NettyConnection.java    |   6 +-
 .../remoting/impl/netty/NettyConnector.java     |  17 ++-
 .../impl/netty/NettyConnectorFactory.java       |   4 +-
 .../BaseConnectionLifeCycleListener.java        |  60 ++++++++
 .../ClientConnectionLifeCycleListener.java      |  22 +++
 .../remoting/ConnectionLifeCycleListener.java   |  40 +----
 .../spi/core/remoting/ConnectorFactory.java     |   2 +-
 .../TCPTransportConfigurationSchema.java        |  15 +-
 .../AbstractServerLocatorSchema.java            |   3 +-
 .../serverLocator/InVMServerLocatorSchema.java  |   3 +-
 .../JGroupsServerLocatorSchema.java             |   7 +-
 .../serverLocator/TCPServerLocatorSchema.java   |   7 +-
 .../serverLocator/UDPServerLocatorSchema.java   |   9 +-
 .../activemq/artemis/uri/AbstractCFSchema.java  |   3 +-
 .../apache/activemq/artemis/uri/InVMSchema.java |   3 +-
 .../activemq/artemis/uri/JGroupsSchema.java     |   6 +-
 .../apache/activemq/artemis/uri/TCPSchema.java  |   6 +-
 .../apache/activemq/artemis/uri/UDPSchema.java  |   6 +-
 .../jms/server/embedded/EmbeddedJMS.java        |  21 ++-
 .../proton/ProtonProtocolManagerFactory.java    |   9 +-
 .../hornetq/HornetQProtocolManagerFactory.java  |  18 ++-
 .../mqtt/MQTTProtocolManagerFactory.java        |   9 +-
 .../OpenWireProtocolManagerFactory.java         |   9 +-
 .../core/protocol/openwire/amq/AMQSession.java  |   1 -
 .../stomp/StompProtocolManagerFactory.java      |  11 +-
 .../artemis/core/protocol/ProtocolHandler.java  |   4 +
 .../core/impl/CoreProtocolManagerFactory.java   |  11 +-
 .../core/remoting/impl/AbstractAcceptor.java    |  44 ++++++
 .../core/remoting/impl/invm/InVMAcceptor.java   |  19 ++-
 .../remoting/impl/invm/InVMAcceptorFactory.java |   8 +-
 .../core/remoting/impl/invm/InVMConnection.java |  10 +-
 .../core/remoting/impl/invm/InVMConnector.java  |  22 ++-
 .../impl/invm/InVMConnectorFactory.java         |   4 +-
 .../core/remoting/impl/netty/NettyAcceptor.java |  22 +--
 .../impl/netty/NettyAcceptorFactory.java        |   4 +-
 .../impl/netty/NettyServerConnection.java       |   4 +-
 .../server/impl/RemotingServiceImpl.java        |  93 ++++++------
 .../cluster/impl/MessageLoadBalancingType.java  |   4 +-
 .../AbstractProtocolManagerFactory.java         |   2 +-
 .../core/protocol/ProtocolManagerFactory.java   |   6 +-
 .../artemis/spi/core/remoting/Acceptor.java     |   7 +
 .../spi/core/remoting/AcceptorFactory.java      |   2 +-
 .../ServerConnectionLifeCycleListener.java      |  12 +-
 .../ClusterConnectionMulticastSchema.java       |   3 +-
 .../ClusterConnectionStaticSchema.java          |   3 +-
 .../artemis/uri/AcceptorParserTest.java         |  39 +++++
 .../uri/ClusterConnectionConfigurationTest.java |   1 -
 .../impl/netty/NettyAcceptorFactoryTest.java    |   7 +-
 .../remoting/impl/netty/NettyAcceptorTest.java  |   7 +-
 .../server/impl/fake/FakeAcceptorFactory.java   |  11 +-
 56 files changed, 683 insertions(+), 371 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/BeanSupport.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/BeanSupport.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/BeanSupport.java
new file mode 100644
index 0000000..4985c65
--- /dev/null
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/BeanSupport.java
@@ -0,0 +1,148 @@
+/**
+ * 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.utils.uri;
+
+import java.beans.PropertyDescriptor;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.beanutils.BeanUtilsBean;
+import org.apache.commons.beanutils.Converter;
+
+public class BeanSupport {
+
+   private static final BeanUtilsBean beanUtils = new BeanUtilsBean();
+
+   static {
+      // This is to customize the BeanUtils to use Fluent Proeprties as well
+      beanUtils.getPropertyUtils().addBeanIntrospector(new FluentPropertyBeanIntrospectorWithIgnores());
+   }
+
+   public static void registerConverter(Converter converter, Class type) {
+      synchronized (beanUtils) {
+         beanUtils.getConvertUtils().register(converter, type);
+      }
+   }
+
+   public static <P> P copyData(P source, P target) throws Exception {
+      synchronized (beanUtils) {
+         beanUtils.copyProperties(source, target);
+      }
+      return target;
+   }
+
+   public static <P> P setData(URI uri, P obj, Map<String, String> query) throws Exception {
+      synchronized (beanUtils) {
+         beanUtils.setProperty(obj, "host", uri.getHost());
+         beanUtils.setProperty(obj, "port", uri.getPort());
+         beanUtils.setProperty(obj, "userInfo", uri.getUserInfo());
+         beanUtils.populate(obj, query);
+      }
+      return obj;
+   }
+
+   public static <P> P setData( P obj, Map<String, Object> data) throws Exception {
+      synchronized (beanUtils) {
+         beanUtils.populate(obj, data);
+      }
+      return obj;
+   }
+
+   public static void setData(URI uri,
+                              HashMap<String, Object> properties,
+                              Set<String> allowableProperties,
+                              Map<String, String> query,
+                              Map<String, Object> extraProps) {
+      if (allowableProperties.contains("host")) {
+         properties.put("host", "" + uri.getHost());
+      }
+      if (allowableProperties.contains("port")) {
+         properties.put("port", "" + uri.getPort());
+      }
+      if (allowableProperties.contains("userInfo")) {
+         properties.put("userInfo", "" + uri.getUserInfo());
+      }
+      for (Map.Entry<String, String> entry : query.entrySet()) {
+         if (allowableProperties.contains(entry.getKey())) {
+            properties.put(entry.getKey(), entry.getValue());
+         }
+         else {
+            extraProps.put(entry.getKey(), entry.getValue());
+         }
+      }
+   }
+
+   public static String getData(List<String> ignored, Object... beans) throws Exception {
+      StringBuilder sb = new StringBuilder();
+      boolean empty = true;
+      synchronized (beanUtils) {
+         for (Object bean : beans) {
+            if (bean != null) {
+               PropertyDescriptor[] descriptors = beanUtils.getPropertyUtils().getPropertyDescriptors(bean);
+               for (PropertyDescriptor descriptor : descriptors) {
+                  if (descriptor.getReadMethod() != null && isWriteable(descriptor, ignored)) {
+                     String value = beanUtils.getProperty(bean, descriptor.getName());
+                     if (value != null) {
+                        if (!empty) {
+                           sb.append("&");
+                        }
+                        empty = false;
+                        sb.append(descriptor.getName()).append("=").append(encodeURI(value));
+                     }
+                  }
+               }
+            }
+         }
+      }
+      return sb.toString();
+   }
+
+   private static boolean isWriteable(PropertyDescriptor descriptor, List<String> ignored) {
+      if (ignored != null && ignored.contains(descriptor.getName())) {
+         return false;
+      }
+      Class<?> type = descriptor.getPropertyType();
+      return (type == Double.class) ||
+         (type == double.class) ||
+         (type == Long.class) ||
+         (type == long.class) ||
+         (type == Integer.class) ||
+         (type == int.class) ||
+         (type == Float.class) ||
+         (type == float.class) ||
+         (type == Boolean.class) ||
+         (type == boolean.class) ||
+         (type == String.class);
+   }
+
+
+   public static String decodeURI(String value) throws UnsupportedEncodingException {
+      return URLDecoder.decode(value, "UTF-8");
+   }
+
+   public static String encodeURI(String value) throws UnsupportedEncodingException {
+      return URLEncoder.encode(value, "UTF-8");
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
index 25ce8e9..3120292 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
@@ -16,19 +16,11 @@
  */
 package org.apache.activemq.artemis.utils.uri;
 
-import java.beans.PropertyDescriptor;
 import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.beanutils.BeanUtilsBean;
-import org.apache.commons.beanutils.Converter;
 
 public abstract class URISchema<T, P> {
 
@@ -39,7 +31,7 @@ public abstract class URISchema<T, P> {
    }
 
    public void populateObject(URI uri, T bean) throws Exception {
-      setData(uri, bean, parseQuery(uri.getQuery(), null));
+      BeanSupport.setData(uri, bean, parseQuery(uri.getQuery(), null));
    }
 
    public URI newURI(T bean) throws Exception {
@@ -97,36 +89,15 @@ public abstract class URISchema<T, P> {
 
    protected abstract T internalNewObject(URI uri, Map<String, String> query, P param) throws Exception;
 
-   /** This is the default implementation.
-    *  Sub classes are should provide a proper implementation for their schemas. */
+   /**
+    * This is the default implementation.
+    * Sub classes are should provide a proper implementation for their schemas.
+    */
    protected URI internalNewURI(T bean) throws Exception {
-      String query = URISchema.getData(null, bean);
-
-      return new URI(getSchemaName(),
-          null,
-          "//", query, null);
-
-   }
+      String query = BeanSupport.getData(null, bean);
 
-   private static final BeanUtilsBean beanUtils = new BeanUtilsBean();
+      return new URI(getSchemaName(), null, "//", query, null);
 
-   public static void registerConverter(Converter converter, Class type) {
-      synchronized (beanUtils) {
-         beanUtils.getConvertUtils().register(converter, type);
-      }
-   }
-
-   public static String decodeURI(String value) throws UnsupportedEncodingException {
-      return URLDecoder.decode(value, "UTF-8");
-   }
-
-   public static String encodeURI(String value) throws UnsupportedEncodingException {
-      return URLEncoder.encode(value, "UTF-8");
-   }
-
-   static {
-      // This is to customize the BeanUtils to use Fluent Proeprties as well
-      beanUtils.getPropertyUtils().addBeanIntrospector(new FluentPropertyBeanIntrospectorWithIgnores());
    }
 
    public static Map<String, String> parseQuery(String uri,
@@ -138,8 +109,8 @@ public abstract class URISchema<T, P> {
             for (int i = 0; i < parameters.length; i++) {
                int p = parameters[i].indexOf("=");
                if (p >= 0) {
-                  String name = decodeURI(parameters[i].substring(0, p));
-                  String value = decodeURI(parameters[i].substring(p + 1));
+                  String name = BeanSupport.decodeURI(parameters[i].substring(0, p));
+                  String value = BeanSupport.decodeURI(parameters[i].substring(p + 1));
                   rc.put(name, value);
                }
                else {
@@ -171,84 +142,4 @@ public abstract class URISchema<T, P> {
 
       return buffer.toString();
    }
-
-   protected static <P> P copyData(P source, P target) throws Exception {
-      synchronized (beanUtils) {
-         beanUtils.copyProperties(source, target);
-      }
-      return target;
-   }
-
-   protected static <P> P setData(URI uri, P obj, Map<String, String> query) throws Exception {
-      synchronized (beanUtils) {
-         beanUtils.setProperty(obj, "host", uri.getHost());
-         beanUtils.setProperty(obj, "port", uri.getPort());
-         beanUtils.setProperty(obj, "userInfo", uri.getUserInfo());
-         beanUtils.populate(obj, query);
-      }
-      return obj;
-   }
-
-   public static void setData(URI uri,
-                              HashMap<String, Object> properties,
-                              Set<String> allowableProperties,
-                              Map<String, String> query) {
-      if (allowableProperties.contains("host")) {
-         properties.put("host", "" + uri.getHost());
-      }
-      if (allowableProperties.contains("port")) {
-         properties.put("port", "" + uri.getPort());
-      }
-      if (allowableProperties.contains("userInfo")) {
-         properties.put("userInfo", "" + uri.getUserInfo());
-      }
-      for (Map.Entry<String, String> entry : query.entrySet()) {
-         if (allowableProperties.contains(entry.getKey())) {
-            properties.put(entry.getKey(), entry.getValue());
-         }
-      }
-   }
-
-   public static String getData(List<String> ignored, Object... beans) throws Exception {
-      StringBuilder sb = new StringBuilder();
-      boolean empty = true;
-      synchronized (beanUtils) {
-         for (Object bean : beans) {
-            if (bean != null) {
-               PropertyDescriptor[] descriptors = beanUtils.getPropertyUtils().getPropertyDescriptors(bean);
-               for (PropertyDescriptor descriptor : descriptors) {
-                  if (descriptor.getReadMethod() != null && isWriteable(descriptor, ignored)) {
-                     String value = beanUtils.getProperty(bean, descriptor.getName());
-                     if (value != null) {
-                        if (!empty) {
-                           sb.append("&");
-                        }
-                        empty = false;
-                        sb.append(descriptor.getName()).append("=").append(encodeURI(value));
-                     }
-                  }
-               }
-            }
-         }
-      }
-      return sb.toString();
-   }
-
-   private static boolean isWriteable(PropertyDescriptor descriptor, List<String> ignored) {
-      if (ignored != null && ignored.contains(descriptor.getName())) {
-         return false;
-      }
-      Class<?> type = descriptor.getPropertyType();
-      return (type == Double.class) ||
-         (type == double.class) ||
-         (type == Long.class) ||
-         (type == long.class) ||
-         (type == Integer.class) ||
-         (type == int.class) ||
-         (type == Float.class) ||
-         (type == float.class) ||
-         (type == Boolean.class) ||
-         (type == boolean.class) ||
-         (type == String.class);
-   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
index 183d586..71a7833 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
@@ -18,10 +18,13 @@
 package org.apache.activemq.artemis.utils;
 
 import java.net.URI;
+import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.URIFactory;
 import org.apache.activemq.artemis.utils.uri.URISchema;
+import org.apache.activemq.artemis.utils.uri.URISupport;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -99,6 +102,30 @@ public class URIParserTest {
       Assert.assertEquals("something", fruit.getFluentName());
    }
 
+   @Test
+   public void testQueryConversion() throws Exception {
+      Map<String, String> query = new HashMap<String, String>();
+      String queryString = URISupport.createQueryString(query);
+      System.out.println("queryString1: " + queryString);
+      Assert.assertTrue(queryString.isEmpty());
+
+      query.put("key1", "value1");
+      queryString = URISupport.createQueryString(query);
+      System.out.println("queryString2: " + queryString);
+      Assert.assertEquals("key1=value1", queryString);
+
+      query.put("key2", "value2");
+      queryString = URISupport.createQueryString(query);
+      System.out.println("queryString3: " + queryString);
+      Assert.assertEquals("key1=value1&key2=value2", queryString);
+
+      query.put("key3", "value3");
+      queryString = URISupport.createQueryString(query);
+      System.out.println("queryString4: " + queryString);
+      Assert.assertEquals("key1=value1&key2=value2&key3=value3", queryString);
+
+   }
+
    class FruitParser extends URIFactory<FruitBase, String> {
 
       FruitParser() {
@@ -116,7 +143,7 @@ public class URIParserTest {
 
       @Override
       public FruitBase internalNewObject(URI uri, Map<String, String> query, String fruitName) throws Exception {
-         return setData(uri, new Fruit(getSchemaName()), query);
+         return BeanSupport.setData(uri, new Fruit(getSchemaName()), query);
       }
 
    }
@@ -130,7 +157,7 @@ public class URIParserTest {
 
       @Override
       public FruitBase internalNewObject(URI uri, Map<String, String> query, String fruitName) throws Exception {
-         return setData(uri, new FruitBase(getSchemaName()), query);
+         return BeanSupport.setData(uri, new FruitBase(getSchemaName()), query);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
index 6f91537..deceeea 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
@@ -51,6 +51,8 @@ public class TransportConfiguration implements Serializable {
 
    private Map<String, Object> params;
 
+   private Map<String, Object> extraProps;
+
    private static final byte TYPE_BOOLEAN = 0;
 
    private static final byte TYPE_INT = 1;
@@ -93,6 +95,19 @@ public class TransportConfiguration implements Serializable {
     * @param name      The name of this TransportConfiguration
     */
    public TransportConfiguration(final String className, final Map<String, Object> params, final String name) {
+      this(className, params, name, null);
+   }
+
+   /**
+    * Creates a TransportConfiguration with a specific name providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
+    * and any parameters needed.
+    *
+    * @param className   The class name of the ConnectorFactory
+    * @param params      The parameters needed by the ConnectorFactory
+    * @param name        The name of this TransportConfiguration
+    * @param extraProps  The extra properties that specific to protocols
+    */
+   public TransportConfiguration(final String className, final Map<String, Object> params, final String name, final Map<String, Object> extraProps) {
       factoryClassName = className;
 
       if (params == null || params.isEmpty()) {
@@ -103,6 +118,7 @@ public class TransportConfiguration implements Serializable {
       }
 
       this.name = name;
+      this.extraProps = extraProps;
    }
 
    public TransportConfiguration newTransportConfig(String newName) {
@@ -156,6 +172,9 @@ public class TransportConfiguration implements Serializable {
       return params;
    }
 
+   public Map<String, Object> getExtraParams() {
+      return extraProps;
+   }
 
    @Override
    public int hashCode() {
@@ -249,10 +268,52 @@ public class TransportConfiguration implements Serializable {
 
             first = false;
          }
+         if (extraProps != null) {
+            for (Map.Entry<String, Object> entry : extraProps.entrySet()) {
+               if (!first) {
+                  str.append("&");
+               }
+
+               String key = entry.getKey();
+               String val = entry.getValue() == null ? "null" : entry.getValue().toString();
+
+               str.append(replaceWildcardChars(key)).append('=').append(replaceWildcardChars(val));
+
+               first = false;
+            }
+         }
       }
       return str.toString();
    }
 
+   private void encodeMap(final ActiveMQBuffer buffer, final Map<String, Object> map) {
+      for (Map.Entry<String, Object> entry : map.entrySet()) {
+         buffer.writeString(entry.getKey());
+
+         Object val = entry.getValue();
+
+         if (val instanceof Boolean) {
+            buffer.writeByte(TransportConfiguration.TYPE_BOOLEAN);
+            buffer.writeBoolean((Boolean) val);
+         }
+         else if (val instanceof Integer) {
+            buffer.writeByte(TransportConfiguration.TYPE_INT);
+            buffer.writeInt((Integer) val);
+         }
+         else if (val instanceof Long) {
+            buffer.writeByte(TransportConfiguration.TYPE_LONG);
+            buffer.writeLong((Long) val);
+         }
+         else if (val instanceof String) {
+            buffer.writeByte(TransportConfiguration.TYPE_STRING);
+            buffer.writeString((String) val);
+         }
+         else {
+            throw ActiveMQClientMessageBundle.BUNDLE.invalidEncodeType(val);
+         }
+      }
+   }
+
    /**
     * Encodes this TransportConfiguration into a buffer.
     * <p>
@@ -267,31 +328,10 @@ public class TransportConfiguration implements Serializable {
       buffer.writeInt(params == null ? 0 : params.size());
 
       if (params != null) {
-         for (Map.Entry<String, Object> entry : params.entrySet()) {
-            buffer.writeString(entry.getKey());
-
-            Object val = entry.getValue();
-
-            if (val instanceof Boolean) {
-               buffer.writeByte(TransportConfiguration.TYPE_BOOLEAN);
-               buffer.writeBoolean((Boolean) val);
-            }
-            else if (val instanceof Integer) {
-               buffer.writeByte(TransportConfiguration.TYPE_INT);
-               buffer.writeInt((Integer) val);
-            }
-            else if (val instanceof Long) {
-               buffer.writeByte(TransportConfiguration.TYPE_LONG);
-               buffer.writeLong((Long) val);
-            }
-            else if (val instanceof String) {
-               buffer.writeByte(TransportConfiguration.TYPE_STRING);
-               buffer.writeString((String) val);
-            }
-            else {
-               throw ActiveMQClientMessageBundle.BUNDLE.invalidEncodeType(val);
-            }
-         }
+         encodeMap(buffer, params);
+      }
+      if (extraProps != null) {
+         encodeMap(buffer, extraProps);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
index 755d93b..0803782 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
@@ -53,9 +53,9 @@ import org.apache.activemq.artemis.core.remoting.impl.TransportConfigurationUtil
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 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;
 import org.apache.activemq.artemis.spi.core.remoting.Connector;
 import org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory;
 import org.apache.activemq.artemis.spi.core.remoting.SessionContext;
@@ -67,7 +67,7 @@ import org.apache.activemq.artemis.utils.ExecutorFactory;
 import org.apache.activemq.artemis.utils.OrderedExecutorFactory;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 
-public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, ConnectionLifeCycleListener {
+public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, ClientConnectionLifeCycleListener {
    // Constants
    // ------------------------------------------------------------------------------------
 
@@ -350,7 +350,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
    @Override
    public void connectionCreated(final ActiveMQComponent component,
                                  final Connection connection,
-                                 final String protocol) {
+                                 final ClientProtocolManager protocol) {
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/ActiveMQChannelHandler.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/ActiveMQChannelHandler.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/ActiveMQChannelHandler.java
index d2233d1..d963d1d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/ActiveMQChannelHandler.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/ActiveMQChannelHandler.java
@@ -25,8 +25,8 @@ import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper;
 import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
 import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
+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.ConnectionLifeCycleListener;
 
 /**
  * Common handler implementation for client and server side handler.
@@ -37,13 +37,13 @@ public class ActiveMQChannelHandler extends ChannelDuplexHandler {
 
    private final BufferHandler handler;
 
-   private final ConnectionLifeCycleListener listener;
+   private final BaseConnectionLifeCycleListener listener;
 
    volatile boolean active;
 
    protected ActiveMQChannelHandler(final ChannelGroup group,
                                     final BufferHandler handler,
-                                    final ConnectionLifeCycleListener listener) {
+                                    final BaseConnectionLifeCycleListener listener) {
       this.group = group;
       this.handler = handler;
       this.listener = listener;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
index 6608b54..45334ee 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
@@ -37,8 +37,8 @@ import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper;
 import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
 import org.apache.activemq.artemis.core.security.ActiveMQPrincipal;
 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.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.IPV6Util;
 
@@ -53,7 +53,7 @@ public class NettyConnection implements Connection {
 
    private boolean closed;
 
-   private final ConnectionLifeCycleListener listener;
+   private final BaseConnectionLifeCycleListener listener;
 
    private final boolean batchingEnabled;
 
@@ -79,7 +79,7 @@ public class NettyConnection implements Connection {
 
    public NettyConnection(final Map<String, Object> configuration,
                           final Channel channel,
-                          final ConnectionLifeCycleListener listener,
+                          final BaseConnectionLifeCycleListener listener,
                           boolean batchingEnabled,
                           boolean directDeliver) {
       this.configuration = configuration;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
index 55435f5..355202f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
@@ -94,10 +94,11 @@ import org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtoco
 import org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport;
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 import org.apache.activemq.artemis.spi.core.remoting.AbstractConnector;
+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;
 import org.apache.activemq.artemis.utils.ConfigurationHelper;
 import org.apache.activemq.artemis.utils.FutureLatch;
 
@@ -151,7 +152,7 @@ public class NettyConnector extends AbstractConnector {
 
    private final BufferHandler handler;
 
-   private final ConnectionLifeCycleListener listener;
+   private final BaseConnectionLifeCycleListener listener;
 
    private boolean sslEnabled = TransportConstants.DEFAULT_SSL_ENABLED;
 
@@ -231,7 +232,7 @@ public class NettyConnector extends AbstractConnector {
    // Public --------------------------------------------------------
    public NettyConnector(final Map<String, Object> configuration,
                          final BufferHandler handler,
-                         final ConnectionLifeCycleListener listener,
+                         final BaseConnectionLifeCycleListener listener,
                          final Executor closeExecutor,
                          final Executor threadPool,
                          final ScheduledExecutorService scheduledThreadPool) {
@@ -240,7 +241,7 @@ public class NettyConnector extends AbstractConnector {
 
    public NettyConnector(final Map<String, Object> configuration,
                          final BufferHandler handler,
-                         final ConnectionLifeCycleListener listener,
+                         final BaseConnectionLifeCycleListener listener,
                          final Executor closeExecutor,
                          final Executor threadPool,
                          final ScheduledExecutorService scheduledThreadPool,
@@ -681,7 +682,7 @@ public class NettyConnector extends AbstractConnector {
          // No acceptor on a client connection
          Listener connectionListener = new Listener();
          NettyConnection conn = new NettyConnection(configuration, ch, connectionListener, !httpEnabled && batchDelay > 0, false);
-         connectionListener.connectionCreated(null, conn, protocolManager.getName());
+         connectionListener.connectionCreated(null, conn, protocolManager);
          return conn;
       }
       else {
@@ -709,7 +710,7 @@ public class NettyConnector extends AbstractConnector {
 
       ActiveMQClientChannelHandler(final ChannelGroup group,
                                    final BufferHandler handler,
-                                   final ConnectionLifeCycleListener listener) {
+                                   final ClientConnectionLifeCycleListener listener) {
          super(group, handler, listener);
       }
    }
@@ -899,12 +900,12 @@ public class NettyConnector extends AbstractConnector {
       }
    }
 
-   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(connection.getID(), connection) != null) {
             throw ActiveMQClientMessageBundle.BUNDLE.connectionExists(connection.getID());
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java
index a7c5f0e..a0648df 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.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 NettyConnectorFactory 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/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BaseConnectionLifeCycleListener.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BaseConnectionLifeCycleListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BaseConnectionLifeCycleListener.java
new file mode 100644
index 0000000..77a8c59
--- /dev/null
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/BaseConnectionLifeCycleListener.java
@@ -0,0 +1,60 @@
+/*
+ * 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.spi.core.remoting;
+
+import org.apache.activemq.artemis.api.core.ActiveMQException;
+import org.apache.activemq.artemis.core.server.ActiveMQComponent;
+
+/**
+ * A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events.
+ */
+public interface BaseConnectionLifeCycleListener<ProtocolClass> {
+
+   /**
+    * This method is used both by client connector creation and server connection creation through
+    * acceptors. On the client side the {@code component} parameter is normally passed as
+    * {@code null}.
+    * <p>
+    * Leaving this method here and adding a different one at
+    * {@code ServerConnectionLifeCycleListener} is a compromise for a reasonable split between the
+    * activemq-server and activemq-client packages while avoiding to pull too much into activemq-core.
+    * The pivotal point keeping us from removing the method is {@link ConnectorFactory} and the
+    * usage of it.
+    *
+    * @param component  This will probably be an {@code Acceptor} and only used on the server side.
+    * @param connection the connection that has been created
+    * @param protocol   the messaging protocol type this connection uses
+    */
+   void connectionCreated(ActiveMQComponent component, Connection connection, ProtocolClass protocol);
+
+   /**
+    * Called when a connection is destroyed.
+    *
+    * @param connectionID the connection being destroyed.
+    */
+   void connectionDestroyed(Object connectionID);
+
+   /**
+    * Called when an error occurs on the connection.
+    *
+    * @param connectionID the id of the connection.
+    * @param me           the exception.
+    */
+   void connectionException(Object connectionID, ActiveMQException me);
+
+   void connectionReadyForWrites(Object connectionID, boolean ready);
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientConnectionLifeCycleListener.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientConnectionLifeCycleListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientConnectionLifeCycleListener.java
new file mode 100644
index 0000000..deb36cd
--- /dev/null
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ClientConnectionLifeCycleListener.java
@@ -0,0 +1,22 @@
+/**
+ * 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.spi.core.remoting;
+
+public interface ClientConnectionLifeCycleListener extends BaseConnectionLifeCycleListener<ClientProtocolManager> {
+
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectionLifeCycleListener.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectionLifeCycleListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectionLifeCycleListener.java
index b5d7d97..f702227 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectionLifeCycleListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectionLifeCycleListener.java
@@ -16,45 +16,11 @@
  */
 package org.apache.activemq.artemis.spi.core.remoting;
 
-import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.apache.activemq.artemis.core.server.ActiveMQComponent;
-
 /**
  * A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events.
+ * @deprecated use {@link ClientConnectionLifeCycleListener} instead.
  */
-public interface ConnectionLifeCycleListener {
-
-   /**
-    * This method is used both by client connector creation and server connection creation through
-    * acceptors. On the client side the {@code component} parameter is normally passed as
-    * {@code null}.
-    * <p>
-    * Leaving this method here and adding a different one at
-    * {@code ServerConnectionLifeCycleListener} is a compromise for a reasonable split between the
-    * activemq-server and activemq-client packages while avoiding to pull too much into activemq-core.
-    * The pivotal point keeping us from removing the method is {@link ConnectorFactory} and the
-    * usage of it.
-    *
-    * @param component  This will probably be an {@code Acceptor} and only used on the server side.
-    * @param connection the connection that has been created
-    * @param protocol   the messaging protocol type this connection uses
-    */
-   void connectionCreated(ActiveMQComponent component, Connection connection, String protocol);
-
-   /**
-    * Called when a connection is destroyed.
-    *
-    * @param connectionID the connection being destroyed.
-    */
-   void connectionDestroyed(Object connectionID);
-
-   /**
-    * Called when an error occurs on the connection.
-    *
-    * @param connectionID the id of the connection.
-    * @param me           the exception.
-    */
-   void connectionException(Object connectionID, ActiveMQException me);
+@Deprecated
+public interface ConnectionLifeCycleListener extends BaseConnectionLifeCycleListener<String> {
 
-   void connectionReadyForWrites(Object connectionID, boolean ready);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectorFactory.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectorFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectorFactory.java
index 3d7c7b3..e709f78 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectorFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ConnectorFactory.java
@@ -42,7 +42,7 @@ public interface ConnectorFactory extends TransportConfigurationHelper {
     */
    Connector createConnector(Map<String, Object> configuration,
                              BufferHandler handler,
-                             ConnectionLifeCycleListener listener,
+                             ClientConnectionLifeCycleListener listener,
                              Executor closeExecutor,
                              Executor threadPool,
                              ScheduledExecutorService scheduledThreadPool,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/connector/TCPTransportConfigurationSchema.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/connector/TCPTransportConfigurationSchema.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/connector/TCPTransportConfigurationSchema.java
index 309e3e4..e962a5d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/connector/TCPTransportConfigurationSchema.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/connector/TCPTransportConfigurationSchema.java
@@ -26,6 +26,7 @@ import java.util.Set;
 
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
 
 public class TCPTransportConfigurationSchema extends AbstractTransportConfigurationSchema {
@@ -60,10 +61,13 @@ public class TCPTransportConfigurationSchema extends AbstractTransportConfigurat
                                                                          String factoryName) throws URISyntaxException {
       HashMap<String, Object> props = new HashMap<>();
 
-      setData(uri, props, allowableProperties, query);
+      Map<String, Object> extraProps = new HashMap<>();
+      BeanSupport.setData(uri, props, allowableProperties, query, extraProps);
       List<TransportConfiguration> transportConfigurations = new ArrayList<>();
 
-      transportConfigurations.add(new TransportConfiguration(factoryName, props, name));
+      TransportConfiguration config = new TransportConfiguration(factoryName, props, name, extraProps);
+
+      transportConfigurations.add(config);
       String connectors = uri.getFragment();
 
       if (connectors != null && !connectors.trim().isEmpty()) {
@@ -71,9 +75,10 @@ public class TCPTransportConfigurationSchema extends AbstractTransportConfigurat
          for (String s : split) {
             URI extraUri = new URI(s);
             HashMap<String, Object> newProps = new HashMap<>();
-            setData(extraUri, newProps, allowableProperties, query);
-            setData(extraUri, newProps, allowableProperties, parseQuery(extraUri.getQuery(), null));
-            transportConfigurations.add(new TransportConfiguration(factoryName, newProps, name + ":" + extraUri.toString()));
+            extraProps = new HashMap<>();
+            BeanSupport.setData(extraUri, newProps, allowableProperties, query, extraProps);
+            BeanSupport.setData(extraUri, newProps, allowableProperties, parseQuery(extraUri.getQuery(), null), extraProps);
+            transportConfigurations.add(new TransportConfiguration(factoryName, newProps, name + ":" + extraUri.toString(), extraProps));
          }
       }
       return transportConfigurations;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/AbstractServerLocatorSchema.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/AbstractServerLocatorSchema.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/AbstractServerLocatorSchema.java
index e1a5f2b..d0693d4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/AbstractServerLocatorSchema.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/AbstractServerLocatorSchema.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.artemis.uri.schema.serverLocator;
 
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.URISchema;
 
 import java.net.URI;
@@ -25,6 +26,6 @@ import java.util.Map;
 public abstract class AbstractServerLocatorSchema extends URISchema<ServerLocator, String> {
 
    protected ConnectionOptions newConnectionOptions(URI uri, Map<String, String> query) throws Exception {
-      return setData(uri, new ConnectionOptions(), query);
+      return BeanSupport.setData(uri, new ConnectionOptions(), query);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/InVMServerLocatorSchema.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/InVMServerLocatorSchema.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/InVMServerLocatorSchema.java
index ace312a..2060ea9 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/InVMServerLocatorSchema.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/InVMServerLocatorSchema.java
@@ -20,6 +20,7 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.uri.schema.connector.InVMTransportConfigurationSchema;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
 
 import java.net.URI;
@@ -37,7 +38,7 @@ public class InVMServerLocatorSchema extends AbstractServerLocatorSchema {
    protected ServerLocator internalNewObject(URI uri, Map<String, String> query, String name) throws Exception {
       TransportConfiguration tc = InVMTransportConfigurationSchema.createTransportConfiguration(uri, query, name, "org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory");
       ServerLocator factory = ActiveMQClient.createServerLocatorWithoutHA(tc);
-      return setData(uri, factory, query);
+      return BeanSupport.setData(uri, factory, query);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/JGroupsServerLocatorSchema.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/JGroupsServerLocatorSchema.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/JGroupsServerLocatorSchema.java
index 73a1b94..c8ee305 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/JGroupsServerLocatorSchema.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/JGroupsServerLocatorSchema.java
@@ -22,6 +22,7 @@ import org.apache.activemq.artemis.api.core.JGroupsFileBroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.core.JGroupsPropertiesBroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
 
 import java.io.NotSerializableException;
@@ -63,7 +64,7 @@ public class JGroupsServerLocatorSchema extends AbstractServerLocatorSchema {
       else {
          throw new NotSerializableException(endpoint + "not serializable");
       }
-      String query = getData(null, bean, dgc, endpoint);
+      String query = BeanSupport.getData(null, bean, dgc, endpoint);
       dgc.setBroadcastEndpointFactory(endpoint);
       return new URI(SchemaConstants.JGROUPS, null, auth, -1, null, query, null);
    }
@@ -79,11 +80,11 @@ public class JGroupsServerLocatorSchema extends AbstractServerLocatorSchema {
          endpointFactory = new JGroupsPropertiesBroadcastEndpointFactory().setChannelName(uri.getAuthority());
       }
 
-      setData(uri, endpointFactory, query);
+      BeanSupport.setData(uri, endpointFactory, query);
 
       DiscoveryGroupConfiguration dcConfig = new DiscoveryGroupConfiguration().setName(name).setBroadcastEndpointFactory(endpointFactory);
 
-      setData(uri, dcConfig, query);
+      BeanSupport.setData(uri, dcConfig, query);
       return dcConfig;
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/TCPServerLocatorSchema.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/TCPServerLocatorSchema.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/TCPServerLocatorSchema.java
index d141ee6..4a2e2aa 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/TCPServerLocatorSchema.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/TCPServerLocatorSchema.java
@@ -27,6 +27,7 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactor
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.uri.schema.connector.TCPTransportConfigurationSchema;
 import org.apache.activemq.artemis.utils.IPV6Util;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
 
 public class TCPServerLocatorSchema extends AbstractServerLocatorSchema {
@@ -52,7 +53,7 @@ public class TCPServerLocatorSchema extends AbstractServerLocatorSchema {
 
    @Override
    protected URI internalNewURI(ServerLocator bean) throws Exception {
-      String query = getData(null, bean);
+      String query = BeanSupport.getData(null, bean);
       TransportConfiguration[] staticConnectors = bean.getStaticTransportConfigurations();
       return getURI(query, staticConnectors);
    }
@@ -122,9 +123,9 @@ public class TCPServerLocatorSchema extends AbstractServerLocatorSchema {
             else {
                empty = false;
             }
-            cb.append(encodeURI(entry.getKey()));
+            cb.append(BeanSupport.encodeURI(entry.getKey()));
             cb.append("=");
-            cb.append(encodeURI(entry.getValue().toString()));
+            cb.append(BeanSupport.encodeURI(entry.getValue().toString()));
          }
       }
       return cb.toString();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/UDPServerLocatorSchema.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/UDPServerLocatorSchema.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/UDPServerLocatorSchema.java
index a21e1a9..3498804 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/UDPServerLocatorSchema.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/schema/serverLocator/UDPServerLocatorSchema.java
@@ -25,6 +25,7 @@ import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
 import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
 
 public class UDPServerLocatorSchema extends AbstractServerLocatorSchema {
@@ -60,7 +61,7 @@ public class UDPServerLocatorSchema extends AbstractServerLocatorSchema {
       DiscoveryGroupConfiguration dgc = bean.getDiscoveryGroupConfiguration();
       UDPBroadcastEndpointFactory endpoint = (UDPBroadcastEndpointFactory) dgc.getBroadcastEndpointFactory();
       dgc.setBroadcastEndpointFactory(endpoint);
-      String query = getData(IGNORED, bean, dgc, endpoint);
+      String query = BeanSupport.getData(IGNORED, bean, dgc, endpoint);
       return new URI(SchemaConstants.UDP, null, endpoint.getGroupAddress(), endpoint.getGroupPort(), null, query, null);
    }
 
@@ -71,11 +72,11 @@ public class UDPServerLocatorSchema extends AbstractServerLocatorSchema {
                                                                             String name) throws Exception {
       UDPBroadcastEndpointFactory endpointFactoryConfiguration = new UDPBroadcastEndpointFactory().setGroupAddress(host).setGroupPort(port);
 
-      setData(uri, endpointFactoryConfiguration, query);
+      BeanSupport.setData(uri, endpointFactoryConfiguration, query);
 
-      DiscoveryGroupConfiguration dgc = setData(uri, new DiscoveryGroupConfiguration(), query).setName(name).setBroadcastEndpointFactory(endpointFactoryConfiguration);
+      DiscoveryGroupConfiguration dgc = BeanSupport.setData(uri, new DiscoveryGroupConfiguration(), query).setName(name).setBroadcastEndpointFactory(endpointFactoryConfiguration);
 
-      setData(uri, dgc, query);
+      BeanSupport.setData(uri, dgc, query);
       return dgc;
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/AbstractCFSchema.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/AbstractCFSchema.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/AbstractCFSchema.java
index b93d2ea..9b407db 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/AbstractCFSchema.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/AbstractCFSchema.java
@@ -22,6 +22,7 @@ import java.util.Map;
 
 import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.URISchema;
 
 public abstract class AbstractCFSchema extends URISchema<ActiveMQConnectionFactory, String> {
@@ -32,7 +33,7 @@ public abstract class AbstractCFSchema extends URISchema<ActiveMQConnectionFacto
       if (JMSConnectionOptions.convertCFType(type) == null) {
          ActiveMQClientLogger.LOGGER.invalidCFType(type, uri.toString());
       }
-      return setData(uri, new JMSConnectionOptions(), query);
+      return BeanSupport.setData(uri, new JMSConnectionOptions(), query);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/InVMSchema.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/InVMSchema.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/InVMSchema.java
index 4e69c4d..18b0111 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/InVMSchema.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/InVMSchema.java
@@ -20,6 +20,7 @@ import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.uri.schema.serverLocator.InVMServerLocatorSchema;
 import org.apache.activemq.artemis.uri.schema.connector.InVMTransportConfigurationSchema;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
 
 import java.net.URI;
@@ -38,7 +39,7 @@ public class InVMSchema extends AbstractCFSchema {
                                                          String name) throws Exception {
       JMSConnectionOptions options = newConectionOptions(uri, query);
       ActiveMQConnectionFactory factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(options.getFactoryTypeEnum(), InVMTransportConfigurationSchema.createTransportConfiguration(uri, query, name, "org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory"));
-      return setData(uri, factory, query);
+      return BeanSupport.setData(uri, factory, query);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/JGroupsSchema.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/JGroupsSchema.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/JGroupsSchema.java
index 2874fa9..1bc78c3 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/JGroupsSchema.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/JGroupsSchema.java
@@ -28,8 +28,8 @@ import org.apache.activemq.artemis.api.core.JGroupsPropertiesBroadcastEndpointFa
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.uri.schema.serverLocator.JGroupsServerLocatorSchema;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
-import org.apache.activemq.artemis.utils.uri.URISchema;
 
 public class JGroupsSchema extends AbstractCFSchema {
 
@@ -53,7 +53,7 @@ public class JGroupsSchema extends AbstractCFSchema {
       else {
          factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(dcConfig, options.getFactoryTypeEnum());
       }
-      return URISchema.setData(uri, factory, query);
+      return BeanSupport.setData(uri, factory, query);
    }
 
    @Override
@@ -70,7 +70,7 @@ public class JGroupsSchema extends AbstractCFSchema {
       else {
          throw new NotSerializableException(endpoint + "not serializable");
       }
-      String query = URISchema.getData(null, bean, dgc, endpoint);
+      String query = BeanSupport.getData(null, bean, dgc, endpoint);
       dgc.setBroadcastEndpointFactory(endpoint);
       return new URI(SchemaConstants.JGROUPS, null, auth, -1, null, query, null);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java
index 5e9eb14..a350263 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/TCPSchema.java
@@ -23,8 +23,8 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.uri.schema.serverLocator.TCPServerLocatorSchema;
 import org.apache.activemq.artemis.uri.schema.connector.TCPTransportConfigurationSchema;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
-import org.apache.activemq.artemis.utils.uri.URISchema;
 
 import java.net.URI;
 import java.util.List;
@@ -58,12 +58,12 @@ public class TCPSchema extends AbstractCFSchema {
          factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(options.getFactoryTypeEnum(), tcs);
       }
 
-      return URISchema.setData(uri, factory, query);
+      return BeanSupport.setData(uri, factory, query);
    }
 
    @Override
    protected URI internalNewURI(ActiveMQConnectionFactory bean) throws Exception {
-      String query = URISchema.getData(null, bean);
+      String query = BeanSupport.getData(null, bean);
       TransportConfiguration[] staticConnectors = bean.getStaticConnectors();
       return TCPServerLocatorSchema.getURI(query, staticConnectors);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/UDPSchema.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/UDPSchema.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/UDPSchema.java
index 5a6ca9a..4a1e87b 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/UDPSchema.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/uri/UDPSchema.java
@@ -25,8 +25,8 @@ import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.uri.schema.serverLocator.UDPServerLocatorSchema;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.apache.activemq.artemis.utils.uri.SchemaConstants;
-import org.apache.activemq.artemis.utils.uri.URISchema;
 
 public class UDPSchema extends AbstractCFSchema {
 
@@ -50,14 +50,14 @@ public class UDPSchema extends AbstractCFSchema {
       else {
          factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(dgc, options.getFactoryTypeEnum());
       }
-      return URISchema.setData(uri, factory, query);
+      return BeanSupport.setData(uri, factory, query);
    }
 
    @Override
    protected URI internalNewURI(ActiveMQConnectionFactory bean) throws Exception {
       DiscoveryGroupConfiguration dgc = bean.getDiscoveryGroupConfiguration();
       UDPBroadcastEndpointFactory endpoint = (UDPBroadcastEndpointFactory) dgc.getBroadcastEndpointFactory();
-      String query = URISchema.getData(UDPServerLocatorSchema.IGNORED, bean, dgc, endpoint);
+      String query = BeanSupport.getData(UDPServerLocatorSchema.IGNORED, bean, dgc, endpoint);
       dgc.setBroadcastEndpointFactory(endpoint);
       return new URI(SchemaConstants.UDP, null, endpoint.getGroupAddress(), endpoint.getGroupPort(), null, query, null);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java
index 7e235a6..bee15f0 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java
@@ -18,6 +18,7 @@ package org.apache.activemq.artemis.jms.server.embedded;
 
 import javax.naming.Context;
 
+import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.FileDeploymentManager;
 import org.apache.activemq.artemis.core.registry.JndiBindingRegistry;
 import org.apache.activemq.artemis.core.registry.MapBindingRegistry;
@@ -80,13 +81,19 @@ public class EmbeddedJMS extends EmbeddedActiveMQ {
       return this;
    }
 
-   /**
-    * Lookup in the registry for registered object, i.e. a ConnectionFactory.
-    * <p>
-    * This is a convenience method.
-    *
-    * @param name
-    */
+
+   public EmbeddedJMS setConfiguration(Configuration configuration) {
+      super.setConfiguration(configuration);
+      return this;
+   }
+
+      /**
+       * Lookup in the registry for registered object, i.e. a ConnectionFactory.
+       * <p>
+       * This is a convenience method.
+       *
+       * @param name
+       */
    public Object lookup(String name) {
       return serverManager.getRegistry().lookup(name);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
index c11e05b..e677563 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
@@ -22,10 +22,12 @@ 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.spi.core.protocol.ProtocolManagerFactory;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.osgi.service.component.annotations.Component;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 @Component(service = ProtocolManagerFactory.class)
 public class ProtonProtocolManagerFactory extends AbstractProtocolManagerFactory<Interceptor> {
@@ -38,9 +40,10 @@ public class ProtonProtocolManagerFactory extends AbstractProtocolManagerFactory
 
    @Override
    public ProtocolManager createProtocolManager(ActiveMQServer server,
-                                                List<Interceptor> incomingInterceptors,
-                                                List<Interceptor> outgoingInterceptors) {
-      return new ProtonProtocolManager(this, server);
+                                                final Map<String, Object> parameters,
+                                                List<BaseInterceptor> incomingInterceptors,
+                                                List<BaseInterceptor> outgoingInterceptors) throws Exception {
+      return BeanSupport.setData(new ProtonProtocolManager(this, server), parameters);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java b/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
index deeb191..9fd851f 100644
--- a/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
@@ -17,7 +17,9 @@
 package org.apache.activemq.artemis.core.protocol.hornetq;
 
 import java.util.List;
+import java.util.Map;
 
+import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.api.core.Interceptor;
 import org.apache.activemq.artemis.core.protocol.core.impl.CoreProtocolManagerFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
@@ -36,11 +38,17 @@ public class HornetQProtocolManagerFactory extends CoreProtocolManagerFactory {
 
    @Override
    public ProtocolManager createProtocolManager(final ActiveMQServer server,
-                                                final List<Interceptor> incomingInterceptors,
-                                                List<Interceptor> outgoingInterceptors) {
-      incomingInterceptors.add(new HQPropertiesConversionInterceptor(true));
-      outgoingInterceptors.add(new HQPropertiesConversionInterceptor(false));
-      return new HornetQProtocolManager(this, server, incomingInterceptors, outgoingInterceptors);
+                                                final Map<String, Object> parameters,
+                                                final List<BaseInterceptor> incomingInterceptors,
+                                                List<BaseInterceptor> outgoingInterceptors) {
+
+      List<Interceptor> hqIncoming = filterInterceptors(incomingInterceptors);
+      List<Interceptor> hqOutgoing = filterInterceptors(outgoingInterceptors);
+
+      hqIncoming.add(new HQPropertiesConversionInterceptor(true));
+      hqOutgoing.add(new HQPropertiesConversionInterceptor(false));
+
+      return new HornetQProtocolManager(this, server, hqIncoming, hqOutgoing);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManagerFactory.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManagerFactory.java
index 5bb34b5..982723f 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManagerFactory.java
@@ -18,14 +18,16 @@
 package org.apache.activemq.artemis.core.protocol.mqtt;
 
 import java.util.List;
+import java.util.Map;
 
+import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 import org.apache.activemq.artemis.spi.core.protocol.ProtocolManagerFactory;
 import org.osgi.service.component.annotations.Component;
 
 @Component(service = ProtocolManagerFactory.class)
-public class MQTTProtocolManagerFactory implements ProtocolManagerFactory {
+public class MQTTProtocolManagerFactory implements ProtocolManagerFactory<BaseInterceptor> {
 
    public static final String MQTT_PROTOCOL_NAME = "MQTT";
 
@@ -35,8 +37,9 @@ public class MQTTProtocolManagerFactory implements ProtocolManagerFactory {
 
    @Override
    public ProtocolManager createProtocolManager(ActiveMQServer server,
-                                                List incomingInterceptors,
-                                                List outgoingInterceptors) {
+                                                final Map<String, Object> parameters,
+                                                List<BaseInterceptor> incomingInterceptors,
+                                                List<BaseInterceptor> outgoingInterceptors) {
       return new MQTTProtocolManager(server);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
index 6b3076d..772ce8b 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
@@ -18,6 +18,7 @@ package org.apache.activemq.artemis.core.protocol.openwire;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.api.core.Interceptor;
@@ -25,6 +26,7 @@ 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.spi.core.protocol.ProtocolManagerFactory;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.osgi.service.component.annotations.Component;
 
 @Component(service = ProtocolManagerFactory.class)
@@ -38,9 +40,10 @@ public class OpenWireProtocolManagerFactory extends AbstractProtocolManagerFacto
 
    @Override
    public ProtocolManager createProtocolManager(final ActiveMQServer server,
-                                                final List<Interceptor> incomingInterceptors,
-                                                List<Interceptor> outgoingInterceptors) {
-      return new OpenWireProtocolManager(this, server);
+                                                Map<String, Object> parameters,
+                                                final List<BaseInterceptor> incomingInterceptors,
+                                                List<BaseInterceptor> outgoingInterceptors) throws Exception {
+      return BeanSupport.setData(new OpenWireProtocolManager(this, server), parameters);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/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 a388f50..3e642c6 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
@@ -62,7 +62,6 @@ import org.apache.activemq.artemis.spi.core.protocol.SessionCallback;
 import org.apache.activemq.wireformat.WireFormat;
 
 public class AMQSession implements SessionCallback {
-
    private AMQServerSession coreSession;
    private ConnectionInfo connInfo;
    private SessionInfo sessInfo;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
index 2d41e03..f7d5d4a 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
@@ -17,12 +17,14 @@
 package org.apache.activemq.artemis.core.protocol.stomp;
 
 import java.util.List;
+import java.util.Map;
 
 import org.apache.activemq.artemis.api.core.BaseInterceptor;
 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.spi.core.protocol.ProtocolManagerFactory;
+import org.apache.activemq.artemis.utils.uri.BeanSupport;
 import org.osgi.service.component.annotations.Component;
 
 @Component(service = ProtocolManagerFactory.class)
@@ -36,14 +38,15 @@ public class StompProtocolManagerFactory extends AbstractProtocolManagerFactory<
 
    @Override
    public ProtocolManager createProtocolManager(final ActiveMQServer server,
-                                                final List<StompFrameInterceptor> incomingInterceptors,
-                                                List<StompFrameInterceptor> outgoingInterceptors) {
-      return new StompProtocolManager(this, server, incomingInterceptors, outgoingInterceptors);
+                                                final Map<String, Object> parameters,
+                                                final List<BaseInterceptor> incomingInterceptors,
+                                                List<BaseInterceptor> outgoingInterceptors) throws Exception {
+      return BeanSupport.setData(new StompProtocolManager(this, server, filterInterceptors(incomingInterceptors), filterInterceptors(outgoingInterceptors)), parameters);
    }
 
    @Override
    public List<StompFrameInterceptor> filterInterceptors(List<BaseInterceptor> interceptors) {
-      return filterInterceptors(StompFrameInterceptor.class, interceptors);
+      return internalFilterInterceptors(StompFrameInterceptor.class, interceptors);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ebc6786/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
index 8f965ce..fed7a75 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
@@ -84,6 +84,10 @@ public class ProtocolHandler {
       }
    }
 
+   public ProtocolManager getProtocol(String name) {
+      return this.protocolMap.get(name);
+   }
+
    class ProtocolDecoder extends ByteToMessageDecoder {
 
       private final boolean http;


Mime
View raw message