activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [28/37] activemq-6 git commit: ACTIVEMQ6-51 Example server bootstrapping
Date Wed, 10 Dec 2014 16:11:54 GMT
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 7e44235..0000000
--- a/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,50 +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.#">
-         <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>
-
-   <address-settings>
-      <!--override the expiry address for the example-->
-      <address-setting match="jms.queue.exampleQueue">
-         <expiry-address>jms.queue.expiryQueue</expiry-address>
-      </address-setting>
-   </address-settings>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index d41da70..0000000
--- a/examples/jms/expiry/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">
-
-   <!--the queue used by the example-->
-   <queue name="exampleQueue"/>
-
-   <!--the expiry queue where expired messages will be sent-->
-   <queue name="expiryQueue"/>
-
-</configuration>
\ No newline at end of file

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

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ha-policy-autobackup/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/pom.xml b/examples/jms/ha-policy-autobackup/pom.xml
index 86f5d47..1056602 100644
--- a/examples/jms/ha-policy-autobackup/pom.xml
+++ b/examples/jms/ha-policy-autobackup/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>
@@ -53,7 +53,7 @@
                   <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>
@@ -88,7 +88,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 +97,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/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java
index 3eebb40..4fbcdcb 100644
--- a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java
+++ b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.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;
@@ -63,8 +65,24 @@ public class HAPolicyAutoBackupExample extends ActiveMQExample
       try
       {
          // Step 1. Get an initial context for looking up JNDI from server 0 and 1
-         ic0 = getContext(0);
-         ic1 = getContext(1);
+         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("queue.queue/exampleQueue", "exampleQueue");
+         properties.put("connection.ConnectionFactory.ha", true);
+         properties.put("connection.ConnectionFactory.retryInterval", 1000);
+         properties.put("connection.ConnectionFactory.retryIntervalMultiplier", 1.0);
+         properties.put("connection.ConnectionFactory.reconnectAttempts", -1);
+         ic0 = 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);
+         ic1 = new InitialContext(properties);
 
          // Step 2. Look-up the JMS Queue object from JNDI
          Queue queue = (Queue) ic0.lookup("queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..6a21e1d
--- /dev/null
+++ b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,93 @@
+<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="invm-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+      </connector>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5445"/>
+      </connector>
+      <!-- connector to the server1 -->
+      <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="invm-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+      </acceptor>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="5445"/>
+      </acceptor>
+   </acceptors>
+   
+   <!-- HA configuration -->
+   <ha-policy>
+      <replication>
+         <colocated>
+            <max-backups>1</max-backups>
+            <request-backup>true</request-backup>
+            <backup-request-retry-interval>1000</backup-request-retry-interval>
+            <excludes>
+               <connector-ref>invm-connector</connector-ref>
+               <connector-ref>server1-connector</connector-ref>
+               <connector-ref>netty-connector</connector-ref>
+            </excludes>
+            <master/>
+            <slave>
+               <scale-down>
+                  <connectors>
+                     <connector-ref>invm-connector</connector-ref>
+                  </connectors>
+               </scale-down>
+            </slave>
+         </colocated>
+      </replication>
+   </ha-policy>
+
+   <cluster-connections>
+      <cluster-connection name="my-cluster">
+         <address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+         <retry-interval>500</retry-interval>
+         <use-duplicate-detection>true</use-duplicate-detection>
+         <forward-when-no-consumers>true</forward-when-no-consumers>
+         <max-hops>1</max-hops>
+         <static-connectors>
+            <connector-ref>server1-connector</connector-ref>
+         </static-connectors>
+      </cluster-connection>
+   </cluster-connections>
+   
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="#">
+         <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/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/ha-policy-autobackup/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/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/ha-policy-autobackup/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/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-configuration.xml b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-configuration.xml
new file mode 100644
index 0000000..adaeb82
--- /dev/null
+++ b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-configuration.xml
@@ -0,0 +1,93 @@
+<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="invm-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+      </connector>
+      <connector name="netty-connector">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="port" value="5446"/>
+      </connector>
+      <!-- connector to the server0 -->
+      <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="invm-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+      </acceptor>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="5446"/>
+      </acceptor>
+   </acceptors>
+   
+   <!-- HA configuration -->
+   <ha-policy>
+      <replication>
+         <colocated>
+            <max-backups>1</max-backups>
+            <request-backup>true</request-backup>
+            <backup-request-retry-interval>1000</backup-request-retry-interval>
+            <excludes>
+               <connector-ref>invm-connector</connector-ref>
+               <connector-ref>server0-connector</connector-ref>
+               <connector-ref>netty-connector</connector-ref>
+            </excludes>
+            <master/>
+            <slave>
+               <scale-down>
+                  <connectors>
+                     <connector-ref>invm-connector</connector-ref>
+                  </connectors>
+               </scale-down>
+            </slave>
+         </colocated>
+      </replication>
+   </ha-policy>
+
+   <cluster-connections>
+      <cluster-connection name="my-cluster">
+         <address>jms</address>
+         <connector-ref>netty-connector</connector-ref>
+         <retry-interval>500</retry-interval>
+         <use-duplicate-detection>true</use-duplicate-detection>
+         <forward-when-no-consumers>true</forward-when-no-consumers>
+         <max-hops>1</max-hops>
+         <static-connectors>
+            <connector-ref>server0-connector</connector-ref>
+         </static-connectors>
+      </cluster-connection>
+   </cluster-connections>
+   
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="#">
+         <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>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-jms.xml b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/ha-policy-autobackup/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/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-users.xml b/examples/jms/ha-policy-autobackup/src/main/resources/activemq/server1/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/ha-policy-autobackup/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/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 6a21e1d..0000000
--- a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,93 +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="invm-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-      </connector>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </connector>
-      <!-- connector to the server1 -->
-      <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="invm-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
-      </acceptor>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5445"/>
-      </acceptor>
-   </acceptors>
-   
-   <!-- HA configuration -->
-   <ha-policy>
-      <replication>
-         <colocated>
-            <max-backups>1</max-backups>
-            <request-backup>true</request-backup>
-            <backup-request-retry-interval>1000</backup-request-retry-interval>
-            <excludes>
-               <connector-ref>invm-connector</connector-ref>
-               <connector-ref>server1-connector</connector-ref>
-               <connector-ref>netty-connector</connector-ref>
-            </excludes>
-            <master/>
-            <slave>
-               <scale-down>
-                  <connectors>
-                     <connector-ref>invm-connector</connector-ref>
-                  </connectors>
-               </scale-down>
-            </slave>
-         </colocated>
-      </replication>
-   </ha-policy>
-
-   <cluster-connections>
-      <cluster-connection name="my-cluster">
-         <address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-         <retry-interval>500</retry-interval>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>true</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <static-connectors>
-            <connector-ref>server1-connector</connector-ref>
-         </static-connectors>
-      </cluster-connection>
-   </cluster-connections>
-   
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="#">
-         <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/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 847659f..0000000
--- a/examples/jms/ha-policy-autobackup/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/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/ha-policy-autobackup/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/ha-policy-autobackup/src/main/resources/hornetq/server1/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/activemq-configuration.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/activemq-configuration.xml
deleted file mode 100644
index adaeb82..0000000
--- a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/activemq-configuration.xml
+++ /dev/null
@@ -1,93 +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="invm-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-      </connector>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </connector>
-      <!-- connector to the server0 -->
-      <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="invm-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
-      </acceptor>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="5446"/>
-      </acceptor>
-   </acceptors>
-   
-   <!-- HA configuration -->
-   <ha-policy>
-      <replication>
-         <colocated>
-            <max-backups>1</max-backups>
-            <request-backup>true</request-backup>
-            <backup-request-retry-interval>1000</backup-request-retry-interval>
-            <excludes>
-               <connector-ref>invm-connector</connector-ref>
-               <connector-ref>server0-connector</connector-ref>
-               <connector-ref>netty-connector</connector-ref>
-            </excludes>
-            <master/>
-            <slave>
-               <scale-down>
-                  <connectors>
-                     <connector-ref>invm-connector</connector-ref>
-                  </connectors>
-               </scale-down>
-            </slave>
-         </colocated>
-      </replication>
-   </ha-policy>
-
-   <cluster-connections>
-      <cluster-connection name="my-cluster">
-         <address>jms</address>
-         <connector-ref>netty-connector</connector-ref>
-         <retry-interval>500</retry-interval>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>true</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <static-connectors>
-            <connector-ref>server0-connector</connector-ref>
-         </static-connectors>
-      </cluster-connection>
-   </cluster-connections>
-   
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="#">
-         <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>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/activemq-users.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server1/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/ha-policy-autobackup/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/http-transport/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/pom.xml b/examples/jms/http-transport/pom.xml
index 24a5f54..9bc6c63 100644
--- a/examples/jms/http-transport/pom.xml
+++ b/examples/jms/http-transport/pom.xml
@@ -102,7 +102,7 @@
             </dependencies>
             <configuration>
                <waitOnStart>false</waitOnStart>
-               <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+               <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                <systemProperties>
                   <property>
                      <name>build.directory</name>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
index efba974..914c017 100644
--- a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
+++ b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
@@ -47,7 +47,7 @@ public class HttpTransportExample 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/http-transport/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/http-transport/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..5bc2739
--- /dev/null
+++ b/examples/jms/http-transport/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,36 @@
+<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>
+         <param key="port" value="8080"/>
+      </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/http-transport/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/http-transport/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/http-transport/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/http-transport/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/http-transport/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/http-transport/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/http-transport/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 61eab50..0000000
--- a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,46 +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>
-         <param key="http-enabled" value="true"/>
-         <param key="port" value="8080"/>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="8080"/>
-      </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/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 847659f..0000000
--- a/examples/jms/http-transport/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/http-transport/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/http-transport/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/http-transport/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/jndi.properties b/examples/jms/http-transport/src/main/resources/jndi.properties
new file mode 100644
index 0000000..fee3aac
--- /dev/null
+++ b/examples/jms/http-transport/src/main/resources/jndi.properties
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:8080?http-enabled=true
+queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/instantiate-connection-factory/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/pom.xml b/examples/jms/instantiate-connection-factory/pom.xml
index 4b60d79..bb9f409 100644
--- a/examples/jms/instantiate-connection-factory/pom.xml
+++ b/examples/jms/instantiate-connection-factory/pom.xml
@@ -112,7 +112,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/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..afaec1c
--- /dev/null
+++ b/examples/jms/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,35 @@
+<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>
+         <param key="port" value="5446"/>
+      </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/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..9dd800b
--- /dev/null
+++ b/examples/jms/instantiate-connection-factory/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/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/instantiate-connection-factory/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/instantiate-connection-factory/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/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 1cb9416..0000000
--- a/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,45 +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>
-         <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>
-
-   <!-- 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/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index d05e31e..0000000
--- a/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-jms.xml
+++ /dev/null
@@ -1,10 +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">
-      <entry name="/queue/exampleQueue"/>
-   </queue>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/instantiate-connection-factory/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/instantiate-connection-factory/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/interceptor/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/pom.xml b/examples/jms/interceptor/pom.xml
index 34dff8c..5ff60f5 100644
--- a/examples/jms/interceptor/pom.xml
+++ b/examples/jms/interceptor/pom.xml
@@ -107,7 +107,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/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
index e2b2b40..70f0231 100644
--- a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
+++ b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
@@ -47,7 +47,7 @@ public class InterceptorExample extends ActiveMQExample
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 2. Perform 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/interceptor/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/interceptor/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..e9dabca
--- /dev/null
+++ b/examples/jms/interceptor/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,39 @@
+<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>
+
+
+   <remoting-incoming-interceptors>
+      <class-name>org.apache.activemq.jms.example.SimpleInterceptor</class-name>
+   </remoting-incoming-interceptors>
+   
+   <!-- 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/interceptor/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/interceptor/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/interceptor/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/interceptor/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/interceptor/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/interceptor/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/interceptor/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 2433360..0000000
--- a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,47 +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>
-
-
-   <remoting-incoming-interceptors>
-      <class-name>org.apache.activemq.jms.example.SimpleInterceptor</class-name>
-   </remoting-incoming-interceptors>
-
-   <!-- 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/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/interceptor/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/interceptor/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/interceptor/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/interceptor/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/jndi.properties b/examples/jms/interceptor/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/interceptor/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/jaas/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/pom.xml b/examples/jms/jaas/pom.xml
index 1ce345b..a6ba21c 100644
--- a/examples/jms/jaas/pom.xml
+++ b/examples/jms/jaas/pom.xml
@@ -39,7 +39,6 @@
          <plugin>
             <groupId>org.apache.activemq</groupId>
             <artifactId>activemq-maven-plugin</artifactId>
-            <version>1.1.0</version>
             <executions>
                <execution>
                   <id>start</id>
@@ -125,7 +124,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/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
index 7813924..be797d1 100644
--- a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
+++ b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
@@ -48,7 +48,7 @@ public class JAASExample 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/jaas/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/jaas/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..52d9570
--- /dev/null
+++ b/examples/jms/jaas/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/jaas/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/jaas/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/jaas/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/jaas/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index e0acd1d..0000000
--- a/examples/jms/jaas/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/jaas/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/jaas/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/jaas/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/resources/jndi.properties b/examples/jms/jaas/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/jaas/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/jms-auto-closeable/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/pom.xml b/examples/jms/jms-auto-closeable/pom.xml
index d0c49da..084ddf9 100644
--- a/examples/jms/jms-auto-closeable/pom.xml
+++ b/examples/jms/jms-auto-closeable/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.JMSAutoCloseableExample</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/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
index d832771..646fdeb 100644
--- a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
+++ b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
@@ -40,7 +40,7 @@ public class JMSAutoCloseableExample 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/jms-auto-closeable/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..0d65f69
--- /dev/null
+++ b/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,33 @@
+<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, note we have removed send privs-->
+      <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"/>
+      </security-setting>
+   </security-settings>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/jms-auto-closeable/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/jms-auto-closeable/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/jms-auto-closeable/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/jms-auto-closeable/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/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 9ff5b8a..0000000
--- a/examples/jms/jms-auto-closeable/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, note we have removed send privs-->
-      <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"/>
-      </security-setting>
-   </security-settings>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/jms-auto-closeable/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/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/jms-auto-closeable/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/jms-auto-closeable/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/jndi.properties b/examples/jms/jms-auto-closeable/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/jms-auto-closeable/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/jms-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/pom.xml b/examples/jms/jms-bridge/pom.xml
index f014b5b..67ca1ea 100644
--- a/examples/jms/jms-bridge/pom.xml
+++ b/examples/jms/jms-bridge/pom.xml
@@ -45,7 +45,7 @@
                      <goal>start</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
                </execution>
                <execution>
@@ -54,9 +54,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>
                   </configuration>
                </execution>
@@ -85,7 +83,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
                </execution>
                <execution>
@@ -94,7 +92,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/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
index 0126251..f6ff686 100644
--- a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
+++ b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
@@ -66,8 +66,8 @@ public class JMSBridgeExample
       // Step 2. Create and start a JMS Bridge
       // Note, the Bridge needs a transaction manager, in this instance we will use the JBoss TM
       JMSBridge jmsBridge = new JMSBridgeImpl(
-               new JNDIConnectionFactoryFactory(sourceJndiParams, "source/ConnectionFactory"),
-               new JNDIConnectionFactoryFactory(targetJndiParams, "target/ConnectionFactory"),
+               new JNDIConnectionFactoryFactory(sourceJndiParams, "ConnectionFactory"),
+               new JNDIConnectionFactoryFactory(targetJndiParams, "ConnectionFactory"),
                new JNDIDestinationFactory(sourceJndiParams, "source/topic"),
                new JNDIDestinationFactory(targetJndiParams, "target/queue"),
                null,
@@ -91,8 +91,8 @@ public class JMSBridgeExample
       {
          jmsBridge.start();
          // Step 3. Lookup the *source* JMS resources
-         ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("/client/ConnectionFactory");
-         Topic sourceTopic = (Topic)sourceContext.lookup("/source/topic");
+         ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("ConnectionFactory");
+         Topic sourceTopic = (Topic)sourceContext.lookup("source/topic");
 
          // Step 4. Create a connection, a session and a message producer for the *source* topic
          sourceConnection = sourceConnectionFactory.createConnection();
@@ -111,7 +111,7 @@ public class JMSBridgeExample
          sourceConnection.close();
 
          // Step 7. Lookup the *target* JMS resources
-         ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("client/ConnectionFactory");
+         ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("ConnectionFactory");
          Queue targetQueue = (Queue)targetContext.lookup("target/queue");
 
          // Step 8. Create a connection, a session and a message consumer for the *target* queue
@@ -169,6 +169,8 @@ public class JMSBridgeExample
       Hashtable<String, String> jndiProps = new Hashtable<String, String>();
       jndiProps.put("java.naming.provider.url", server);
       jndiProps.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+      jndiProps.put("queue.target/queue", "target");
+      jndiProps.put("topic.source/topic", "topic");
       return jndiProps;
    }
 }


Mime
View raw message