activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [25/37] activemq-6 git commit: ACTIVEMQ6-51 Example server bootstrapping
Date Wed, 10 Dec 2014 16:11:51 GMT
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index 2094f57..0000000
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<configuration xmlns="urn:activemq"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
-
-   <ha-policy>
-      <shared-store>
-         <slave/>
-      </shared-store>
-   </ha-policy>
-
-    <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </acceptor>
-   </acceptors>
-
-    <broadcast-groups>
-		<broadcast-group name="bg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<broadcast-period>1000</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-		</broadcast-group>
-	</broadcast-groups>
-
-	<discovery-groups>
-		<discovery-group name="dg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<refresh-timeout>60000</refresh-timeout>
-		</discovery-group>
-	</discovery-groups>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-			<discovery-group-ref discovery-group-name="dg-group1"/>
-		</cluster-connection>
-	</cluster-connections>
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-configuration.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-configuration.xml
deleted file mode 100644
index c1d1e84..0000000
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-configuration.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<configuration xmlns="urn:activemq"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
-
-   <ha-policy>
-      <shared-store>
-         <slave/>
-      </shared-store>
-   </ha-policy>
-    
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5447"/>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5447"/>
-      </acceptor>
-   </acceptors>
-
-    <broadcast-groups>
-		<broadcast-group name="bg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<broadcast-period>1000</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-		</broadcast-group>
-	</broadcast-groups>
-
-	<discovery-groups>
-		<discovery-group name="dg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<refresh-timeout>60000</refresh-timeout>
-		</discovery-group>
-	</discovery-groups>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-			<discovery-group-ref discovery-group-name="dg-group1"/>
-		</cluster-connection>
-	</cluster-connections>
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-   
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-users.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover-failback/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/jndi.properties b/examples/jms/multiple-failover-failback/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/multiple-failover-failback/src/main/resources/jndi.properties
@@ -0,0 +1,7 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.ha=true
+connection.ConnectionFactory.retryInterval=1000
+connection.ConnectionFactory.retryIntervalMultiplier=1.0
+connection.ConnectionFactory.reconnectAttempts=-1
+queue.queue/exampleQueue=exampleQueue
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/pom.xml b/examples/jms/multiple-failover/pom.xml
index 844f22c..dd5057e 100644
--- a/examples/jms/multiple-failover/pom.xml
+++ b/examples/jms/multiple-failover/pom.xml
@@ -36,7 +36,7 @@
                      <goal>start</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                      <systemProperties>
                         <property>
                            <name>build.directory</name>
@@ -55,9 +55,7 @@
                      <goal>start</goal>
                   </goals>
                   <configuration>
-                     <jndiPort>1199</jndiPort>
-                     <jndiRmiPort>1198</jndiRmiPort>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server1</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
                      <fork>true</fork>
                      <systemProperties>
                         <property>
@@ -77,9 +75,7 @@
                      <goal>start</goal>
                   </goals>
                   <configuration>
-                     <jndiPort>1299</jndiPort>
-                     <jndiRmiPort>1298</jndiRmiPort>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server2</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server2</configurationDir>
                      <fork>true</fork>
                      <systemProperties>
                         <property>
@@ -100,11 +96,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.MultipleFailoverExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                        <param>tcp://localhost:5446</param>
-                        <param>tcp://localhost:5447</param>
-                     </args>
                      <systemProperties>
                         <property>
                            <name>exampleConfigDir</name>
@@ -119,7 +110,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
                </execution>
                <execution>
@@ -128,7 +119,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server1</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
                   </configuration>
                </execution>
                <execution>
@@ -137,7 +128,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server2</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server2</configurationDir>
                   </configuration>
                </execution>
             </executions>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
index 8f430a3..768868f 100644
--- a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
+++ b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
@@ -52,7 +52,7 @@ public class MultipleFailoverExample extends ActiveMQExample
       try
       {
          // Step 1. Get an initial context for looking up JNDI from the server #1
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 2. Look up the JMS resources from JNDI
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
@@ -158,5 +158,4 @@ public class MultipleFailoverExample extends ActiveMQExample
          }
       }
    }
-
 }

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..5dce0cd
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,73 @@
+<configuration xmlns="urn:activemq"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
+
+   <ha-policy>
+      <shared-store>
+         <master/>
+      </shared-store>
+   </ha-policy>
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5445"/>
+      </connector>
+   </connectors>      
+
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="5445"/>
+      </acceptor>
+   </acceptors>
+
+	<broadcast-groups>
+		<broadcast-group name="bg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<broadcast-period>1000</broadcast-period>
+         <connector-ref>netty-connector</connector-ref>
+		</broadcast-group>
+	</broadcast-groups>
+
+	<discovery-groups>
+		<discovery-group name="dg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<refresh-timeout>60000</refresh-timeout>
+		</discovery-group>
+	</discovery-groups>
+
+	<cluster-connections>
+		<cluster-connection name="my-cluster">
+			<address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+			<discovery-group-ref discovery-group-name="dg-group1"/>
+		</cluster-connection>
+	</cluster-connections>
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-jms.xml
@@ -0,0 +1,8 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server0/activemq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-configuration.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-configuration.xml
new file mode 100644
index 0000000..c930120
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-configuration.xml
@@ -0,0 +1,71 @@
+<configuration xmlns="urn:activemq"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
+
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5446"/>
+      </connector>
+   </connectors>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="5446"/>
+      </acceptor>
+   </acceptors>
+
+   <broadcast-groups>
+		<broadcast-group name="bg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<broadcast-period>1000</broadcast-period>
+         <connector-ref>netty-connector</connector-ref>
+		</broadcast-group>
+	</broadcast-groups>
+
+	<discovery-groups>
+		<discovery-group name="dg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<refresh-timeout>60000</refresh-timeout>
+		</discovery-group>
+	</discovery-groups>
+
+	<cluster-connections>
+		<cluster-connection name="my-cluster">
+			<address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+			<discovery-group-ref discovery-group-name="dg-group1"/>
+		</cluster-connection>
+	</cluster-connections>
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-jms.xml
@@ -0,0 +1,8 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-users.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server1/activemq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-configuration.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-configuration.xml
new file mode 100644
index 0000000..27bbe99
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-configuration.xml
@@ -0,0 +1,71 @@
+<configuration xmlns="urn:activemq"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
+
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5447"/>
+      </connector>
+   </connectors>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="5447"/>
+      </acceptor>
+   </acceptors>
+
+   <broadcast-groups>
+		<broadcast-group name="bg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<broadcast-period>1000</broadcast-period>
+         <connector-ref>netty-connector</connector-ref>
+		</broadcast-group>
+	</broadcast-groups>
+
+	<discovery-groups>
+		<discovery-group name="dg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<refresh-timeout>60000</refresh-timeout>
+		</discovery-group>
+	</discovery-groups>
+
+	<cluster-connections>
+		<cluster-connection name="my-cluster">
+			<address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+			<discovery-group-ref discovery-group-name="dg-group1"/>
+		</cluster-connection>
+	</cluster-connections>
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-jms.xml
@@ -0,0 +1,8 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-users.xml b/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/activemq/server2/activemq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 5dce0cd..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<configuration xmlns="urn:activemq"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
-
-   <ha-policy>
-      <shared-store>
-         <master/>
-      </shared-store>
-   </ha-policy>
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </connector>
-   </connectors>      
-
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </acceptor>
-   </acceptors>
-
-	<broadcast-groups>
-		<broadcast-group name="bg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<broadcast-period>1000</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-		</broadcast-group>
-	</broadcast-groups>
-
-	<discovery-groups>
-		<discovery-group name="dg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<refresh-timeout>60000</refresh-timeout>
-		</discovery-group>
-	</discovery-groups>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-			<discovery-group-ref discovery-group-name="dg-group1"/>
-		</cluster-connection>
-	</cluster-connections>
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index c930120..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<configuration xmlns="urn:activemq"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
-
-   <ha-policy>
-      <shared-store>
-         <slave/>
-      </shared-store>
-   </ha-policy>
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </acceptor>
-   </acceptors>
-
-   <broadcast-groups>
-		<broadcast-group name="bg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<broadcast-period>1000</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-		</broadcast-group>
-	</broadcast-groups>
-
-	<discovery-groups>
-		<discovery-group name="dg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<refresh-timeout>60000</refresh-timeout>
-		</discovery-group>
-	</discovery-groups>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-			<discovery-group-ref discovery-group-name="dg-group1"/>
-		</cluster-connection>
-	</cluster-connections>
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml
deleted file mode 100644
index 27bbe99..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<configuration xmlns="urn:activemq"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
-
-   <ha-policy>
-      <shared-store>
-         <slave/>
-      </shared-store>
-   </ha-policy>
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5447"/>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5447"/>
-      </acceptor>
-   </acceptors>
-
-   <broadcast-groups>
-		<broadcast-group name="bg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<broadcast-period>1000</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-		</broadcast-group>
-	</broadcast-groups>
-
-	<discovery-groups>
-		<discovery-group name="dg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<refresh-timeout>60000</refresh-timeout>
-		</discovery-group>
-	</discovery-groups>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-			<discovery-group-ref discovery-group-name="dg-group1"/>
-		</cluster-connection>
-	</cluster-connections>
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-users.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/multiple-failover/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/jndi.properties b/examples/jms/multiple-failover/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/multiple-failover/src/main/resources/jndi.properties
@@ -0,0 +1,7 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.ha=true
+connection.ConnectionFactory.retryInterval=1000
+connection.ConnectionFactory.retryIntervalMultiplier=1.0
+connection.ConnectionFactory.reconnectAttempts=-1
+queue.queue/exampleQueue=exampleQueue
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/pom.xml b/examples/jms/no-consumer-buffering/pom.xml
index b205475..cfca702 100644
--- a/examples/jms/no-consumer-buffering/pom.xml
+++ b/examples/jms/no-consumer-buffering/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.NoConsumerBufferingExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                     </args>
                   </configuration>
                </execution>
                <execution>
@@ -102,7 +99,7 @@
             </dependencies>
             <configuration>
                <waitOnStart>false</waitOnStart>
-               <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+               <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
             </configuration>
          </plugin>
       </plugins>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
index 98af21d..4fa4f83 100644
--- a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
+++ b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
@@ -48,7 +48,7 @@ public class NoConsumerBufferingExample extends ActiveMQExample
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 2. Perfom a lookup on the queue
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..52d9570
--- /dev/null
+++ b/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,34 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      </acceptor>
+   </acceptors>
+
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-jms.xml
@@ -0,0 +1,8 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/no-consumer-buffering/src/main/resources/activemq/server0/activemq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index e0acd1d..0000000
--- a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
-
-
-   <!-- Connectors -->
-
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-      </acceptor>
-   </acceptors>
-
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/no-consumer-buffering/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/jndi.properties b/examples/jms/no-consumer-buffering/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d69b1bf
--- /dev/null
+++ b/examples/jms/no-consumer-buffering/src/main/resources/jndi.properties
@@ -0,0 +1,4 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.consumerWindowSize=0
+queue.queue/exampleQueue=exampleQueue
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/pom.xml b/examples/jms/non-transaction-failover/pom.xml
index 0bd9fa5..4ca1716 100644
--- a/examples/jms/non-transaction-failover/pom.xml
+++ b/examples/jms/non-transaction-failover/pom.xml
@@ -41,18 +41,12 @@
                            <name>build.directory</name>
                            <value>${basedir}/target/</value>
                         </property>
-                     </systemProperties>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
-                     <systemProperties>
-                        <property>
-                           <name>build.directory</name>
-                           <value>${basedir}/target/</value>
-                        </property>
                         <property>
                            <name>udp-address</name>
                            <value>${udp-address}</value>
                         </property>
                      </systemProperties>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
                </execution>
                <execution>
@@ -61,9 +55,7 @@
                      <goal>start</goal>
                   </goals>
                   <configuration>
-                     <jndiPort>1199</jndiPort>
-                     <jndiRmiPort>1198</jndiRmiPort>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server1</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
                      <fork>true</fork>
                      <systemProperties>
                         <property>
@@ -84,10 +76,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.NonTransactionFailoverExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                        <param>tcp://localhost:5446</param>
-                     </args>
                      <systemProperties>
                         <property>
                            <name>exampleConfigDir</name>
@@ -102,7 +90,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
                </execution>
                <execution>
@@ -111,7 +99,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server1</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
                   </configuration>
                </execution>
             </executions>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
index fc37097..2b346a5 100644
--- a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
+++ b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
@@ -53,7 +53,7 @@ public class NonTransactionFailoverExample extends ActiveMQExample
       try
       {
          // Step 1. Get an initial context for looking up JNDI from the server #1
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 2. Look up the JMS resources from JNDI
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..461bff8
--- /dev/null
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,71 @@
+<configuration xmlns="urn:activemq"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <ha-policy>
+      <shared-store>
+         <master/>
+      </shared-store>
+   </ha-policy>
+
+   <!-- Connectors -->
+
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5445"/>
+      </connector>
+   </connectors>      
+
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="5445"/>
+      </acceptor>
+   </acceptors>
+
+    <broadcast-groups>
+		<broadcast-group name="bg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<broadcast-period>1000</broadcast-period>
+         <connector-ref>netty-connector</connector-ref>
+		</broadcast-group>
+	</broadcast-groups>
+
+	<discovery-groups>
+		<discovery-group name="dg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<refresh-timeout>60000</refresh-timeout>
+		</discovery-group>
+	</discovery-groups>
+
+	<cluster-connections>
+		<cluster-connection name="my-cluster">
+			<address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+			<discovery-group-ref discovery-group-name="dg-group1"/>
+		</cluster-connection>
+	</cluster-connections>
+
+   <large-messages-directory>target/server0/data/large-messages</large-messages-directory>
+   <bindings-directory>target/server0/data/bindings</bindings-directory>
+   <journal-directory>target/server0/data/journal</journal-directory>
+   <paging-directory>target/server0/data/paging</paging-directory>
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-jms.xml
@@ -0,0 +1,8 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server0/activemq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml
new file mode 100644
index 0000000..4419628
--- /dev/null
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml
@@ -0,0 +1,72 @@
+<configuration xmlns="urn:activemq"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
+    
+   <!-- Connectors -->
+
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5446"/>
+      </connector>
+   </connectors>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="5446"/>
+      </acceptor>
+   </acceptors>
+
+    <broadcast-groups>
+		<broadcast-group name="bg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<broadcast-period>1000</broadcast-period>
+         <connector-ref>netty-connector</connector-ref>
+		</broadcast-group>
+	</broadcast-groups>
+
+	<discovery-groups>
+		<discovery-group name="dg-group1">
+			<group-address>${udp-address:231.7.7.7}</group-address>
+			<group-port>9876</group-port>
+			<refresh-timeout>60000</refresh-timeout>
+		</discovery-group>
+	</discovery-groups>
+
+	<cluster-connections>
+		<cluster-connection name="my-cluster">
+			<address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+			<discovery-group-ref discovery-group-name="dg-group1"/>
+		</cluster-connection>
+	</cluster-connections>
+
+   <large-messages-directory>target/server0/data/large-messages</large-messages-directory>
+   <bindings-directory>target/server0/data/bindings</bindings-directory>
+   <journal-directory>target/server0/data/journal</journal-directory>
+   <paging-directory>target/server0/data/paging</paging-directory>
+    
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+   
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-jms.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-jms.xml
@@ -0,0 +1,8 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-users.xml b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/non-transaction-failover/src/main/resources/activemq/server1/activemq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 461bff8..0000000
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<configuration xmlns="urn:activemq"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <ha-policy>
-      <shared-store>
-         <master/>
-      </shared-store>
-   </ha-policy>
-
-   <!-- Connectors -->
-
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </connector>
-   </connectors>      
-
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </acceptor>
-   </acceptors>
-
-    <broadcast-groups>
-		<broadcast-group name="bg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<broadcast-period>1000</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-		</broadcast-group>
-	</broadcast-groups>
-
-	<discovery-groups>
-		<discovery-group name="dg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<refresh-timeout>60000</refresh-timeout>
-		</discovery-group>
-	</discovery-groups>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-			<discovery-group-ref discovery-group-name="dg-group1"/>
-		</cluster-connection>
-	</cluster-connections>
-
-   <large-messages-directory>target/server0/data/large-messages</large-messages-directory>
-   <bindings-directory>target/server0/data/bindings</bindings-directory>
-   <journal-directory>target/server0/data/journal</journal-directory>
-   <paging-directory>target/server0/data/paging</paging-directory>
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index 4419628..0000000
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<configuration xmlns="urn:activemq"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <ha-policy>
-      <shared-store>
-         <slave/>
-      </shared-store>
-   </ha-policy>
-    
-   <!-- Connectors -->
-
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </acceptor>
-   </acceptors>
-
-    <broadcast-groups>
-		<broadcast-group name="bg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<broadcast-period>1000</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-		</broadcast-group>
-	</broadcast-groups>
-
-	<discovery-groups>
-		<discovery-group name="dg-group1">
-			<group-address>${udp-address:231.7.7.7}</group-address>
-			<group-port>9876</group-port>
-			<refresh-timeout>60000</refresh-timeout>
-		</discovery-group>
-	</discovery-groups>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-			<discovery-group-ref discovery-group-name="dg-group1"/>
-		</cluster-connection>
-	</cluster-connections>
-
-   <large-messages-directory>target/server0/data/large-messages</large-messages-directory>
-   <bindings-directory>target/server0/data/bindings</bindings-directory>
-   <journal-directory>target/server0/data/journal</journal-directory>
-   <paging-directory>target/server0/data/paging</paging-directory>
-    
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.exampleQueue">
-         <permission type="createDurableQueue" roles="guest"/>
-         <permission type="deleteDurableQueue" roles="guest"/>
-         <permission type="createNonDurableQueue" roles="guest"/>
-         <permission type="deleteNonDurableQueue" roles="guest"/>
-         <permission type="consume" roles="guest"/>
-         <permission type="send" roles="guest"/>
-      </security-setting>
-   </security-settings>
-   
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-users.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/non-transaction-failover/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/jndi.properties b/examples/jms/non-transaction-failover/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/non-transaction-failover/src/main/resources/jndi.properties
@@ -0,0 +1,7 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.ha=true
+connection.ConnectionFactory.retryInterval=1000
+connection.ConnectionFactory.retryIntervalMultiplier=1.0
+connection.ConnectionFactory.reconnectAttempts=-1
+queue.queue/exampleQueue=exampleQueue
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/openwire/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/pom.xml b/examples/jms/openwire/pom.xml
index b129d99..d6ff7a7 100644
--- a/examples/jms/openwire/pom.xml
+++ b/examples/jms/openwire/pom.xml
@@ -55,9 +55,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.OpenWireExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                     </args>
                   </configuration>
                </execution>
                <execution>
@@ -111,7 +108,7 @@
             </dependencies>
             <configuration>
                <waitOnStart>false</waitOnStart>
-               <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+               <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
             </configuration>
          </plugin>
       </plugins>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/openwire/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/openwire/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..8932ff8
--- /dev/null
+++ b/examples/jms/openwire/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,50 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
+   
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+      </connector>
+   </connectors>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      </acceptor>
+      <acceptor name="openwire-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="protocols" value="OPENWIRE" />
+         <param key="port" value="61616" />
+     </acceptor>
+   </acceptors>
+
+   <!-- Other config -->
+
+   <security-settings>
+	  <security-setting match="jms.topic.ActiveMQ.Advisory.#">
+		 <permission type="createNonDurableQueue" roles="guest"/>		  
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+	  </security-setting>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/openwire/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/openwire/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/openwire/src/main/resources/activemq/server0/activemq-jms.xml
@@ -0,0 +1,8 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/openwire/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/openwire/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/openwire/src/main/resources/activemq/server0/activemq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file


Mime
View raw message