activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [22/37] activemq-6 git commit: ACTIVEMQ6-51 Example server bootstrapping
Date Wed, 10 Dec 2014 16:11:48 GMT
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index b6e3935..0000000
--- a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,70 +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}/server1/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server1/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server1/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
-
-    <cluster-user>exampleUser</cluster-user>
-
-    <cluster-password>secret</cluster-password>
-
-   <ha-policy>
-      <replication>
-         <slave>
-            <allow-failback>true</allow-failback>
-            <!-- not needed but tells the backup not to restart after failback as there will be > 0 backups saved -->
-            <max-saved-replicated-journals-size>0</max-saved-replicated-journals-size>
-         </slave>
-      </replication>
-   </ha-policy>
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-live-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </connector>
-      <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>
-
-	<cluster-connections>
-		<cluster-connection name="my-cluster">
-			<address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-         <static-connectors>
-            <connector-ref>netty-live-connector</connector-ref>
-         </static-connectors>
-		</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/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-failback-static/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/replicated-failback-static/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-failback-static/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/replicated-failback-static/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/jndi.properties b/examples/jms/replicated-failback-static/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/replicated-failback-static/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/replicated-failback/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/pom.xml b/examples/jms/replicated-failback/pom.xml
index 1aa611d..c2846e2 100644
--- a/examples/jms/replicated-failback/pom.xml
+++ b/examples/jms/replicated-failback/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>
@@ -78,10 +76,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.ReplicatedFailbackExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                        <param>tcp://localhost:5446</param>
-                     </args>
                      <systemProperties>
                         <property>
                            <name>exampleConfigDir</name>
@@ -96,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>
@@ -105,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/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
index d216f0f..0810ccb 100644
--- a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
+++ b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
@@ -55,7 +55,7 @@ public class ReplicatedFailbackExample 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");
@@ -100,7 +100,7 @@ public class ReplicatedFailbackExample extends ActiveMQExample
 
          // Step 10. Crash server #1, the live server, and wait a little while to make sure
          // it has really crashed
-         Thread.sleep(2000);
+         Thread.sleep(5000);
          killServer(0);
 
          // Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..fcec902
--- /dev/null
+++ b/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,79 @@
+<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>
+
+   <cluster-user>exampleUser</cluster-user>
+
+   <cluster-password>secret</cluster-password>
+
+   <ha-policy>
+      <replication>
+         <master>
+            <!--we need this for auto failback-->
+            <check-for-live-server>true</check-for-live-server>
+         </master>
+      </replication>
+   </ha-policy>
+
+   <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/replicated-failback/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/replicated-failback/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/replicated-failback/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/replicated-failback/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/replicated-failback/src/main/resources/activemq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server1/activemq-configuration.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server1/activemq-configuration.xml
new file mode 100644
index 0000000..95c5596
--- /dev/null
+++ b/examples/jms/replicated-failback/src/main/resources/activemq/server1/activemq-configuration.xml
@@ -0,0 +1,83 @@
+<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}/server1/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server1/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server1/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
+
+   <cluster-user>exampleUser</cluster-user>
+
+   <cluster-password>secret</cluster-password>
+
+   <ha-policy>
+      <replication>
+         <slave>
+            <allow-failback>true</allow-failback>
+         </slave>
+      </replication>
+   </ha-policy>
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-live-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5445"/>
+      </connector>
+      <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>
+   <!-- 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/replicated-failback/src/main/resources/activemq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server1/activemq-jms.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server1/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/replicated-failback/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/replicated-failback/src/main/resources/activemq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server1/activemq-users.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server1/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/replicated-failback/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/replicated-failback/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 7e9f424..0000000
--- a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,80 +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>
-
-   <cluster-user>exampleUser</cluster-user>
-
-   <cluster-password>secret</cluster-password>
-
-   <ha-policy>
-      <replication>
-         <master>
-            <!--we need this for auto failback-->
-            <check-for-live-server>true</check-for-live-server>
-            <allow-failback>true</allow-failback>
-         </master>
-      </replication>
-   </ha-policy>
-
-   <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/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-failback/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/replicated-failback/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-failback/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/replicated-failback/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index 95c5596..0000000
--- a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,83 +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}/server1/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server1/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server1/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
-
-   <cluster-user>exampleUser</cluster-user>
-
-   <cluster-password>secret</cluster-password>
-
-   <ha-policy>
-      <replication>
-         <slave>
-            <allow-failback>true</allow-failback>
-         </slave>
-      </replication>
-   </ha-policy>
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-live-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </connector>
-      <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>
-   <!-- 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/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-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/replicated-failback/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-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/replicated-failback/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/jndi.properties b/examples/jms/replicated-failback/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-multiple-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/pom.xml b/examples/jms/replicated-multiple-failover/pom.xml
index 1afd8ab..45ef67b 100644
--- a/examples/jms/replicated-multiple-failover/pom.xml
+++ b/examples/jms/replicated-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.ReplicatedMultipleFailoverExample</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/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java b/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
index 5ca8ffb..6b88fad 100644
--- a/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
+++ b/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
@@ -52,7 +52,7 @@ public class ReplicatedMultipleFailoverExample 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");
@@ -97,7 +97,7 @@ public class ReplicatedMultipleFailoverExample extends ActiveMQExample
 
          // Step 10. Crash server #1, the live server, and wait a little while to make sure
          // it has really crashed
-         Thread.sleep(2000);
+         Thread.sleep(5000);
          killServer(0);
 
          // Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
@@ -119,7 +119,7 @@ public class ReplicatedMultipleFailoverExample extends ActiveMQExample
          }
          message0.acknowledge();
 
-         Thread.sleep(2000);
+         Thread.sleep(5000);
          killServer(getServer(connection));
 
          // Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..1b19ccf
--- /dev/null
+++ b/examples/jms/replicated-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>
+      <replication>
+         <master/>
+      </replication>
+   </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/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-configuration.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-configuration.xml
new file mode 100644
index 0000000..a518181
--- /dev/null
+++ b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server1/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}/server1/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server1/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server1/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
+
+   <ha-policy>
+      <replication>
+         <slave/>
+      </replication>
+   </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>
+   <!-- 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/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-users.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server1/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-configuration.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-configuration.xml
new file mode 100644
index 0000000..6787b3c
--- /dev/null
+++ b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server2/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">
+
+   <bindings-directory>${build.directory}/server2/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server2/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server2/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server2/data/messaging/paging</paging-directory>
+
+   <ha-policy>
+      <replication>
+         <slave/>
+      </replication>
+   </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/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-users.xml b/examples/jms/replicated-multiple-failover/src/main/resources/activemq/server2/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 1b19ccf..0000000
--- a/examples/jms/replicated-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>
-      <replication>
-         <master/>
-      </replication>
-   </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/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index 0be89a7..0000000
--- a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,77 +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}/server1/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server1/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server1/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
-
-   <ha-policy>
-      <replication>
-         <slave/>
-      </replication>
-   </ha-policy>
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-live-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </connector>
-      <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>
-   <!-- 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/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml
deleted file mode 100644
index e1e6d9e..0000000
--- a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-configuration.xml
+++ /dev/null
@@ -1,76 +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}/server2/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>${build.directory}/server2/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>${build.directory}/server2/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>${build.directory}/server2/data/messaging/paging</paging-directory>
-
-   <ha-policy>
-      <replication>
-         <slave/>
-      </replication>
-   </ha-policy>
-    
-   <connectors>
-      <connector name="netty-live-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </connector>
-      <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/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-users.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-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/replicated-multiple-failover/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/jndi.properties b/examples/jms/replicated-multiple-failover/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/pom.xml b/examples/jms/replicated-transaction-failover/pom.xml
index 5d1dc03..64f6c36 100644
--- a/examples/jms/replicated-transaction-failover/pom.xml
+++ b/examples/jms/replicated-transaction-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>
                      <systemProperties>
                         <property>
                            <name>build.directory</name>
@@ -78,10 +76,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.ReplicatedTransactionFailoverExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                        <param>tcp://localhost:5446</param>
-                     </args>
                      <systemProperties>
                         <property>
                            <name>exampleConfigDir</name>
@@ -96,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>
@@ -105,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/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java b/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
index fe0e9d1..80f8ed6 100644
--- a/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
+++ b/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
@@ -54,7 +54,7 @@ public class ReplicatedTransactionFailoverExample 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");
@@ -155,7 +155,7 @@ public class ReplicatedTransactionFailoverExample extends ActiveMQExample
 
       if (killServer)
       {
-         Thread.sleep(2000);
+         Thread.sleep(5000);
 
          killServer(0);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..9ed557f
--- /dev/null
+++ b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,74 @@
+<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>
+      <replication>
+         <master/>
+      </replication>
+   </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/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml
new file mode 100644
index 0000000..3cb1302
--- /dev/null
+++ b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-configuration.xml
@@ -0,0 +1,75 @@
+<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}/server1/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>${build.directory}/server1/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>${build.directory}/server1/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
+
+   <ha-policy>
+      <replication>
+         <slave/>
+      </replication>
+   </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>
+    
+   <!-- 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/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-jms.xml b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-users.xml b/examples/jms/replicated-transaction-failover/src/main/resources/activemq/server1/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/replicated-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/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 9ed557f..0000000
--- a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,74 +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>
-      <replication>
-         <master/>
-      </replication>
-   </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/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-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>


Mime
View raw message