activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [5/8] activemq-6 git commit: ACTIVEMQ6-7 - Improve Serialization on Connection Factory
Date Thu, 12 Feb 2015 20:01:45 GMT
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-jms-client/src/test/java/org/apache/activemq/uri/ConnectionFactoryURITest.java
----------------------------------------------------------------------
diff --git a/activemq-jms-client/src/test/java/org/apache/activemq/uri/ConnectionFactoryURITest.java b/activemq-jms-client/src/test/java/org/apache/activemq/uri/ConnectionFactoryURITest.java
index 19fb50a..7e922fb 100644
--- a/activemq-jms-client/src/test/java/org/apache/activemq/uri/ConnectionFactoryURITest.java
+++ b/activemq-jms-client/src/test/java/org/apache/activemq/uri/ConnectionFactoryURITest.java
@@ -17,11 +17,31 @@
 
 package org.apache.activemq.uri;
 
-import javax.jms.ConnectionFactory;
-import javax.jms.XAQueueConnectionFactory;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.InvocationTargetException;
 import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
 
+import org.apache.activemq.api.core.BroadcastEndpointFactory;
+import org.apache.activemq.api.core.DiscoveryGroupConfiguration;
+import org.apache.activemq.api.core.JGroupsFileBroadcastEndpointFactory;
+import org.apache.activemq.api.core.JGroupsPropertiesBroadcastEndpointFactory;
+import org.apache.activemq.api.core.TransportConfiguration;
+import org.apache.activemq.api.core.UDPBroadcastEndpointFactory;
+import org.apache.activemq.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.api.jms.JMSFactoryType;
+import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory;
+import org.apache.activemq.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory;
+import org.apache.activemq.jms.client.ActiveMQQueueConnectionFactory;
+import org.apache.activemq.jms.client.ActiveMQTopicConnectionFactory;
+import org.apache.activemq.jms.client.ActiveMQXAQueueConnectionFactory;
+import org.apache.activemq.jms.client.ActiveMQXATopicConnectionFactory;
+import org.apache.activemq.tests.util.RandomUtil;
+import org.apache.commons.beanutils.BeanUtilsBean;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -33,13 +53,212 @@ public class ConnectionFactoryURITest
 {
    ConnectionFactoryParser parser = new ConnectionFactoryParser();
 
+   @Test
+   public void testQUEUE_XA_CF() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=QUEUE_XA_CF"));
+
+      Assert.assertTrue(ActiveMQXAQueueConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+
+   @Test
+   public void testTOPICXA_CF() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=TOPIC_XA_CF"));
+
+      Assert.assertTrue(ActiveMQXATopicConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+   @Test
+
+   public void testQUEUE_CF() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=QUEUE_CF"));
+
+      Assert.assertTrue(ActiveMQQueueConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+
+   @Test
+   public void testTOPIC_CF() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=TOPIC_CF"));
+
+      Assert.assertTrue(ActiveMQTopicConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+
+   @Test
+   public void testCF() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true&type=CF"));
+
+      Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+
+   @Test
+   public void testNoCF() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("tcp://localhost:3030?ha=true"));
+
+      Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+
+   @Test
+   public void testTCPAllProperties() throws Exception
+   {
+      StringBuilder sb = new StringBuilder();
+      sb.append("tcp://localhost:3030?ha=true");
+      BeanUtilsBean bean = new BeanUtilsBean();
+      ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(true, (TransportConfiguration) null);
+      populate(sb, bean, factory);
+      ActiveMQConnectionFactory factory2 = parser.newObject(new URI(sb.toString()));
+      checkEquals(bean, factory, factory2);
+   }
+
+   @Test
+   public void testTCPAllNettyConnectorProperties() throws Exception
+   {
+      Map<String, Object> props = new HashMap<>();
+      Set<String> allowableConnectorKeys = TransportConstants.ALLOWABLE_CONNECTOR_KEYS;
+      StringBuilder sb = new StringBuilder();
+      sb.append("tcp://localhost:3030?ha=true");
+      populateConnectorParams(props, allowableConnectorKeys, sb);
+      ActiveMQConnectionFactory factory = parser.newObject(new URI(sb.toString()));
+
+      Map<String, Object> params = factory.getStaticConnectors()[0].getParams();
+      Assert.assertEquals(params.get("host"), "localhost");
+      Assert.assertEquals(params.get("port"), 3030);
+      for (Map.Entry<String, Object> entry : params.entrySet())
+      {
+         if (!entry.getKey().equals("host") && !entry.getKey().equals("port"))
+         {
+            Assert.assertEquals(entry.getValue(), props.get(entry.getKey()));
+         }
+      }
+   }
+
+
+   @Test
+   public void testTCPAllNettyConnectorPropertiesMultiple() throws Exception
+   {
+      Map<String, Object> props = new HashMap<>();
+      Set<String> allowableConnectorKeys = TransportConstants.ALLOWABLE_CONNECTOR_KEYS;
+      StringBuilder sb = new StringBuilder();
+      sb.append("(tcp://localhost0:5445?");//localhost1:5446,localhost2:5447,localhost3:5448)&ha=true");
+      populateConnectorParams(props, allowableConnectorKeys, sb);
+      Map<String, Object> props2 = new HashMap<>();
+      sb.append(",tcp://localhost1:5446?");
+      populateConnectorParams(props2, allowableConnectorKeys, sb);
+      Map<String, Object> props3 = new HashMap<>();
+      sb.append(",tcp://localhost2:5447?");
+      populateConnectorParams(props3, allowableConnectorKeys, sb);
+      sb.append(")?ha=true&clientID=myID");
+
+      ActiveMQConnectionFactory factory = parser.newObject(sb.toString());
+
+      TransportConfiguration[] staticConnectors = factory.getStaticConnectors();
+      Assert.assertEquals(3, staticConnectors.length);
+      checkTC(props, staticConnectors[0],0);
+      checkTC(props2, staticConnectors[1],1);
+      checkTC(props3, staticConnectors[2],2);
+   }
+
+   private void checkTC(Map<String, Object> props, TransportConfiguration staticConnector, int offfSet)
+   {
+      TransportConfiguration connector = staticConnector;
+      Assert.assertEquals(connector.getParams().get("host"), "localhost" + offfSet);
+      Assert.assertEquals(connector.getParams().get("port"), (5445 + offfSet));
+      Map<String, Object> params = connector.getParams();
+      for (Map.Entry<String, Object> entry : params.entrySet())
+      {
+         if (!entry.getKey().equals("host") && !entry.getKey().equals("port"))
+         {
+            Assert.assertEquals(entry.getValue(), props.get(entry.getKey()));
+         }
+      }
+   }
+
+   private void populateConnectorParams(Map<String, Object> props, Set<String> allowableConnectorKeys, StringBuilder sb)
+   {
+      for (String allowableConnectorKey : allowableConnectorKeys)
+      {
+         if (!allowableConnectorKey.equals("host") && !allowableConnectorKey.equals("port"))
+         {
+            String value = RandomUtil.randomString();
+            props.put(allowableConnectorKey, value);
+            sb.append("&").append(allowableConnectorKey).append("=").append(value);
+         }
+      }
+   }
+
+   @Test
+   public void testTCPURI() throws Exception
+   {
+      TransportConfiguration tc = new TransportConfiguration(NettyConnectorFactory.class.getName());
+      HashMap<String, Object> params = new HashMap<>();
+      params.put("host", "localhost1");
+      params.put("port", 5446);
+      TransportConfiguration tc2 = new TransportConfiguration(NettyConnectorFactory.class.getName(), params);
+      HashMap<String, Object> params2 = new HashMap<>();
+      params2.put("host", "localhost2");
+      params2.put("port", 5447);
+      TransportConfiguration tc3 = new TransportConfiguration(NettyConnectorFactory.class.getName(), params2);
+      ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, tc, tc2, tc3);
+      URI tcp = parser.createSchema("tcp", connectionFactoryWithHA);
+      ActiveMQConnectionFactory factory = parser.newObject(tcp);
+      BeanUtilsBean bean = new BeanUtilsBean();
+      checkEquals(bean, connectionFactoryWithHA, factory);
+   }
 
    @Test
    public void testUDP() throws Exception
    {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("udp://localhost:3030?ha=true&type=QUEUE_XA_CF"));
 
-      Assert.assertTrue(factory instanceof XAQueueConnectionFactory);
+      Assert.assertTrue(ActiveMQXAQueueConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+
+   @Test
+   public void testUDPAllProperties() throws Exception
+   {
+      StringBuilder sb = new StringBuilder();
+      sb.append("udp://localhost:3030?ha=true");
+      BeanUtilsBean bean = new BeanUtilsBean();
+      ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(true, (TransportConfiguration) null);
+      populate(sb, bean, factory);
+      ActiveMQConnectionFactory factory2 = parser.newObject(new URI(sb.toString()));
+      checkEquals(bean, factory, factory2);
+   }
+
+   @Test
+   public void testUDPURI() throws Exception
+   {
+      DiscoveryGroupConfiguration discoveryGroupConfiguration = new DiscoveryGroupConfiguration();
+      UDPBroadcastEndpointFactory endpoint = new UDPBroadcastEndpointFactory();
+      endpoint.setGroupPort(3333).setGroupAddress("wahey").setLocalBindPort(555).setLocalBindAddress("uhuh");
+      discoveryGroupConfiguration.setName("foo")
+            .setRefreshTimeout(12345)
+            .setDiscoveryInitialWaitTimeout(5678)
+            .setBroadcastEndpointFactory(endpoint);
+      ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(discoveryGroupConfiguration, JMSFactoryType.CF);
+      URI tcp = parser.createSchema("udp", connectionFactoryWithHA);
+      ActiveMQConnectionFactory factory = parser.newObject(tcp);
+      DiscoveryGroupConfiguration dgc = factory.getDiscoveryGroupConfiguration();
+      Assert.assertNotNull(dgc);
+      BroadcastEndpointFactory befc = dgc.getBroadcastEndpointFactory();
+      Assert.assertNotNull(befc);
+      Assert.assertTrue(befc instanceof UDPBroadcastEndpointFactory);
+      UDPBroadcastEndpointFactory ubgc = (UDPBroadcastEndpointFactory) befc;
+      Assert.assertEquals(ubgc.getGroupAddress(), "wahey");
+      Assert.assertEquals(ubgc.getGroupPort(), 3333);
+      //these 2 are transient
+      Assert.assertEquals(ubgc.getLocalBindAddress(), null);
+      Assert.assertEquals(ubgc.getLocalBindPort(), -1);
+      Assert.assertEquals(dgc.getName(), "foo");
+      Assert.assertEquals(dgc.getDiscoveryInitialWaitTimeout(), 5678);
+      Assert.assertEquals(dgc.getRefreshTimeout(), 12345);
+
+
+      BeanUtilsBean bean = new BeanUtilsBean();
+      checkEquals(bean, connectionFactoryWithHA, factory);
    }
 
    @Test
@@ -47,14 +266,149 @@ public class ConnectionFactoryURITest
    {
       ActiveMQConnectionFactory factory = parser.newObject(new URI("udp://localhost:3030?ha=true&type=QUEUE_XA_CFInvalid"));
 
-      Assert.assertTrue(factory instanceof ConnectionFactory);
+      Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
+   }
+
+   @Test
+   public void testJGroupsFile() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("jgroups://channel-name?file=/path/to/some/file/channel-file.xml&test=33"));
+
+      Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
+      JGroupsFileBroadcastEndpointFactory broadcastEndpointFactory = (JGroupsFileBroadcastEndpointFactory) factory.getDiscoveryGroupConfiguration().getBroadcastEndpointFactory();
+      Assert.assertEquals(broadcastEndpointFactory.getFile(), "/path/to/some/file/channel-file.xml");
+      Assert.assertEquals(broadcastEndpointFactory.getChannelName(), "channel-name");
+   }
+
+   @Test
+   public void testJGroupsKeyValue() throws Exception
+   {
+      ActiveMQConnectionFactory factory = parser.newObject(new URI("jgroups://channel-name?properties=param=value;param2=value2&test=33"));
+
+      Assert.assertTrue(ActiveMQJMSConnectionFactory.class.getName().equals(factory.getClass().getName()));
+      JGroupsPropertiesBroadcastEndpointFactory broadcastEndpointFactory = (JGroupsPropertiesBroadcastEndpointFactory) factory.getDiscoveryGroupConfiguration().getBroadcastEndpointFactory();
+      Assert.assertEquals(broadcastEndpointFactory.getProperties(), "param=value;param2=value2");
+      Assert.assertEquals(broadcastEndpointFactory.getChannelName(), "channel-name");
    }
 
    @Test
-   public void testJGroups() throws Exception
+   public void testJGroupsAllProperties() throws Exception
    {
-      ActiveMQConnectionFactory factory = parser.newObject(new URI("jgroups://test.xml?test=33"));
+      StringBuilder sb = new StringBuilder();
+      sb.append("jgroups://?file=param=value;param=value&channelName=channelName&ha=true");
+      BeanUtilsBean bean = new BeanUtilsBean();
+      ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(true, (TransportConfiguration) null);
+      populate(sb, bean, factory);
+      ActiveMQConnectionFactory factory2 = parser.newObject(new URI(sb.toString()));
+      checkEquals(bean, factory, factory2);
+   }
+
+
+   @Test
+   public void testJGroupsFileURI() throws Exception
+   {
+      DiscoveryGroupConfiguration discoveryGroupConfiguration = new DiscoveryGroupConfiguration();
+      JGroupsFileBroadcastEndpointFactory endpointFactory = new JGroupsFileBroadcastEndpointFactory()
+            .setChannelName("channel-name")
+            .setFile("channel-file.xml");
+      discoveryGroupConfiguration.setName("foo")
+            .setRefreshTimeout(12345)
+            .setDiscoveryInitialWaitTimeout(5678)
+            .setBroadcastEndpointFactory(endpointFactory);
+      ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(discoveryGroupConfiguration, JMSFactoryType.CF);
+      URI tcp = parser.createSchema("jgroups", connectionFactoryWithHA);
+      ActiveMQConnectionFactory factory = parser.newObject(tcp);
+      DiscoveryGroupConfiguration dgc = factory.getDiscoveryGroupConfiguration();
+      Assert.assertNotNull(dgc);
+      BroadcastEndpointFactory befc = dgc.getBroadcastEndpointFactory();
+      Assert.assertNotNull(befc);
+      Assert.assertTrue(befc instanceof JGroupsFileBroadcastEndpointFactory);
+      Assert.assertEquals(dgc.getName(), "foo");
+      Assert.assertEquals(dgc.getDiscoveryInitialWaitTimeout(), 5678);
+      Assert.assertEquals(dgc.getRefreshTimeout(), 12345);
+      JGroupsFileBroadcastEndpointFactory fileBroadcastEndpointFactory = (JGroupsFileBroadcastEndpointFactory) befc;
+      Assert.assertEquals(fileBroadcastEndpointFactory.getFile(), "channel-file.xml");
+      Assert.assertEquals(fileBroadcastEndpointFactory.getChannelName(), "channel-name");
+
 
-//      Assert.assertTrue(factory instanceof ConnectionFactory);
+      BeanUtilsBean bean = new BeanUtilsBean();
+      checkEquals(bean, connectionFactoryWithHA, factory);
+   }
+
+   @Test
+   public void testJGroupsPropertiesURI() throws Exception
+   {
+      DiscoveryGroupConfiguration discoveryGroupConfiguration = new DiscoveryGroupConfiguration();
+      JGroupsPropertiesBroadcastEndpointFactory endpointFactory = new JGroupsPropertiesBroadcastEndpointFactory()
+            .setChannelName("channel-name")
+            .setProperties("param=val,param2-val2");
+      discoveryGroupConfiguration.setName("foo")
+            .setRefreshTimeout(12345)
+            .setDiscoveryInitialWaitTimeout(5678)
+            .setBroadcastEndpointFactory(endpointFactory);
+      ActiveMQConnectionFactory connectionFactoryWithHA = ActiveMQJMSClient.createConnectionFactoryWithHA(discoveryGroupConfiguration, JMSFactoryType.CF);
+      URI tcp = parser.createSchema("jgroups", connectionFactoryWithHA);
+      ActiveMQConnectionFactory factory = parser.newObject(tcp);
+      DiscoveryGroupConfiguration dgc = factory.getDiscoveryGroupConfiguration();
+      Assert.assertNotNull(dgc);
+      BroadcastEndpointFactory broadcastEndpointFactory = dgc.getBroadcastEndpointFactory();
+      Assert.assertNotNull(broadcastEndpointFactory);
+      Assert.assertTrue(broadcastEndpointFactory instanceof JGroupsPropertiesBroadcastEndpointFactory);
+      Assert.assertEquals(dgc.getName(), "foo");
+      Assert.assertEquals(dgc.getDiscoveryInitialWaitTimeout(), 5678);
+      Assert.assertEquals(dgc.getRefreshTimeout(), 12345);
+      JGroupsPropertiesBroadcastEndpointFactory propertiesBroadcastEndpointFactory = (JGroupsPropertiesBroadcastEndpointFactory) broadcastEndpointFactory;
+      Assert.assertEquals(propertiesBroadcastEndpointFactory.getProperties(), "param=val,param2-val2");
+      Assert.assertEquals(propertiesBroadcastEndpointFactory.getChannelName(), "channel-name");
+
+      BeanUtilsBean bean = new BeanUtilsBean();
+      checkEquals(bean, connectionFactoryWithHA, factory);
+   }
+
+   private void populate(StringBuilder sb, BeanUtilsBean bean, ActiveMQConnectionFactory factory) throws IllegalAccessException, InvocationTargetException
+   {
+      PropertyDescriptor[] descriptors = bean.getPropertyUtils().getPropertyDescriptors(factory);
+      for (PropertyDescriptor descriptor : descriptors)
+      {
+         if (descriptor.getWriteMethod() != null && descriptor.getReadMethod() != null)
+         {
+            if (descriptor.getPropertyType() == String.class)
+            {
+               String value = RandomUtil.randomString();
+               bean.setProperty(factory, descriptor.getName(), value);
+               sb.append("&").append(descriptor.getName()).append("=").append(value);
+            }
+            else if (descriptor.getPropertyType() == int.class)
+            {
+               int value = RandomUtil.randomPositiveInt();
+               bean.setProperty(factory, descriptor.getName(), value);
+               sb.append("&").append(descriptor.getName()).append("=").append(value);
+            }
+            else if (descriptor.getPropertyType() == long.class)
+            {
+               long value = RandomUtil.randomPositiveLong();
+               bean.setProperty(factory, descriptor.getName(), value);
+               sb.append("&").append(descriptor.getName()).append("=").append(value);
+            }
+            else if (descriptor.getPropertyType() == double.class)
+            {
+               double value = RandomUtil.randomDouble();
+               bean.setProperty(factory, descriptor.getName(), value);
+               sb.append("&").append(descriptor.getName()).append("=").append(value);
+            }
+         }
+      }
+   }
+
+   private void checkEquals(BeanUtilsBean bean, ActiveMQConnectionFactory factory, ActiveMQConnectionFactory factory2) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
+   {
+      PropertyDescriptor[] descriptors = bean.getPropertyUtils().getPropertyDescriptors(factory);
+      for (PropertyDescriptor descriptor : descriptors)
+      {
+         if (descriptor.getWriteMethod() != null && descriptor.getReadMethod() != null)
+         {
+            Assert.assertEquals(descriptor.getName() + " incorrect", bean.getProperty(factory, descriptor.getName()),bean.getProperty(factory2, descriptor.getName()));
+         }
+      }
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
----------------------------------------------------------------------
diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
index 1675f3f..a677218 100644
--- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
+++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
@@ -39,11 +39,12 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.activemq.api.core.ActiveMQException;
-import org.apache.activemq.api.core.BroadcastEndpointFactoryConfiguration;
+import org.apache.activemq.api.core.BroadcastEndpointFactory;
+import org.apache.activemq.api.core.ChannelBroadcastEndpointFactory;
 import org.apache.activemq.api.core.DiscoveryGroupConfiguration;
-import org.apache.activemq.api.core.JGroupsBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.JGroupsFileBroadcastEndpointFactory;
 import org.apache.activemq.api.core.TransportConfiguration;
-import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.api.core.client.ClientSession;
 import org.apache.activemq.api.core.client.ClientSessionFactory;
 import org.apache.activemq.api.core.client.ActiveMQClient;
@@ -1873,13 +1874,13 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
 
       if (discoveryAddress != null || jgroupsFileName != null || jgroupsLocatorClassName != null)
       {
-         BroadcastEndpointFactoryConfiguration endpointFactoryConfiguration = null;
+         BroadcastEndpointFactory endpointFactory = null;
 
          if (jgroupsLocatorClassName != null)
          {
             String jchannelRefName = raProperties.getJgroupsChannelRefName();
             JChannel jchannel = ActiveMQRaUtils.locateJGroupsChannel(jgroupsLocatorClassName, jchannelRefName);
-            endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jchannel, jgroupsChannel);
+            endpointFactory = new ChannelBroadcastEndpointFactory(jchannel, jgroupsChannel);
          }
          else if (discoveryAddress != null)
          {
@@ -1892,7 +1893,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
 
             String localBindAddress = overrideProperties.getDiscoveryLocalBindAddress() != null ? overrideProperties.getDiscoveryLocalBindAddress()
                : raProperties.getDiscoveryLocalBindAddress();
-            endpointFactoryConfiguration = new UDPBroadcastGroupConfiguration()
+            endpointFactory = new UDPBroadcastEndpointFactory()
                .setGroupAddress(discoveryAddress)
                .setGroupPort(discoveryPort)
                .setLocalBindAddress(localBindAddress)
@@ -1900,7 +1901,9 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
          }
          else if (jgroupsFileName != null)
          {
-            endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jgroupsFileName, jgroupsChannel);
+            endpointFactory = new JGroupsFileBroadcastEndpointFactory()
+                  .setChannelName(jgroupsChannel)
+                  .setFile(jgroupsFileName);
          }
          Long refreshTimeout = overrideProperties.getDiscoveryRefreshTimeout() != null ? overrideProperties.getDiscoveryRefreshTimeout()
             : raProperties.getDiscoveryRefreshTimeout();
@@ -1920,7 +1923,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
          DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration()
             .setRefreshTimeout(refreshTimeout)
             .setDiscoveryInitialWaitTimeout(initialTimeout)
-            .setBroadcastEndpointFactoryConfiguration(endpointFactoryConfiguration);
+            .setBroadcastEndpointFactory(endpointFactory);
 
          if (ActiveMQRALogger.LOGGER.isDebugEnabled())
          {
@@ -2008,7 +2011,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
 
       if (connectorClassName == null)
       {
-         BroadcastEndpointFactoryConfiguration endpointFactoryConfiguration = null;
+         BroadcastEndpointFactory endpointFactory = null;
          if (discoveryAddress != null)
          {
             Integer discoveryPort = overrideProperties.getDiscoveryPort() != null ? overrideProperties.getDiscoveryPort()
@@ -2020,7 +2023,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
 
             String localBindAddress = overrideProperties.getDiscoveryLocalBindAddress() != null ? overrideProperties.getDiscoveryLocalBindAddress()
                : raProperties.getDiscoveryLocalBindAddress();
-            endpointFactoryConfiguration = new UDPBroadcastGroupConfiguration()
+            endpointFactory = new UDPBroadcastEndpointFactory()
                .setGroupAddress(discoveryAddress)
                .setGroupPort(discoveryPort)
                .setLocalBindAddress(localBindAddress)
@@ -2028,7 +2031,9 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
          }
          else if (jgroupsFileName != null)
          {
-            endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jgroupsFileName, jgroupsChannel);
+            endpointFactory = new JGroupsFileBroadcastEndpointFactory()
+                  .setChannelName(jgroupsChannel)
+                  .setFile(jgroupsFileName);
          }
          else
          {
@@ -2037,9 +2042,9 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
             {
                String jgroupsChannelRefName = raProperties.getJgroupsChannelRefName();
                JChannel jchannel = ActiveMQRaUtils.locateJGroupsChannel(jgroupsLocatorClass, jgroupsChannelRefName);
-               endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jchannel, jgroupsChannel);
+               endpointFactory = new ChannelBroadcastEndpointFactory(jchannel, jgroupsChannel);
             }
-            if (endpointFactoryConfiguration == null)
+            if (endpointFactory == null)
             {
                throw new IllegalArgumentException("must provide either TransportType or DiscoveryGroupAddress and DiscoveryGroupPort for ActiveMQ ResourceAdapter Connection Factory");
             }
@@ -2061,7 +2066,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
          DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration()
             .setRefreshTimeout(refreshTimeout)
             .setDiscoveryInitialWaitTimeout(initialTimeout)
-            .setBroadcastEndpointFactoryConfiguration(endpointFactoryConfiguration);
+            .setBroadcastEndpointFactory(endpointFactory);
 
          groupConfiguration.setRefreshTimeout(refreshTimeout);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java b/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java
index c814979..1090257 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/config/Configuration.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.core.config;
 
-import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -35,7 +34,7 @@ import org.apache.activemq.core.settings.impl.AddressSettings;
  *
  * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
  */
-public interface Configuration extends Serializable
+public interface Configuration
 {
    /**
     * To be used on dependency management on the application server

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java
index 3c39a8b..9afd93d 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/config/impl/ConfigurationImpl.java
@@ -20,6 +20,7 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -51,7 +52,7 @@ import org.apache.activemq.core.settings.impl.AddressSettings;
  * @author <a href="mailto:ataylor@redhat.com>Andy Taylor</a>
  * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
  */
-public class ConfigurationImpl implements Configuration
+public class ConfigurationImpl implements Configuration, Serializable
 {
    // Constants ------------------------------------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java
index 8ebea6e..a4010fe 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/deployers/impl/FileConfigurationParser.java
@@ -27,14 +27,14 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
-import org.apache.activemq.api.core.BroadcastEndpointFactoryConfiguration;
+import org.apache.activemq.api.core.BroadcastEndpointFactory;
 import org.apache.activemq.api.core.BroadcastGroupConfiguration;
 import org.apache.activemq.api.core.DiscoveryGroupConfiguration;
-import org.apache.activemq.api.core.JGroupsBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.JGroupsFileBroadcastEndpointFactory;
 import org.apache.activemq.api.core.Pair;
 import org.apache.activemq.api.core.SimpleString;
 import org.apache.activemq.api.core.TransportConfiguration;
-import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.api.core.client.ActiveMQClient;
 import org.apache.activemq.core.config.BridgeConfiguration;
 import org.apache.activemq.core.config.ClusterConnectionConfiguration;
@@ -1268,15 +1268,17 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
 
       // TODO: validate if either jgroups or UDP is being filled
 
-      BroadcastEndpointFactoryConfiguration endpointFactoryConfiguration;
+      BroadcastEndpointFactory endpointFactory;
 
       if (jgroupsFile != null)
       {
-         endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jgroupsFile, jgroupsChannel);
+         endpointFactory = new JGroupsFileBroadcastEndpointFactory()
+               .setFile(jgroupsFile)
+               .setChannelName(jgroupsChannel);
       }
       else
       {
-         endpointFactoryConfiguration = new UDPBroadcastGroupConfiguration()
+         endpointFactory = new UDPBroadcastEndpointFactory()
             .setGroupAddress(groupAddress)
             .setGroupPort(groupPort)
             .setLocalBindAddress(localAddress)
@@ -1287,7 +1289,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
          .setName(name)
          .setBroadcastPeriod(broadcastPeriod)
          .setConnectorInfos(connectorNames)
-         .setEndpointFactoryConfiguration(endpointFactoryConfiguration);
+         .setEndpointFactory(endpointFactory);
 
       mainConfig.getBroadcastGroupConfigurations().add(config);
    }
@@ -1317,14 +1319,16 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
       String jgroupsChannel = getString(e, "jgroups-channel", null, Validators.NO_CHECK);
 
       // TODO: validate if either jgroups or UDP is being filled
-      BroadcastEndpointFactoryConfiguration endpointFactoryConfiguration;
+      BroadcastEndpointFactory endpointFactory;
       if (jgroupsFile != null)
       {
-         endpointFactoryConfiguration = new JGroupsBroadcastGroupConfiguration(jgroupsFile, jgroupsChannel);
+         endpointFactory = new JGroupsFileBroadcastEndpointFactory()
+               .setFile(jgroupsFile)
+               .setChannelName(jgroupsChannel);
       }
       else
       {
-         endpointFactoryConfiguration = new UDPBroadcastGroupConfiguration()
+         endpointFactory = new UDPBroadcastEndpointFactory()
             .setGroupAddress(groupAddress)
             .setGroupPort(groupPort)
             .setLocalBindAddress(localBindAddress)
@@ -1335,7 +1339,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
          .setName(name)
          .setRefreshTimeout(refreshTimeout)
          .setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout)
-         .setBroadcastEndpointFactoryConfiguration(endpointFactoryConfiguration);
+         .setBroadcastEndpointFactory(endpointFactory);
 
       if (mainConfig.getDiscoveryGroupConfigurations().containsKey(name))
       {

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/management/impl/BroadcastGroupControlImpl.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/management/impl/BroadcastGroupControlImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/management/impl/BroadcastGroupControlImpl.java
index 506dd8f..f20fb21 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/management/impl/BroadcastGroupControlImpl.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/management/impl/BroadcastGroupControlImpl.java
@@ -19,7 +19,7 @@ package org.apache.activemq.core.management.impl;
 import javax.management.MBeanOperationInfo;
 
 import org.apache.activemq.api.core.BroadcastGroupConfiguration;
-import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.api.core.management.BroadcastGroupControl;
 import org.apache.activemq.core.persistence.StorageManager;
 import org.apache.activemq.core.server.cluster.BroadcastGroup;
@@ -130,9 +130,9 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc
       clearIO();
       try
       {
-         if (configuration.getEndpointFactoryConfiguration() instanceof UDPBroadcastGroupConfiguration)
+         if (configuration.getEndpointFactory() instanceof UDPBroadcastEndpointFactory)
          {
-            return ((UDPBroadcastGroupConfiguration)configuration.getEndpointFactoryConfiguration()).getGroupAddress();
+            return ((UDPBroadcastEndpointFactory)configuration.getEndpointFactory()).getGroupAddress();
          }
          throw new Exception("Invalid request because this is not a UDP Broadcast configuration.");
       }
@@ -147,9 +147,9 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc
       clearIO();
       try
       {
-         if (configuration.getEndpointFactoryConfiguration() instanceof UDPBroadcastGroupConfiguration)
+         if (configuration.getEndpointFactory() instanceof UDPBroadcastEndpointFactory)
          {
-            return ((UDPBroadcastGroupConfiguration)configuration.getEndpointFactoryConfiguration()).getGroupPort();
+            return ((UDPBroadcastEndpointFactory)configuration.getEndpointFactory()).getGroupPort();
          }
          throw new Exception("Invalid request because this is not a UDP Broadcast configuration.");
       }
@@ -164,9 +164,9 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc
       clearIO();
       try
       {
-         if (configuration.getEndpointFactoryConfiguration() instanceof UDPBroadcastGroupConfiguration)
+         if (configuration.getEndpointFactory() instanceof UDPBroadcastEndpointFactory)
          {
-            return ((UDPBroadcastGroupConfiguration)configuration.getEndpointFactoryConfiguration()).getLocalBindPort();
+            return ((UDPBroadcastEndpointFactory)configuration.getEndpointFactory()).getLocalBindPort();
          }
          throw new Exception("Invalid request because this is not a UDP Broadcast configuration.");
       }

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptorFactory.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptorFactory.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptorFactory.java
index df30e00..1495571 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptorFactory.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMAcceptorFactory.java
@@ -17,7 +17,6 @@
 package org.apache.activemq.core.remoting.impl.invm;
 
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnectorFactory.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnectorFactory.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnectorFactory.java
index 5de4161..e800bd1 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnectorFactory.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/InVMConnectorFactory.java
@@ -17,7 +17,6 @@
 package org.apache.activemq.core.remoting.impl.invm;
 
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java
index 9987383..45b75d4 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/invm/TransportConstants.java
@@ -16,11 +16,6 @@
  */
 package org.apache.activemq.core.remoting.impl.invm;
 
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
 
 /**
  * A TransportConstants

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptorFactory.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptorFactory.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptorFactory.java
index 1bb545b..674200c 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptorFactory.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptorFactory.java
@@ -17,7 +17,6 @@
 package org.apache.activemq.core.remoting.impl.netty;
 
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
index 9cb009a..6baf3de 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
@@ -242,21 +242,6 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
 
             AcceptorFactory factory = (AcceptorFactory) clazz.newInstance();
 
-            // Check valid properties
-
-            if (info.getParams() != null)
-            {
-               Set<String> invalid = ConfigurationHelper.checkKeys(factory.getAllowableProperties(), info.getParams()
-                  .keySet());
-
-               if (!invalid.isEmpty())
-               {
-                  ActiveMQServerLogger.LOGGER.invalidAcceptorKeys(ConfigurationHelper.stringSetToCommaListString(invalid));
-
-                  continue;
-               }
-            }
-
             Map<String, ProtocolManager> supportedProtocols = new ConcurrentHashMap();
 
             String protocol = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOL_PROP_NAME, null,

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java
index 7d09fdd..5c5362e 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/server/cluster/ClusterManager.java
@@ -856,7 +856,7 @@ public final class ClusterManager implements ActiveMQComponent
       if (group == null)
       {
          group = new BroadcastGroupImpl(nodeManager, config.getName(),
-                                        config.getBroadcastPeriod(), scheduledExecutor, config.getEndpointFactoryConfiguration().createBroadcastEndpointFactory());
+                                        config.getBroadcastPeriod(), scheduledExecutor, config.getEndpointFactory());
 
          for (String connectorInfo : config.getConnectorInfos())
          {

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/AcceptorFactory.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/AcceptorFactory.java b/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/AcceptorFactory.java
index 02dbb35..2d92323 100644
--- a/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/AcceptorFactory.java
+++ b/activemq-server/src/main/java/org/apache/activemq/spi/core/remoting/AcceptorFactory.java
@@ -17,7 +17,6 @@
 package org.apache.activemq.spi.core.remoting;
 
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationTest.java b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationTest.java
index 182cd7f..c7fc2c4 100644
--- a/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationTest.java
+++ b/activemq-server/src/test/java/org/apache/activemq/core/config/impl/FileConfigurationTest.java
@@ -22,7 +22,7 @@ import org.apache.activemq.api.core.BroadcastGroupConfiguration;
 import org.apache.activemq.api.core.DiscoveryGroupConfiguration;
 import org.apache.activemq.api.core.SimpleString;
 import org.apache.activemq.api.core.TransportConfiguration;
-import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.UDPBroadcastEndpointFactory;
 import org.apache.activemq.core.config.BridgeConfiguration;
 import org.apache.activemq.core.config.ClusterConnectionConfiguration;
 import org.apache.activemq.core.config.Configuration;
@@ -141,7 +141,7 @@ public class FileConfigurationTest extends ConfigurationImplTest
       Assert.assertEquals(2, conf.getBroadcastGroupConfigurations().size());
       for (BroadcastGroupConfiguration bc : conf.getBroadcastGroupConfigurations())
       {
-         UDPBroadcastGroupConfiguration udpBc = (UDPBroadcastGroupConfiguration) bc.getEndpointFactoryConfiguration();
+         UDPBroadcastEndpointFactory udpBc = (UDPBroadcastEndpointFactory) bc.getEndpointFactory();
          if (bc.getName().equals("bg1"))
          {
             Assert.assertEquals("bg1", bc.getName());
@@ -165,16 +165,16 @@ public class FileConfigurationTest extends ConfigurationImplTest
       Assert.assertEquals(2, conf.getDiscoveryGroupConfigurations().size());
       DiscoveryGroupConfiguration dc = conf.getDiscoveryGroupConfigurations().get("dg1");
       Assert.assertEquals("dg1", dc.getName());
-      Assert.assertEquals("192.168.0.120", ((UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration()).getGroupAddress());
-      assertEquals("172.16.8.10", ((UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration()).getLocalBindAddress());
-      Assert.assertEquals(11999, ((UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration()).getGroupPort());
+      Assert.assertEquals("192.168.0.120", ((UDPBroadcastEndpointFactory) dc.getBroadcastEndpointFactory()).getGroupAddress());
+      assertEquals("172.16.8.10", ((UDPBroadcastEndpointFactory) dc.getBroadcastEndpointFactory()).getLocalBindAddress());
+      Assert.assertEquals(11999, ((UDPBroadcastEndpointFactory) dc.getBroadcastEndpointFactory()).getGroupPort());
       Assert.assertEquals(12345, dc.getRefreshTimeout());
 
       dc = conf.getDiscoveryGroupConfigurations().get("dg2");
       Assert.assertEquals("dg2", dc.getName());
-      Assert.assertEquals("192.168.0.121", ((UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration()).getGroupAddress());
-      assertEquals("172.16.8.11", ((UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration()).getLocalBindAddress());
-      Assert.assertEquals(12999, ((UDPBroadcastGroupConfiguration) dc.getBroadcastEndpointFactoryConfiguration()).getGroupPort());
+      Assert.assertEquals("192.168.0.121", ((UDPBroadcastEndpointFactory) dc.getBroadcastEndpointFactory()).getGroupAddress());
+      assertEquals("172.16.8.11", ((UDPBroadcastEndpointFactory) dc.getBroadcastEndpointFactory()).getLocalBindAddress());
+      Assert.assertEquals(12999, ((UDPBroadcastEndpointFactory) dc.getBroadcastEndpointFactory()).getGroupPort());
       Assert.assertEquals(23456, dc.getRefreshTimeout());
 
       Assert.assertEquals(2, conf.getDivertConfigurations().size());

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/docs/user-manual/en/using-jms.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/using-jms.md b/docs/user-manual/en/using-jms.md
index 0fe7595..81aac79 100644
--- a/docs/user-manual/en/using-jms.md
+++ b/docs/user-manual/en/using-jms.md
@@ -64,38 +64,27 @@ A JMS connection factory is used by the client to make connections to
 the server. It knows the location of the server it is connecting to, as
 well as many other configuration parameters.
 
-By default, a `javax.naming.Context` instance created using the
-`org.apache.activemq.jndi.ActiveMQInitialContextFactory` will
-automatically have the following connection factories available for
-lookup:
-
--   `ConnectionFactory`
-
--   `XAConnectionFactory`
-
--   `QueueConnectionFactory`
-
--   `TopicConnectionFactory`
-
 Here's a simple example of the JNDI context environment for a client
 looking up a connection factory to access an *embedded* instance of
 ActiveMQ:
 
     java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+    connectionFactory.invmConnectionFactory=vm://0
 
-It's really as simple as that. As noted previously, any JNDI context
-created with the `ActiveMQInitialContextFactory` will have a set of
-default connection factories available. Therefore, only the
-`java.naming.factory.initial` property is required to access an embedded
-broker.
+In this instance we have created a connection factory that is bound to
+`invmConnectionFactory`, any entry with prefix `connectionFactory.` will
+  create a connection factory.
 
 In certain situations there could be multiple server instances running
 within a particular JVM. In that situation each server would typically
 have an InVM acceptor with a unique server-ID. A client using JMS and
-JNDI can account for this by specifying a
-`javax.naming.Context.PROVIDER_URL` (`String` value of
-"java.naming.provider.url") in the JNDI environment like `vm://2` where
-`2` is the server-ID for acceptor.
+JNDI can account for this by specifying a connction factory for each
+server, like so:
+
+    java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+    connectionFactory.invmConnectionFactory0=vm://0
+    connectionFactory.invmConnectionFactory1=vm://1
+    connectionFactory.invmConnectionFactory2=vm://2
 
 Here is a list of all the supported URL schemes:
 
@@ -108,19 +97,17 @@ Here is a list of all the supported URL schemes:
 -   `jgroups`
 
 Most clients won't be connecting to an embedded broker. Clients will
-most commonly connect across a network a remote broker. In that case the
-client can use the `javax.naming.Context.PROVIDER_URL` (`String` value
-of "java.naming.provider.url") in the JNDI environment to specify where
-to connect. Here's a simple example of a client configuring a connection
-factory to connect to a remote broker running on myhost:5445:
+most commonly connect across a network a remote broker. Here's a simple
+example of a client configuring a connection factory to connect to a
+remote broker running on myhost:5445:
 
     java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-    java.naming.provider.url=tcp://myhost:5445
+    connectionFactory.ConnectionFactory=tcp://myhost:5445
 
 In the example above the client is using the `tcp` scheme for the
 provider URL. A client may also specify multiple comma-delimited
 host:port combinations in the URL (e.g.
-`tcp://remote-host1:5445,remote-host2:5445`). Whether there is one or
+`(tcp://remote-host1:5445,remote-host2:5445)`). Whether there is one or
 many host:port combinations in the URL they are treated as the *initial
 connector(s)* for the underlying connection.
 
@@ -132,13 +119,24 @@ Each scheme has a specific set of properties which can be set using the
 traditional URL query string format (e.g.
 `scheme://host:port?key1=value1&key2=value2`) to customize the
 underlying transport mechanism. For example, if a client wanted to
-connect to a remote server using TCP and SSL it would use a
-`Context.PROVIDER_URL` of `tcp://remote-host:5445?ssl-enabled=true`.
+connect to a remote server using TCP and SSL it would create a connection
+factory like so, `tcp://remote-host:5445?ssl-enabled=true`.
 
 All the properties available for the `tcp` scheme are described in [the
 documentation regarding the Netty
 transport](#configuring-transports.netty).
 
+Note if you are using the `tcp` scheme and multiple addresses then a query
+can be applied to all the url's or just to an individual connector, so where
+you have
+
+-   `(tcp://remote-host1:5445?httpEnabled=true,remote-host2:5445?httpEnabled=true)?clientID=1234`
+
+then the `httpEnabled` property is only set on the individual connectors where as the `clientId`
+is set on the actual connection factory. Any connector specific properties set on the whole
+URI will be applied to all the connectors.
+
+
 The `udp` scheme supports 4 properties:
 
 -   `local-address` - If you are running with multiple network
@@ -169,48 +167,23 @@ The `udp` scheme supports 4 properties:
     value for this parameter is 10000 milliseconds.
 
 Lastly, the `jgroups` scheme is supported which provides an alternative
-to the `udp` scheme for server discovery. The URL pattern is as follows
-`jgroups://<jgroups-xml-conf-filename>` where
-`<jgroups-xml-conf-filename>` refers to an XML file on the classpath
-that contains the JGroups configuration.
+to the `udp` scheme for server discovery. The URL pattern is either
+`jgroups://channelName?file=jgroups-xml-conf-filename`
+where`jgroups-xml-conf-filename` refers to an XML file on the classpath
+that contains the JGroups configuration or it can be
+`jgroups://channelName?properties=some-jgroups-properties`. In both instance the
+`channelName` is the name given to the jgroups channel created.
 
 The `refresh-timeout` and `discovery-initial-wait-timeout` properties
 are supported just like with `udp`.
 
-Although a `javax.naming.Context` instance created using the
-`org.apache.activemq.jndi.ActiveMQInitialContextFactory` will
-automatically have some connection factories present, it is possible for
-a client to specify its own connection factories. This is done using the
-`org.apache.activemq.jndi.ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES`
-property (String value of "connectionFactoryNames"). The value for this
-property is a comma delimited String of all the connection factories the
-client wishes to create. For example:
+The default type for the default connection factory is of type `javax.jms.ConnectionFactory`.
+This can be changed by setting the type like so
 
     java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-    java.naming.provider.url=tcp://localhost:5445
-    connectionFactoryNames=myConnectionFactory
-
-In this example, the client is creating a connection factory named
-"myConnectionFactory." This replaces all the default connection
-factories so that only the "myConnectionFactory" connection factory is
-available to the client.
-
-Aside from the underlying transport, the underlying connection factory
-implementation can also be configured using special properties. To
-configure a particular connection factory the client would follow this
-pattern for the property name to set in the environment:
-`connection.<connection-factory-name>.<property-name>`. For example, if
-the client wanted to customize the default connection factory
-"ConnectionFactory" to support high-availability then it would do this:
-
-    java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-    java.naming.provider.url=tcp://myhost:5445
-    connection.ConnectionFactory.ha=true
+    java.naming.provider.url=tcp://localhost:5445?type=CF
 
-Any property available on the underlying
-`org.apache.activemq.jms.client.ActiveMQConnectionFactory` can be set
-this way in addition to the `ha` (boolean) and `type` (String)
-properties. Here are the different options for the `type`:
+In this example it is still set to the default, below shows a list of types that can be set.
 
 #### Configuration for Connection Factory Types
 <table>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/aerogear/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/aerogear/src/main/resources/jndi.properties b/examples/jms/aerogear/src/main/resources/jndi.properties
index 6364ce4..85eda3d 100644
--- a/examples/jms/aerogear/src/main/resources/jndi.properties
+++ b/examples/jms/aerogear/src/main/resources/jndi.properties
@@ -16,5 +16,5 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
+connectionFactory.ConnectionFactory=tcp://localhost:5445
 queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
index 0c6e023..98373ac 100644
--- a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
+++ b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
@@ -154,7 +154,7 @@ public class ApplicationLayerFailoverExample extends ActiveMQExample
       // Step 1. Get an initial context for looking up JNDI from the server
       Hashtable<String, Object> properties = new Hashtable<String, Object>();
       properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-      properties.put("java.naming.provider.url", "tcp://127.0.0.1:" + (5445 + server));
+      properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:" + (5445 + server));
       properties.put("queue.queue/exampleQueue", "exampleQueue");
       initialContext = new InitialContext(properties);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java b/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
index 4f235b3..502a3e8 100644
--- a/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
+++ b/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
@@ -59,7 +59,7 @@ public class BridgeExample extends ActiveMQExample
 
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", "tcp://127.0.0.1:5445");
+         properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:5445");
          properties.put("queue.queue/sausage-factory", "sausage-factory");
          ic0 = new InitialContext(properties);
 
@@ -75,7 +75,7 @@ public class BridgeExample extends ActiveMQExample
 
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", "tcp://127.0.0.1:5446");
+         properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:5446");
          properties.put("queue.queue/mincing-machine", "mincing-machine");
          ic1 = new InitialContext(properties);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/browser/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/browser/src/main/resources/jndi.properties b/examples/jms/browser/src/main/resources/jndi.properties
index 6364ce4..85eda3d 100644
--- a/examples/jms/browser/src/main/resources/jndi.properties
+++ b/examples/jms/browser/src/main/resources/jndi.properties
@@ -16,5 +16,5 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
+connectionFactory.ConnectionFactory=tcp://localhost:5445
 queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/client-kickoff/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/client-kickoff/src/main/resources/jndi.properties b/examples/jms/client-kickoff/src/main/resources/jndi.properties
index 142c406..26a519c 100644
--- a/examples/jms/client-kickoff/src/main/resources/jndi.properties
+++ b/examples/jms/client-kickoff/src/main/resources/jndi.properties
@@ -16,4 +16,4 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
+connectionFactory.ConnectionFactory=tcp://localhost:5445

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/client-side-failoverlistener/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-failoverlistener/src/main/resources/jndi.properties b/examples/jms/client-side-failoverlistener/src/main/resources/jndi.properties
index 6feb57f..8f3fcff 100644
--- a/examples/jms/client-side-failoverlistener/src/main/resources/jndi.properties
+++ b/examples/jms/client-side-failoverlistener/src/main/resources/jndi.properties
@@ -16,9 +16,5 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
+connectionFactory.ConnectionFactory=tcp://localhost:5445?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1
 queue.queue/exampleQueue=exampleQueue
-connection.ConnectionFactory.ha=true
-connection.ConnectionFactory.retryInterval=1000
-connection.ConnectionFactory.retryIntervalMultiplier=1.0
-connection.ConnectionFactory.reconnectAttempts=-1

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/client-side-load-balancing/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-load-balancing/src/main/resources/jndi.properties b/examples/jms/client-side-load-balancing/src/main/resources/jndi.properties
index e1bd346..81cf898 100644
--- a/examples/jms/client-side-load-balancing/src/main/resources/jndi.properties
+++ b/examples/jms/client-side-load-balancing/src/main/resources/jndi.properties
@@ -16,5 +16,5 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=udp://231.7.7.7:9876
+connectionFactory.ConnectionFactory=udp://231.7.7.7:9876
 queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java b/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
index 4b39f6c..4e4afc0 100644
--- a/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
+++ b/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
@@ -60,7 +60,7 @@ public class ClusteredDurableSubscriptionExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI from server 0
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("topic.topic/exampleTopic", "exampleTopic");
          ic0 = new InitialContext(properties);
 
@@ -74,7 +74,7 @@ public class ClusteredDurableSubscriptionExample extends ActiveMQExample
 
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          ic1 = new InitialContext(properties);
 
          // Step 5. Look-up a JMS Connection Factory object from JNDI on server 1

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java b/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
index e5ead04..869f5ed 100644
--- a/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
+++ b/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
@@ -62,7 +62,7 @@ public class ClusteredGroupingExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI from server 0
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          ic0 = new InitialContext(properties);
 
@@ -75,7 +75,7 @@ public class ClusteredGroupingExample extends ActiveMQExample
          // Step 4. Get an initial context for looking up JNDI from server 1
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          ic1 = new InitialContext(properties);
 
          // Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
@@ -84,7 +84,7 @@ public class ClusteredGroupingExample extends ActiveMQExample
          // Step 4. Get an initial context for looking up JNDI from server 2
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[2]);
+         properties.put("connectionFactory.ConnectionFactory", args[2]);
          ic2 = new InitialContext(properties);
 
          // Step 5. Look-up a JMS Connection Factory object from JNDI on server 2

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java b/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
index 87e38d7..bdf6699 100644
--- a/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
+++ b/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
@@ -58,7 +58,7 @@ public class ClusteredJgroupsExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI from server 0
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          ic0 = new InitialContext(properties);
 
@@ -71,7 +71,7 @@ public class ClusteredJgroupsExample extends ActiveMQExample
          // Step 4. Get an initial context for looking up JNDI from server 1
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          ic1 = new InitialContext(properties);
 
          // Step 5. Look-up a JMS Connection Factory object from JNDI on server 1

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-jgroups/src/main/resources/activemq/server0/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/src/main/resources/activemq/server0/client-jndi.properties b/examples/jms/clustered-jgroups/src/main/resources/activemq/server0/client-jndi.properties
index 142c406..26a519c 100644
--- a/examples/jms/clustered-jgroups/src/main/resources/activemq/server0/client-jndi.properties
+++ b/examples/jms/clustered-jgroups/src/main/resources/activemq/server0/client-jndi.properties
@@ -16,4 +16,4 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
+connectionFactory.ConnectionFactory=tcp://localhost:5445

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java b/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
index 2da1881..bdc8be3 100644
--- a/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
+++ b/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
@@ -58,7 +58,7 @@ public class ClusteredQueueExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI from server 0
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          ic0 = new InitialContext(properties);
 
@@ -71,7 +71,7 @@ public class ClusteredQueueExample extends ActiveMQExample
          // Step 4. Get an initial context for looking up JNDI from server 1
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          ic1 = new InitialContext(properties);
 
          // Step 5. Look-up a JMS Connection Factory object from JNDI on server 1

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java b/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
index e516469..60dc7d3 100644
--- a/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
+++ b/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
@@ -56,18 +56,18 @@ public class ClusteredStandaloneExample extends ActiveMQExample
       {
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("topic.topic/exampleTopic", "exampleTopic");
          initialContext0 = new InitialContext(properties);
 
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          initialContext1 = new InitialContext(properties);
 
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[2]);
+         properties.put("connectionFactory.ConnectionFactory", args[2]);
          initialContext2 = new InitialContext(properties);
 
          // First we demonstrate a distributed topic.

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java b/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
index f724c92..e587536 100644
--- a/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
+++ b/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
@@ -62,7 +62,7 @@ public class StaticClusteredQueueExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI from server 3
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[3]);
+         properties.put("connectionFactory.ConnectionFactory", args[3]);
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          ic0 = new InitialContext(properties);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java b/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
index c88d2e4..0ddefeb 100644
--- a/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
+++ b/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
@@ -60,7 +60,7 @@ public class ClusterStaticOnewayExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI from server 0
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          ic0 = new InitialContext(properties);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java b/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
index ca98789..61e3d65 100644
--- a/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
+++ b/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
@@ -58,7 +58,7 @@ public class ClusteredTopicExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI from server 0
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("topic.topic/exampleTopic", "exampleTopic");
          ic0 = new InitialContext(properties);
 
@@ -71,7 +71,7 @@ public class ClusteredTopicExample extends ActiveMQExample
          // Step 4. Get an initial context for looking up JNDI from server 1
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          ic1 = new InitialContext(properties);
 
          // Step 5. Look-up a JMS Connection Factory object from JNDI on server 1

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java b/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
index f5e5a29..bc23589 100644
--- a/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
+++ b/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
@@ -58,17 +58,13 @@ public class ColocatedFailoverScaleDownExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI for both servers
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          initialContext1 = new InitialContext(properties);
 
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0] + "?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          properties.put("queue.queue/exampleQueue", "exampleQueue");
-         properties.put("connection.ConnectionFactory.ha", true);
-         properties.put("connection.ConnectionFactory.retryInterval", 1000);
-         properties.put("connection.ConnectionFactory.retryIntervalMultiplier", 1.0);
-         properties.put("connection.ConnectionFactory.reconnectAttempts", -1);
          initialContext = new InitialContext(properties);
 
          // Step 2. Look up the JMS resources from JNDI

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
index 1e912e0..4c6a9a9 100644
--- a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
+++ b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
@@ -56,17 +56,13 @@ public class ColocatedFailoverExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI for both servers
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          initialContext1 = new InitialContext(properties);
 
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0] + "?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          properties.put("queue.queue/exampleQueue", "exampleQueue");
-         properties.put("connection.ConnectionFactory.ha", true);
-         properties.put("connection.ConnectionFactory.retryInterval", 1000);
-         properties.put("connection.ConnectionFactory.retryIntervalMultiplier", 1.0);
-         properties.put("connection.ConnectionFactory.reconnectAttempts", -1);
          initialContext = new InitialContext(properties);
 
          // Step 2. Look up the JMS resources from JNDI

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/consumer-rate-limit/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/consumer-rate-limit/src/main/resources/jndi.properties b/examples/jms/consumer-rate-limit/src/main/resources/jndi.properties
index e0f10fc..9692146 100644
--- a/examples/jms/consumer-rate-limit/src/main/resources/jndi.properties
+++ b/examples/jms/consumer-rate-limit/src/main/resources/jndi.properties
@@ -16,6 +16,5 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
-connection.ConnectionFactory.consumerMaxRate=10
+connectionFactory.ConnectionFactory=tcp://localhost:5445?consumerMaxRate=10
 queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/dead-letter/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/dead-letter/src/main/resources/jndi.properties b/examples/jms/dead-letter/src/main/resources/jndi.properties
index cb6ac0e..d9700fd 100644
--- a/examples/jms/dead-letter/src/main/resources/jndi.properties
+++ b/examples/jms/dead-letter/src/main/resources/jndi.properties
@@ -16,6 +16,6 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
+connectionFactory.ConnectionFactory=tcp://localhost:5445
 queue.queue/exampleQueue=exampleQueue
 queue.queue/deadLetterQueue=deadLetterQueue

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/delayed-redelivery/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/delayed-redelivery/src/main/resources/jndi.properties b/examples/jms/delayed-redelivery/src/main/resources/jndi.properties
index 6364ce4..85eda3d 100644
--- a/examples/jms/delayed-redelivery/src/main/resources/jndi.properties
+++ b/examples/jms/delayed-redelivery/src/main/resources/jndi.properties
@@ -16,5 +16,5 @@
 # under the License.
 
 java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-java.naming.provider.url=tcp://localhost:5445
+connectionFactory.ConnectionFactory=tcp://localhost:5445
 queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/3b76ccc9/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
index 57e4327..4f197ce 100644
--- a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
+++ b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
@@ -61,7 +61,7 @@ public class DivertExample extends ActiveMQExample
          // Step 1. Create an initial context to perform the JNDI lookup on the London server
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connectionFactory.ConnectionFactory", args[0]);
          properties.put("queue.queue/orders", "orders");
          properties.put("topic.topic/priceUpdates", "priceUpdates");
          properties.put("topic.topic/spyTopic", "spyTopic");
@@ -80,7 +80,7 @@ public class DivertExample extends ActiveMQExample
          // Step 6. Create an initial context to perform the JNDI lookup on the New York server
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connectionFactory.ConnectionFactory", args[1]);
          properties.put("topic.topic/newYorkPriceUpdates", "newYorkPriceUpdates");
          initialContextNewYork = new InitialContext(properties);
 


Mime
View raw message