activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [20/37] activemq-6 git commit: ACTIVEMQ6-51 Example server bootstrapping
Date Wed, 10 Dec 2014 16:11:46 GMT
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/send-acknowledgements/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/send-acknowledgements/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/jndi.properties b/examples/jms/send-acknowledgements/src/main/resources/jndi.properties
new file mode 100644
index 0000000..5361f83
--- /dev/null
+++ b/examples/jms/send-acknowledgements/src/main/resources/jndi.properties
@@ -0,0 +1,4 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.confirmationWindowSize=1048576
+queue.queue/exampleQueue=exampleQueue
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/spring-integration/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/spring-integration/pom.xml b/examples/jms/spring-integration/pom.xml
index 22db0f2..c57dc67 100644
--- a/examples/jms/spring-integration/pom.xml
+++ b/examples/jms/spring-integration/pom.xml
@@ -46,9 +46,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.SpringExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                     </args>
                   </configuration>
                </execution>
             </executions>
@@ -91,7 +88,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/spring-integration/src/main/resources/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/spring-integration/src/main/resources/activemq-configuration.xml b/examples/jms/spring-integration/src/main/resources/activemq-configuration.xml
index 7e86c38..2db2db3 100644
--- a/examples/jms/spring-integration/src/main/resources/activemq-configuration.xml
+++ b/examples/jms/spring-integration/src/main/resources/activemq-configuration.xml
@@ -3,13 +3,6 @@
                xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
 
     <persistence-enabled>false</persistence-enabled>
-    <!-- Connectors -->
-
-    <connectors>
-        <connector name="in-vm">
-            <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-        </connector>
-    </connectors>
 
     <acceptors>
         <acceptor name="in-vm">

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/spring-integration/src/main/resources/spring-jms-beans.xml
----------------------------------------------------------------------
diff --git a/examples/jms/spring-integration/src/main/resources/spring-jms-beans.xml b/examples/jms/spring-integration/src/main/resources/spring-jms-beans.xml
index c9eccea..9378efb 100644
--- a/examples/jms/spring-integration/src/main/resources/spring-jms-beans.xml
+++ b/examples/jms/spring-integration/src/main/resources/spring-jms-beans.xml
@@ -4,22 +4,34 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
 
-   <bean id="EmbeddedJms" class="org.apache.activemq.integration.spring.SpringJmsBootstrap" init-method="start" destroy-method="stop">
+   <bean id="EmbeddedJms" class="org.apache.activemq.integration.spring.SpringJmsBootstrap" init-method="start"
+         destroy-method="stop">
    </bean>
 
-    <bean id="listener" class="org.apache.activemq.jms.example.ExampleListener"/>
-    
-    <bean id="MessageSender" class="org.apache.activemq.jms.example.MessageSender">
-        <property name="connectionFactory" ref="ConnectionFactory"/>
-        <property name="destination" ref="/queue/exampleQueue"/>
-    </bean>
+   <bean id="connectionFactory" class="org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory">
+      <constructor-arg value="false"/>
+      <constructor-arg>
+         <bean class="org.apache.activemq.api.core.TransportConfiguration">
+            <constructor-arg value="org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory"/>
+         </bean>
+      </constructor-arg>
+   </bean>
+
+   <bean id="exampleQueue" class="org.apache.activemq.jms.client.ActiveMQQueue">
+      <constructor-arg index="0" value="exampleQueue"/>
+   </bean>
 
-    <bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
-        <property name="connectionFactory" ref="ConnectionFactory"/>
-        <property name="destination" ref="/queue/exampleQueue"/>
-        <property name="messageListener" ref="listener"/>
-    </bean>
-    
+   <bean id="listener" class="org.apache.activemq.jms.example.ExampleListener"/>
 
+   <bean id="MessageSender" class="org.apache.activemq.jms.example.MessageSender">
+      <property name="connectionFactory" ref="connectionFactory"/>
+      <property name="destination" ref="exampleQueue"/>
+   </bean>
+
+   <bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
+      <property name="connectionFactory" ref="connectionFactory"/>
+      <property name="destination" ref="exampleQueue"/>
+      <property name="messageListener" ref="listener"/>
+   </bean>
 </beans>
     
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ssl-enabled/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/pom.xml b/examples/jms/ssl-enabled/pom.xml
index 8fe2534..9220b13 100644
--- a/examples/jms/ssl-enabled/pom.xml
+++ b/examples/jms/ssl-enabled/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.SSLExample</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/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java b/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
index e025afd..7483506 100644
--- a/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
+++ b/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
@@ -47,7 +47,7 @@ public class SSLExample 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/ssl-enabled/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..ce77b71
--- /dev/null
+++ b/examples/jms/ssl-enabled/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>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-ssl-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="host" value="localhost"/>
+         <param key="port" value="5500"/>
+         <param key="ssl-enabled" value="true"/>
+         <param key="key-store-path" value="activemq/server0/activemq.example.keystore"/>
+         <param key="key-store-password" value="activemqexample"/>
+      </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/ssl-enabled/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/ssl-enabled/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/ssl-enabled/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/ssl-enabled/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/ssl-enabled/src/main/resources/activemq/server0/activemq.example.keystore
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq.example.keystore b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq.example.keystore
new file mode 100644
index 0000000..50de681
Binary files /dev/null and b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq.example.keystore differ

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq.example.truststore
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq.example.truststore b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq.example.truststore
new file mode 100644
index 0000000..129391a
Binary files /dev/null and b/examples/jms/ssl-enabled/src/main/resources/activemq/server0/activemq.example.truststore differ

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 8bba089..0000000
--- a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,53 +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-ssl-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-         <param key="host" value="localhost"/>
-         <param key="port" value="5500"/>
-         <param key="ssl-enabled" value="true"/>
-         <param key="trust-store-path" value="activemq/server0/activemq.example.truststore"/>
-         <param key="trust-store-password" value="activemqexample"/>
-      </connector>
-   </connectors>
-   
-   <!-- Acceptors -->
-   <acceptors>
-      <acceptor name="netty-ssl-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="host" value="localhost"/>
-         <param key="port" value="5500"/>
-         <param key="ssl-enabled" value="true"/>
-         <param key="key-store-path" value="activemq/server0/activemq.example.keystore"/>
-         <param key="key-store-password" value="activemqexample"/>
-      </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/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/ssl-enabled/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/ssl-enabled/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/ssl-enabled/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/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.keystore
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.keystore b/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.keystore
deleted file mode 100644
index 8ca2ea4..0000000
Binary files a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.truststore
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.truststore b/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.truststore
deleted file mode 100644
index 49dd088..0000000
Binary files a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/hornetq.example.truststore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/ssl-enabled/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/jndi.properties b/examples/jms/ssl-enabled/src/main/resources/jndi.properties
new file mode 100644
index 0000000..948b4bd
--- /dev/null
+++ b/examples/jms/ssl-enabled/src/main/resources/jndi.properties
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5500?ssl-enabled=true&trust-store-path=activemq/server0/activemq.example.truststore&trust-store-password=activemqexample
+queue.queue/exampleQueue=exampleQueue
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/static-selector-jms/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/pom.xml b/examples/jms/static-selector-jms/pom.xml
index ba5cd8a..4bac000 100644
--- a/examples/jms/static-selector-jms/pom.xml
+++ b/examples/jms/static-selector-jms/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>
             </configuration>
          </plugin>
       </plugins>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java b/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
index 7b976e4..267384d 100644
--- a/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
+++ b/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
@@ -52,7 +52,7 @@ public class StaticSelectorJMSExample extends ActiveMQExample
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 2. look-up the JMS queue object from JNDI, this is the queue that has filter configured with it.
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
@@ -68,9 +68,10 @@ public class StaticSelectorJMSExample extends ActiveMQExample
 
          // Step 6. Create a JMS Session
          Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
          // Step 7. Create a JMS Message Producer
-         MessageProducer producer = session.createProducer(queue);
+         MessageProducer producer = producerSession.createProducer(queue);
 
          // Step 8. Create a JMS Message Consumer that receives 'red' messages
          MessageConsumer redConsumer = session.createConsumer(queue);
@@ -138,7 +139,7 @@ public class StaticSelectorJMSExample extends ActiveMQExample
                                textMessage.getText() +
                                "] with color property: " +
                                colorProp);
-            if (!colorProp.equals(name))
+            if (colorProp != null && !colorProp.equals(name))
             {
                result = false;
             }

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..5d9a671
--- /dev/null
+++ b/examples/jms/static-selector-jms/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/static-selector-jms/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..c618cfb
--- /dev/null
+++ b/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-jms.xml
@@ -0,0 +1,10 @@
+<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">
+      <selector string="color='red'"/>
+   </queue>
+
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/static-selector-jms/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/static-selector-jms/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/static-selector-jms/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index d098c40..0000000
--- a/examples/jms/static-selector-jms/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.selectorQueue">
-         <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/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index c618cfb..0000000
--- a/examples/jms/static-selector-jms/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">
-      <selector string="color='red'"/>
-   </queue>
-
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/static-selector-jms/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/static-selector-jms/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/jndi.properties b/examples/jms/static-selector-jms/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/static-selector-jms/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/static-selector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/pom.xml b/examples/jms/static-selector/pom.xml
index a8a3f37..2a695ea 100644
--- a/examples/jms/static-selector/pom.xml
+++ b/examples/jms/static-selector/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.StaticSelectorExample</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/static-selector/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/readme.html b/examples/jms/static-selector/readme.html
index bf65656..6f73b53 100644
--- a/examples/jms/static-selector/readme.html
+++ b/examples/jms/static-selector/readme.html
@@ -32,7 +32,7 @@
       
      <p>In the example code, five messages with different 'color' property values are sent to queue 'selectorQueue'. One consumer
      is created to receive messages from the queue. Of the five sent messages, two are of 'red' color properties, one is 'blue', 
-     one is 'green' and one has not the 'color' propery at all. The result is that the consumer only gets the two 'red' messages.</p>
+     one is 'green' and one has not the 'color' property at all. The result is that the consumer only gets the two 'red' messages.</p>
      
 
      <h2>Example step-by-step</h2>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java b/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
index 11cc7b3..346134d 100644
--- a/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
+++ b/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
@@ -52,7 +52,7 @@ public class StaticSelectorExample extends ActiveMQExample
       try
       {
          // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 2. look-up the JMS queue object from JNDI, this is the queue that has filter configured with it.
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
@@ -68,9 +68,10 @@ public class StaticSelectorExample extends ActiveMQExample
 
          // Step 6. Create a JMS Session
          Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
          // Step 7. Create a JMS Message Producer
-         MessageProducer producer = session.createProducer(queue);
+         MessageProducer producer = producerSession.createProducer(queue);
 
          // Step 8. Create a JMS Message Consumer that receives 'red' messages
          MessageConsumer redConsumer = session.createConsumer(queue);
@@ -138,7 +139,7 @@ public class StaticSelectorExample extends ActiveMQExample
                                textMessage.getText() +
                                "] with color property: " +
                                colorProp);
-            if (!colorProp.equals(name))
+            if (colorProp != null && !colorProp.equals(name))
             {
                result = false;
             }

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/static-selector/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/static-selector/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..d150bc4
--- /dev/null
+++ b/examples/jms/static-selector/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>
+
+   <queues>
+   	<queue name="jms.queue.exampleQueue">
+   	    <address>jms.queue.exampleQueue</address>
+   	    <filter string="color='red'"/>
+   	</queue>
+   </queues>
+
+   <!-- 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/static-selector/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/static-selector/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..847659f
--- /dev/null
+++ b/examples/jms/static-selector/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/static-selector/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/static-selector/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/static-selector/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/static-selector/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 930c70c..0000000
--- a/examples/jms/static-selector/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>
-
-   <queues>     
-   	<queue name="jms.queue.selectorQueue">
-   	    <address>jms.queue.selectorQueue</address>
-   	    <filter string="color='red'"/>
-   	</queue>
-   </queues>
-
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.queue.selectorQueue">
-         <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/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 847659f..0000000
--- a/examples/jms/static-selector/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/static-selector/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/static-selector/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/static-selector/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/jndi.properties b/examples/jms/static-selector/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/static-selector/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/stomp-websockets/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/pom.xml b/examples/jms/stomp-websockets/pom.xml
index 3d56027..390e3f5 100644
--- a/examples/jms/stomp-websockets/pom.xml
+++ b/examples/jms/stomp-websockets/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>
                   </configuration>
                </execution>
                <execution>
@@ -63,7 +63,7 @@
                      <goal>stop</goal>
                   </goals>
                   <configuration>
-                     <hornetqConfigurationDir>${basedir}/target/classes/activemq/server0</hornetqConfigurationDir>
+                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                   </configuration>
                </execution>
             </executions>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
index dac21d9..323dc02 100644
--- a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
+++ b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
@@ -49,7 +49,7 @@ public class StompWebSocketExample extends ActiveMQExample
       InitialContext initialContext = null;
       try
       {
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
          Topic topic = (Topic)initialContext.lookup("topic/chat");
          ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
          connection = cf.createConnection();

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..60985df
--- /dev/null
+++ b/examples/jms/stomp-websockets/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>
+      <!-- a regular Netty acceptor used by the JMS client -->
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      </acceptor>
+      <!-- the stomp-acceptor is configured for the Stomp over Web Sockets and -->
+      <!-- will listen on port 61614)              -->
+      <acceptor name="stomp-websocket">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="port" value="61614" />
+      </acceptor>
+   </acceptors>
+
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.topic.chat">
+         <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/stomp-websockets/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..048f5d2
--- /dev/null
+++ b/examples/jms/stomp-websockets/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 topic used by the example-->
+   <topic name="chat"/>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/stomp-websockets/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/stomp-websockets/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/stomp-websockets/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index c74f54a..0000000
--- a/examples/jms/stomp-websockets/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>
-      <!-- a regular Netty acceptor used by the JMS client -->
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-      </acceptor>
-      <!-- the stomp-acceptor is configured for the Stomp over Web Sockets and -->
-      <!-- will listen on port 61614)              -->
-      <acceptor name="stomp-websocket">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="port" value="61614" />
-      </acceptor>
-   </acceptors>
-
-   <!-- Other config -->
-
-   <security-settings>
-      <!--security for example queue-->
-      <security-setting match="jms.topic.chat">
-         <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/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 048f5d2..0000000
--- a/examples/jms/stomp-websockets/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 topic used by the example-->
-   <topic name="chat"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/stomp-websockets/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/stomp-websockets/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/jndi.properties b/examples/jms/stomp-websockets/src/main/resources/jndi.properties
new file mode 100644
index 0000000..754c087
--- /dev/null
+++ b/examples/jms/stomp-websockets/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
+topic.topic/chat=chat
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/pom.xml b/examples/jms/stomp/pom.xml
index ebf7049..627b7c0 100644
--- a/examples/jms/stomp/pom.xml
+++ b/examples/jms/stomp/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.StompExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                     </args>
                   </configuration>
                </execution>
                <execution>
@@ -107,7 +104,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/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
index a27ae30..bd3f84a 100644
--- a/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
+++ b/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
@@ -88,7 +88,7 @@ public class StompExample extends ActiveMQExample
          // We will now consume from JMS the message sent with Stomp.
 
          // Step 6. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 7. Perform a lookup on the queue and the connection factory
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/stomp/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..1b68cd8
--- /dev/null
+++ b/examples/jms/stomp/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,42 @@
+<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>
+      <!-- a regular Netty acceptor used by the JMS client -->
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      </acceptor>
+      <!-- the stomp-acceptor is configured for the Stomp protocol only and -->
+      <!-- will listen on port 61613 (default Stomp port)              -->
+      <acceptor name="stomp-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="protocols" value="STOMP" />
+         <param key="port" value="61613" />
+      </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/stomp/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/stomp/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/stomp/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/stomp/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/stomp/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/stomp/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/stomp/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 0188165..0000000
--- a/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,51 +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>
-      <!-- a regular Netty acceptor used by the JMS client -->
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-      </acceptor>
-      <!-- the stomp-acceptor is configured for the Stomp protocol only and -->
-      <!-- will listen on port 61613 (default Stomp port)              -->
-      <acceptor name="stomp-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="protocols" value="STOMP" />
-         <param key="port" value="61613" />
-      </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/stomp/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/stomp/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/stomp/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/stomp/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/stomp/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/jndi.properties b/examples/jms/stomp/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/stomp/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/stomp1.1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/pom.xml b/examples/jms/stomp1.1/pom.xml
index 251f5c8..f7db8c0 100644
--- a/examples/jms/stomp1.1/pom.xml
+++ b/examples/jms/stomp1.1/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.StompExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                     </args>
                   </configuration>
                </execution>
                <execution>
@@ -107,7 +104,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/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
index 35309c0..17220f9 100644
--- a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
+++ b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
@@ -95,7 +95,7 @@ public class StompExample extends ActiveMQExample
          // We will now consume from JMS the message sent with Stomp.
 
          // Step 6. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 7. Perform a lookup on the queue and the connection factory
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..1b68cd8
--- /dev/null
+++ b/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,42 @@
+<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>
+      <!-- a regular Netty acceptor used by the JMS client -->
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      </acceptor>
+      <!-- the stomp-acceptor is configured for the Stomp protocol only and -->
+      <!-- will listen on port 61613 (default Stomp port)              -->
+      <acceptor name="stomp-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="protocols" value="STOMP" />
+         <param key="port" value="61613" />
+      </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/stomp1.1/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/stomp1.1/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/stomp1.1/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/stomp1.1/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/stomp1.1/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/stomp1.1/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 0188165..0000000
--- a/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,51 +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>
-      <!-- a regular Netty acceptor used by the JMS client -->
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-      </acceptor>
-      <!-- the stomp-acceptor is configured for the Stomp protocol only and -->
-      <!-- will listen on port 61613 (default Stomp port)              -->
-      <acceptor name="stomp-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="protocols" value="STOMP" />
-         <param key="port" value="61613" />
-      </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/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml
deleted file mode 100644
index 0d5c953..0000000
--- a/examples/jms/stomp1.1/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/stomp1.1/src/main/resources/hornetq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-users.xml b/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-users.xml
deleted file mode 100644
index ae30546..0000000
--- a/examples/jms/stomp1.1/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/stomp1.1/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/jndi.properties b/examples/jms/stomp1.1/src/main/resources/jndi.properties
new file mode 100644
index 0000000..d9b5c6a
--- /dev/null
+++ b/examples/jms/stomp1.1/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/stomp1.2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/pom.xml b/examples/jms/stomp1.2/pom.xml
index 1876e38..2c52fb6 100644
--- a/examples/jms/stomp1.2/pom.xml
+++ b/examples/jms/stomp1.2/pom.xml
@@ -51,9 +51,6 @@
                   </goals>
                   <configuration>
                      <clientClass>org.apache.activemq.jms.example.StompExample</clientClass>
-                     <args>
-                        <param>tcp://localhost:5445</param>
-                     </args>
                   </configuration>
                </execution>
                <execution>
@@ -107,7 +104,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/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
index 7b21107..f9faf72 100644
--- a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
+++ b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
@@ -94,7 +94,7 @@ public class StompExample extends ActiveMQExample
          // We will now consume from JMS the message sent with Stomp.
 
          // Step 6. Create an initial context to perform the JNDI lookup.
-         initialContext = getContext(0);
+         initialContext = new InitialContext();
 
          // Step 7. Perform a lookup on the queue and the connection factory
          Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/a102983d/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-configuration.xml b/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-configuration.xml
new file mode 100644
index 0000000..1b68cd8
--- /dev/null
+++ b/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-configuration.xml
@@ -0,0 +1,42 @@
+<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>
+      <!-- a regular Netty acceptor used by the JMS client -->
+      <acceptor name="netty-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      </acceptor>
+      <!-- the stomp-acceptor is configured for the Stomp protocol only and -->
+      <!-- will listen on port 61613 (default Stomp port)              -->
+      <acceptor name="stomp-acceptor">
+         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="protocols" value="STOMP" />
+         <param key="port" value="61613" />
+      </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/stomp1.2/src/main/resources/activemq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-jms.xml b/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-jms.xml
new file mode 100644
index 0000000..0d5c953
--- /dev/null
+++ b/examples/jms/stomp1.2/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/stomp1.2/src/main/resources/activemq/server0/activemq-users.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-users.xml b/examples/jms/stomp1.2/src/main/resources/activemq/server0/activemq-users.xml
new file mode 100644
index 0000000..ae30546
--- /dev/null
+++ b/examples/jms/stomp1.2/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/stomp1.2/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-configuration.xml
deleted file mode 100644
index 0188165..0000000
--- a/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ /dev/null
@@ -1,51 +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>
-      <!-- a regular Netty acceptor used by the JMS client -->
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-      </acceptor>
-      <!-- the stomp-acceptor is configured for the Stomp protocol only and -->
-      <!-- will listen on port 61613 (default Stomp port)              -->
-      <acceptor name="stomp-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-         <param key="protocols" value="STOMP" />
-         <param key="port" value="61613" />
-      </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>


Mime
View raw message