activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [21/37] activemq-6 git commit: ACTIVEMQ6-51 Example server bootstrapping
Date Wed, 10 Dec 2014 16:11:47 GMT
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-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/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index f95ed77..0000000
--- a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,79 +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-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/replicated-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/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/replicated-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/replicated-transaction-failover/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/jndi.properties b/examples/jms/replicated-transaction-failover/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/replicated-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/request-reply/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/pom.xml b/examples/jms/request-reply/pom.xml
index 72fcd0a..377f2b2 100644
--- a/examples/jms/request-reply/pom.xml
+++ b/examples/jms/request-reply/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.RequestReplyExample</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/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java b/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
index cd73411..651dc2a 100644
--- a/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
+++ b/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
@@ -67,7 +67,7 @@ public class RequestReplyExample extends ActiveMQExample
          server.start();
 
          // Step 2. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 3. Lookup the queue for sending the request message
          Queue requestQueue = (Queue)initialContext.lookup("queue/exampleQueue");
@@ -162,7 +162,7 @@ public class RequestReplyExample extends ActiveMQExample
       public void start() throws Exception
       {
          // Get an initial context to perform the JNDI lookup.
-         InitialContext initialContext = getContext(0);
+         InitialContext initialContext = new InitialContext();
 
          // Lookup the queue to receive the request message
          Queue requestQueue = (Queue)initialContext.lookup("queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..9d3a1bb
--- /dev/null
+++ b/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,41 @@
+<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 queues -->
+      <security-setting match="jms.queue.#">
+         <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 for JMS temporary queue -->
+      <security-setting match="jms.tempqueue.#">
+         <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/request-reply/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/request-reply/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/request-reply/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/request-reply/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/request-reply/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 25e8fc2..0000000
--- a/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,49 +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 queues -->
-      <security-setting match="jms.queue.#">
-         <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 for JMS temporary queue -->
-      <security-setting match="jms.tempqueue.#">
-         <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/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 847659f..0000000
--- a/examples/jms/request-reply/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/request-reply/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/request-reply/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/jndi.properties b/examples/jms/request-reply/src/main/resources/jndi.properties
new file mode 100644
index 0000000..8fda7c0
--- /dev/null
+++ b/examples/jms/request-reply/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/rest/dup-send/src/main/resources/activemq-client.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/dup-send/src/main/resources/activemq-client.xml b/examples/jms/rest/dup-send/src/main/resources/activemq-client.xml
new file mode 100644
index 0000000..ad54b11
--- /dev/null
+++ b/examples/jms/rest/dup-send/src/main/resources/activemq-client.xml
@@ -0,0 +1,12 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+      </connector>
+   </connectors>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml b/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml
new file mode 100644
index 0000000..706a5a4
--- /dev/null
+++ b/examples/jms/rest/dup-send/src/main/resources/activemq-rest.xml
@@ -0,0 +1,3 @@
+<rest-messaging>
+    <dups-ok>false</dups-ok>
+</rest-messaging>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/rest/dup-send/src/main/resources/hornetq-client.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/dup-send/src/main/resources/hornetq-client.xml b/examples/jms/rest/dup-send/src/main/resources/hornetq-client.xml
deleted file mode 100644
index ad54b11..0000000
--- a/examples/jms/rest/dup-send/src/main/resources/hornetq-client.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-      </connector>
-   </connectors>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/rest/dup-send/src/main/resources/hornetq-rest.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/dup-send/src/main/resources/hornetq-rest.xml b/examples/jms/rest/dup-send/src/main/resources/hornetq-rest.xml
deleted file mode 100644
index 706a5a4..0000000
--- a/examples/jms/rest/dup-send/src/main/resources/hornetq-rest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<rest-messaging>
-    <dups-ok>false</dups-ok>
-</rest-messaging>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/rest/jms-to-rest/src/main/resources/activemq-client.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/jms-to-rest/src/main/resources/activemq-client.xml b/examples/jms/rest/jms-to-rest/src/main/resources/activemq-client.xml
new file mode 100644
index 0000000..ad54b11
--- /dev/null
+++ b/examples/jms/rest/jms-to-rest/src/main/resources/activemq-client.xml
@@ -0,0 +1,12 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+      </connector>
+   </connectors>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/rest/jms-to-rest/src/main/resources/hornetq-client.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/jms-to-rest/src/main/resources/hornetq-client.xml b/examples/jms/rest/jms-to-rest/src/main/resources/hornetq-client.xml
deleted file mode 100644
index ad54b11..0000000
--- a/examples/jms/rest/jms-to-rest/src/main/resources/hornetq-client.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-      </connector>
-   </connectors>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/rest/push/src/main/resources/activemq-client.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/push/src/main/resources/activemq-client.xml b/examples/jms/rest/push/src/main/resources/activemq-client.xml
new file mode 100644
index 0000000..ad54b11
--- /dev/null
+++ b/examples/jms/rest/push/src/main/resources/activemq-client.xml
@@ -0,0 +1,12 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+      </connector>
+   </connectors>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/rest/push/src/main/resources/hornetq-client.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/push/src/main/resources/hornetq-client.xml b/examples/jms/rest/push/src/main/resources/hornetq-client.xml
deleted file mode 100644
index ad54b11..0000000
--- a/examples/jms/rest/push/src/main/resources/hornetq-client.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-      </connector>
-   </connectors>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/pom.xml b/examples/jms/scale-down/pom.xml
index f9a23af..33924a6 100644
--- a/examples/jms/scale-down/pom.xml
+++ b/examples/jms/scale-down/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>udp-address</name>
@@ -51,9 +51,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>
@@ -70,10 +68,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.ScaleDownExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                        <param>tcp://localhost:5446</param>
-                     </args>
                       <systemProperties>
                           <property>
                               <name>exampleConfigDir</name>
@@ -88,7 +82,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
                </execution>
                <execution>
@@ -97,7 +91,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/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java b/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
index d942b79..3d29180 100644
--- a/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
+++ b/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.jms.example;
 
+import java.util.Hashtable;
+
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
@@ -52,8 +54,24 @@ public class ScaleDownExample extends ActiveMQExample
       try
       {
          // Step 1. Get an initial context for looking up JNDI for both servers
-         initialContext1 = getContext(1);
-         initialContext = getContext(0);
+         Hashtable<String, Object> properties = new Hashtable<String, Object>();
+         properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+         properties.put("java.naming.provider.url", args[0]);
+         properties.put("connection.ConnectionFactory.ha", true);
+         properties.put("connection.ConnectionFactory.retryInterval", 1000);
+         properties.put("connection.ConnectionFactory.retryIntervalMultiplier", 1.0);
+         properties.put("connection.ConnectionFactory.reconnectAttempts", -1);
+         properties.put("queue.queue/exampleQueue", "exampleQueue");
+         initialContext = new InitialContext(properties);
+
+         properties = new Hashtable<String, Object>();
+         properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+         properties.put("java.naming.provider.url", args[1]);
+         properties.put("connection.ConnectionFactory.ha", true);
+         properties.put("connection.ConnectionFactory.retryInterval", 1000);
+         properties.put("connection.ConnectionFactory.retryIntervalMultiplier", 1.0);
+         properties.put("connection.ConnectionFactory.reconnectAttempts", -1);
+         initialContext1 = new InitialContext(properties);
 
          // Step 2. Look up the JMS resources from JNDI
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
@@ -83,9 +101,9 @@ public class ScaleDownExample extends ActiveMQExample
             System.out.println("Sent message: " + message.getText());
          }
 
-         // Step 7. Crash server #0, the live server, and wait a little while to make sure
+         // Step 7. 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(1);
 
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..b9a9938
--- /dev/null
+++ b/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,96 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+   
+
+   <bindings-directory>target/server0/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>target/server0/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>target/server0/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>target/server0/data/messaging/paging</paging-directory>
+   <!-- 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>
+   
+   <!-- Clustering configuration -->
+   <broadcast-groups>
+      <broadcast-group name="my-broadcast-group">
+         <group-address>${udp-address:231.7.7.7}</group-address>
+         <group-port>9876</group-port>
+         <broadcast-period>100</broadcast-period>
+         <connector-ref>netty-connector</connector-ref>
+     </broadcast-group>
+   </broadcast-groups>
+   
+   <discovery-groups>
+      <discovery-group name="my-discovery-group">
+         <group-address>${udp-address:231.7.7.7}</group-address>
+         <group-port>9876</group-port>
+         <refresh-timeout>10000</refresh-timeout>
+      </discovery-group>
+   </discovery-groups>
+   
+   <cluster-connections>
+      <cluster-connection name="my-cluster">
+         <address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+         <retry-interval>500</retry-interval>
+         <reconnect-attempts>5</reconnect-attempts>
+         <use-duplicate-detection>true</use-duplicate-detection>
+         <forward-when-no-consumers>true</forward-when-no-consumers>
+         <max-hops>1</max-hops>
+         <discovery-group-ref discovery-group-name="my-discovery-group"/>
+      </cluster-connection>
+   </cluster-connections>
+
+   <ha-policy/>
+   
+   <!-- 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-setting match="jms.queue.activemq.management">
+         <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"/>
+         <permission type="manage" roles="guest"/>
+      </security-setting>
+      <security-setting match="jms.queue.activemq.management.*">
+         <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"/>
+         <permission type="manage" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/scale-down/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/scale-down/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/scale-down/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/scale-down/src/main/resources/activemq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-configuration.xml b/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-configuration.xml
new file mode 100644
index 0000000..71e9863
--- /dev/null
+++ b/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-configuration.xml
@@ -0,0 +1,91 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
+   
+
+
+   <bindings-directory>target/server1/data/messaging/bindings</bindings-directory>
+
+   <journal-directory>target/server1/data/messaging/journal</journal-directory>
+
+   <large-messages-directory>target/server1/data/messaging/largemessages</large-messages-directory>
+
+   <paging-directory>target/server1/data/messaging/paging</paging-directory>
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5446"/>
+      </connector>
+      <connector name="server0-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="5446"/>
+      </acceptor>
+   </acceptors>
+   
+   <!-- Clustering configuration -->
+   <broadcast-groups>
+      <broadcast-group name="my-broadcast-group">
+         <group-address>${udp-address:231.7.7.7}</group-address>
+         <group-port>9876</group-port>
+         <broadcast-period>100</broadcast-period>
+         <connector-ref>netty-connector</connector-ref>
+      </broadcast-group>
+   </broadcast-groups>
+   
+   <discovery-groups>
+      <discovery-group name="my-discovery-group">
+         <group-address>${udp-address:231.7.7.7}</group-address>
+         <group-port>9876</group-port>
+         <refresh-timeout>10000</refresh-timeout>
+      </discovery-group>
+   </discovery-groups>
+   
+   <cluster-connections>
+      <cluster-connection name="my-cluster">
+         <address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+         <retry-interval>500</retry-interval>
+         <reconnect-attempts>5</reconnect-attempts>
+         <use-duplicate-detection>true</use-duplicate-detection>
+         <forward-when-no-consumers>true</forward-when-no-consumers>
+         <max-hops>1</max-hops>
+         <discovery-group-ref discovery-group-name="my-discovery-group"/>
+      </cluster-connection>
+   </cluster-connections>
+
+   <!--a live server that will scale down on server shutdown-->
+   <ha-policy>
+      <live-only>
+         <scale-down>
+            <connectors>
+               <connector-ref>server0-connector</connector-ref>
+            </connectors>
+         </scale-down>
+      </live-only>
+   </ha-policy>
+   
+   <!-- 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/scale-down/src/main/resources/activemq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-jms.xml b/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/scale-down/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-users.xml b/examples/jms/scale-down/src/main/resources/activemq/server1/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/scale-down/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/scale-down/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 784a5bf..0000000
--- a/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,100 +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>target/server0/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>target/server0/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>target/server0/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>target/server0/data/messaging/paging</paging-directory>
-   <!-- Connectors -->
-
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </connector>
-      <connector name="server1-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="5445"/>
-      </acceptor>
-   </acceptors>
-   
-   <!-- Clustering configuration -->
-   <broadcast-groups>
-      <broadcast-group name="my-broadcast-group">
-         <group-address>${udp-address:231.7.7.7}</group-address>
-         <group-port>9876</group-port>
-         <broadcast-period>100</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-     </broadcast-group>
-   </broadcast-groups>
-   
-   <discovery-groups>
-      <discovery-group name="my-discovery-group">
-         <group-address>${udp-address:231.7.7.7}</group-address>
-         <group-port>9876</group-port>
-         <refresh-timeout>10000</refresh-timeout>
-      </discovery-group>
-   </discovery-groups>
-   
-   <cluster-connections>
-      <cluster-connection name="my-cluster">
-         <address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-         <retry-interval>500</retry-interval>
-         <reconnect-attempts>5</reconnect-attempts>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>true</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <discovery-group-ref discovery-group-name="my-discovery-group"/>
-      </cluster-connection>
-   </cluster-connections>
-
-   <ha-policy/>
-   
-   <!-- 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-setting match="jms.queue.activemq.management">
-         <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"/>
-         <permission type="manage" roles="guest"/>
-      </security-setting>
-      <security-setting match="jms.queue.activemq.management.*">
-         <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"/>
-         <permission type="manage" roles="guest"/>
-      </security-setting>
-   </security-settings>
-
-
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 847659f..0000000
--- a/examples/jms/scale-down/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/scale-down/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/scale-down/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index 71e9863..0000000
--- a/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,91 +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>target/server1/data/messaging/bindings</bindings-directory>
-
-   <journal-directory>target/server1/data/messaging/journal</journal-directory>
-
-   <large-messages-directory>target/server1/data/messaging/largemessages</large-messages-directory>
-
-   <paging-directory>target/server1/data/messaging/paging</paging-directory>
-
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </connector>
-      <connector name="server0-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="5446"/>
-      </acceptor>
-   </acceptors>
-   
-   <!-- Clustering configuration -->
-   <broadcast-groups>
-      <broadcast-group name="my-broadcast-group">
-         <group-address>${udp-address:231.7.7.7}</group-address>
-         <group-port>9876</group-port>
-         <broadcast-period>100</broadcast-period>
-         <connector-ref>netty-connector</connector-ref>
-      </broadcast-group>
-   </broadcast-groups>
-   
-   <discovery-groups>
-      <discovery-group name="my-discovery-group">
-         <group-address>${udp-address:231.7.7.7}</group-address>
-         <group-port>9876</group-port>
-         <refresh-timeout>10000</refresh-timeout>
-      </discovery-group>
-   </discovery-groups>
-   
-   <cluster-connections>
-      <cluster-connection name="my-cluster">
-         <address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-         <retry-interval>500</retry-interval>
-         <reconnect-attempts>5</reconnect-attempts>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>true</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <discovery-group-ref discovery-group-name="my-discovery-group"/>
-      </cluster-connection>
-   </cluster-connections>
-
-   <!--a live server that will scale down on server shutdown-->
-   <ha-policy>
-      <live-only>
-         <scale-down>
-            <connectors>
-               <connector-ref>server0-connector</connector-ref>
-            </connectors>
-         </scale-down>
-      </live-only>
-   </ha-policy>
-   
-   <!-- 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/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
deleted file mode 100644
index 847659f..0000000
--- a/examples/jms/scale-down/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/scale-down/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/scheduled-message/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/pom.xml b/examples/jms/scheduled-message/pom.xml
index 83f1a67..ca365bc 100644
--- a/examples/jms/scheduled-message/pom.xml
+++ b/examples/jms/scheduled-message/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.ScheduledMessageExample</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/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java b/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
index 92ece47..563d48f 100644
--- a/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
+++ b/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
@@ -51,7 +51,7 @@ public class ScheduledMessageExample 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/scheduled-message/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/scheduled-message/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..5d9a671
--- /dev/null
+++ b/examples/jms/scheduled-message/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/scheduled-message/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/scheduled-message/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/scheduled-message/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scheduled-message/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/scheduled-message/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/scheduled-message/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/scheduled-message/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 8ef5e46..0000000
--- a/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,42 +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/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 847659f..0000000
--- a/examples/jms/scheduled-message/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>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/scheduled-message/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/scheduled-message/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/jndi.properties b/examples/jms/scheduled-message/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/scheduled-message/src/main/resources/jndi.properties
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+queue.queue/exampleQueue=exampleQueue
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/pom.xml b/examples/jms/security/pom.xml
index 8eb47f8..35dafb6 100644
--- a/examples/jms/security/pom.xml
+++ b/examples/jms/security/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.SecurityExample</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/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java b/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
index 9a699fb..301c261 100644
--- a/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
+++ b/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
@@ -55,7 +55,7 @@ public class SecurityExample extends ActiveMQExample
       try
       {
          // /Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 2. perform lookup on the topics
          Topic genericTopic = (Topic)initialContext.lookup("topic/genericTopic");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/security/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..7b85a97
--- /dev/null
+++ b/examples/jms/security/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,52 @@
+<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>
+      <!-- any user can have full control of generic topics -->
+      <security-setting match="jms.topic.#">
+         <permission type="createDurableQueue" roles="user"/>
+         <permission type="deleteDurableQueue" roles="user"/>
+         <permission type="createNonDurableQueue" roles="user"/>
+         <permission type="deleteNonDurableQueue" roles="user"/>
+         <permission type="send" roles="user"/>
+         <permission type="consume" roles="user"/>
+      </security-setting>
+
+      <security-setting match="jms.topic.news.europe.#">
+         <permission type="createDurableQueue" roles="user"/>
+         <permission type="deleteDurableQueue" roles="user"/>
+         <permission type="createNonDurableQueue" roles="user"/>
+         <permission type="deleteNonDurableQueue" roles="user"/>
+         <permission type="send" roles="europe-user"/>
+         <permission type="consume" roles="news-user"/>
+      </security-setting>
+
+      <security-setting match="jms.topic.news.us.#">
+         <permission type="createDurableQueue" roles="user"/>
+         <permission type="deleteDurableQueue" roles="user"/>
+         <permission type="createNonDurableQueue" roles="user"/>
+         <permission type="deleteNonDurableQueue" roles="user"/>
+         <permission type="send" roles="us-user"/>
+         <permission type="consume" roles="news-user"/>
+      </security-setting>
+   </security-settings>
+   
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/security/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..74a9f79
--- /dev/null
+++ b/examples/jms/security/src/main/resources/activemq/server0/activemq-jms.xml
@@ -0,0 +1,11 @@
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
+
+   <topic name="genericTopic"/>
+
+   <topic name="news.europe.europeTopic"/>
+
+   <topic name="news.us.usTopic"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/security/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..92b0328
--- /dev/null
+++ b/examples/jms/security/src/main/resources/activemq/server0/activemq-users.xml
@@ -0,0 +1,25 @@
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
+   
+   <user name="bill" password="activemq">
+      <role name="user"/>
+   </user>
+  
+   <user name="andrew" password="activemq1">
+      <role name="europe-user"/>
+      <role name="user"/>
+   </user>
+   
+   <user name="frank" password="activemq2">
+      <role name="us-user"/>
+      <role name="news-user"/>
+      <role name="user"/>
+   </user>
+   
+   <user name="sam" password="activemq3">
+      <role name="news-user"/>
+      <role name="user"/>
+   </user>
+
+</configuration>
+

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/security/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 80a5f2c..0000000
--- a/examples/jms/security/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,60 +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>
-      <!-- any user can have full control of generic topics -->
-      <security-setting match="jms.topic.#">
-         <permission type="createDurableQueue" roles="user"/>
-         <permission type="deleteDurableQueue" roles="user"/>
-         <permission type="createNonDurableQueue" roles="user"/>
-         <permission type="deleteNonDurableQueue" roles="user"/>
-         <permission type="send" roles="user"/>
-         <permission type="consume" roles="user"/>
-      </security-setting>
-
-      <security-setting match="jms.topic.news.europe.#">
-         <permission type="createDurableQueue" roles="user"/>
-         <permission type="deleteDurableQueue" roles="user"/>
-         <permission type="createNonDurableQueue" roles="user"/>
-         <permission type="deleteNonDurableQueue" roles="user"/>
-         <permission type="send" roles="europe-user"/>
-         <permission type="consume" roles="news-user"/>
-      </security-setting>
-
-      <security-setting match="jms.topic.news.us.#">
-         <permission type="createDurableQueue" roles="user"/>
-         <permission type="deleteDurableQueue" roles="user"/>
-         <permission type="createNonDurableQueue" roles="user"/>
-         <permission type="deleteNonDurableQueue" roles="user"/>
-         <permission type="send" roles="us-user"/>
-         <permission type="consume" roles="news-user"/>
-      </security-setting>
-   </security-settings>
-   
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 74a9f79..0000000
--- a/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-   <topic name="genericTopic"/>
-
-   <topic name="news.europe.europeTopic"/>
-
-   <topic name="news.us.usTopic"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/security/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index 92b0328..0000000
--- a/examples/jms/security/src/main/resources/hornetq/server0/activemq-users.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   
-   <user name="bill" password="activemq">
-      <role name="user"/>
-   </user>
-  
-   <user name="andrew" password="activemq1">
-      <role name="europe-user"/>
-      <role name="user"/>
-   </user>
-   
-   <user name="frank" password="activemq2">
-      <role name="us-user"/>
-      <role name="news-user"/>
-      <role name="user"/>
-   </user>
-   
-   <user name="sam" password="activemq3">
-      <role name="news-user"/>
-      <role name="user"/>
-   </user>
-
-</configuration>
-

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/security/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/jndi.properties b/examples/jms/security/src/main/resources/jndi.properties
new file mode 100644
index 0000000..3afad0c
--- /dev/null
+++ b/examples/jms/security/src/main/resources/jndi.properties
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+topic.topic/genericTopic=genericTopic
+topic.topic/europeTopic=news.europe.europeTopic
+topic.topic/usTopic=news.us.usTopic
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/send-acknowledgements/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/pom.xml b/examples/jms/send-acknowledgements/pom.xml
index 9a766ca..30f436a 100644
--- a/examples/jms/send-acknowledgements/pom.xml
+++ b/examples/jms/send-acknowledgements/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.SendAcknowledgementsExample</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/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java b/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
index 31c284e..4e2cf53 100644
--- a/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
+++ b/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
@@ -55,7 +55,7 @@ public class SendAcknowledgementsExample 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/send-acknowledgements/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/send-acknowledgements/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..52d9570
--- /dev/null
+++ b/examples/jms/send-acknowledgements/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/send-acknowledgements/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/send-acknowledgements/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/send-acknowledgements/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/send-acknowledgements/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/send-acknowledgements/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/send-acknowledgements/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/send-acknowledgements/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index e0acd1d..0000000
--- a/examples/jms/send-acknowledgements/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/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/send-acknowledgements/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