You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/07/29 23:22:08 UTC

[02/24] activemq-artemis git commit: Continuing work on ARTEMIS-178

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-roles.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-users.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/broker.xml b/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/broker.xml
index 30f33a0..a188e71 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/broker.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/activemq/server2/broker.xml
@@ -30,14 +30,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <bindings-directory>${data.dir}/server2/data/messaging/bindings</bindings-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <journal-directory>${data.dir}/server2/data/messaging/journal</journal-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <large-messages-directory>${data.dir}/server2/data/messaging/largemessages</large-messages-directory>
-
-      <paging-directory>${data.dir}/server2/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Connectors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-roles.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-users.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/broker.xml b/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/broker.xml
index afda21b..43ab47c 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/broker.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/activemq/server3/broker.xml
@@ -30,14 +30,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <bindings-directory>${data.dir}/server3/data/messaging/bindings</bindings-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <journal-directory>${data.dir}/server3/data/messaging/journal</journal-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <large-messages-directory>${data.dir}/server3/data/messaging/largemessages</large-messages-directory>
-
-      <paging-directory>${data.dir}/server3/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Connectors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-roles.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-users.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/broker.xml b/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/broker.xml
index 321d57b..ce4afab 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/broker.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/activemq/server4/broker.xml
@@ -30,14 +30,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <bindings-directory>${data.dir}/server4/data/messaging/bindings</bindings-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <journal-directory>${data.dir}/server4/data/messaging/journal</journal-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <large-messages-directory>${data.dir}/server4/data/messaging/largemessages</large-messages-directory>
-
-      <paging-directory>${data.dir}/server4/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Connectors -->
       <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-roles.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-users.properties b/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/broker.xml b/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/broker.xml
index abbe9ad..d23612a 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/broker.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/activemq/server5/broker.xml
@@ -30,23 +30,22 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <bindings-directory>${data.dir}/server5/data/messaging/bindings</bindings-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <journal-directory>${data.dir}/server5/data/messaging/journal</journal-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <large-messages-directory>${data.dir}/server5/data/messaging/largemessages</large-messages-directory>
-
-      <paging-directory>${data.dir}/server5/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Connectors -->
       <connectors>
-         <connector name="netty-connector">tcp://localhost:5450</connector>
+         <connector name="netty-connector">tcp://localhost:61621</connector>
       </connectors>
 
       <!-- Acceptors -->
       <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:5450</acceptor>
+         <acceptor name="netty-acceptor">tcp://localhost:61621</acceptor>
       </acceptors>
 
       <!-- Clustering configuration -->

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/temp-queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/pom.xml b/examples/jms/temp-queue/pom.xml
index b213088..1599fcc 100644
--- a/examples/jms/temp-queue/pom.xml
+++ b/examples/jms/temp-queue/pom.xml
@@ -37,11 +37,6 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>common</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-jms_2.0_spec</artifactId>
       </dependency>
@@ -61,9 +56,18 @@ under the License.
                         <goals>
                            <goal>create</goal>
                         </goals>
+                     </execution>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
                         <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <spawn>true</spawn>
+                           <testURI>tcp://localhost:61616</testURI>
+                           <args>
+                              <param>run</param>
+                           </args>
                         </configuration>
                      </execution>
                      <execution>
@@ -73,8 +77,16 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TemporaryQueueExample</clientClass>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
+                        <configuration>
                            <args>
-                              <param>${basedir}/target/server0</param>
+                              <param>stop</param>
                            </args>
                         </configuration>
                      </execution>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/temp-queue/src/main/java/org/apache/activemq/artemis/jms/example/TemporaryQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/src/main/java/org/apache/activemq/artemis/jms/example/TemporaryQueueExample.java b/examples/jms/temp-queue/src/main/java/org/apache/activemq/artemis/jms/example/TemporaryQueueExample.java
index cd39f7f..a2f7d38 100644
--- a/examples/jms/temp-queue/src/main/java/org/apache/activemq/artemis/jms/example/TemporaryQueueExample.java
+++ b/examples/jms/temp-queue/src/main/java/org/apache/activemq/artemis/jms/example/TemporaryQueueExample.java
@@ -26,20 +26,12 @@ import javax.jms.TemporaryQueue;
 import javax.jms.TextMessage;
 import javax.naming.InitialContext;
 
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
 /**
  * A simple JMS example that shows how to use temporary queues.
  */
-public class TemporaryQueueExample extends ActiveMQExample
+public class TemporaryQueueExample
 {
-   public static void main(final String[] args)
-   {
-      new TemporaryQueueExample().run(args);
-   }
-
-   @Override
-   public boolean runExample() throws Exception
+   public static void main(final String[] args) throws Exception
    {
       Connection connection = null;
       InitialContext initialContext = null;
@@ -115,8 +107,6 @@ public class TemporaryQueueExample extends ActiveMQExample
          {
             System.out.println("Exception got when trying to access a temp queue outside its scope: " + e);
          }
-
-         return true;
       }
       finally
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/temp-queue/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/temp-queue/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/src/main/resources/activemq/server0/broker.xml b/examples/jms/temp-queue/src/main/resources/activemq/server0/broker.xml
index d595086..f1c14b2 100644
--- a/examples/jms/temp-queue/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/temp-queue/src/main/resources/activemq/server0/broker.xml
@@ -29,19 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
-
-
-      <!-- Connectors -->
-      <connectors>
-         <connector name="netty-connector">tcp://localhost:61616</connector>
-      </connectors>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Acceptors -->
       <acceptors>
@@ -49,8 +43,6 @@ under the License.
       </acceptors>
 
       <!-- Other config -->
-
-
       <security-settings>
          <!--security for example queues -->
          <security-setting match="jms.queue.#">
@@ -69,6 +61,5 @@ under the License.
             <permission type="send" roles="guest"/>
          </security-setting>
       </security-settings>
-
    </core>
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-hierarchies/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/pom.xml b/examples/jms/topic-hierarchies/pom.xml
index 087570e..250abd3 100644
--- a/examples/jms/topic-hierarchies/pom.xml
+++ b/examples/jms/topic-hierarchies/pom.xml
@@ -37,8 +37,8 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>common</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
          <version>${project.version}</version>
       </dependency>
       <dependency>
@@ -61,9 +61,18 @@ under the License.
                         <goals>
                            <goal>create</goal>
                         </goals>
+                     </execution>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
                         <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <spawn>true</spawn>
+                           <testURI>tcp://localhost:61616</testURI>
+                           <args>
+                              <param>run</param>
+                           </args>
                         </configuration>
                      </execution>
                      <execution>
@@ -73,8 +82,16 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TopicHierarchyExample</clientClass>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
+                        <configuration>
                            <args>
-                              <param>${basedir}/target/server0</param>
+                              <param>stop</param>
                            </args>
                         </configuration>
                      </execution>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/artemis/jms/example/TopicHierarchyExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/artemis/jms/example/TopicHierarchyExample.java b/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/artemis/jms/example/TopicHierarchyExample.java
index 34fe27d..f2385ba 100644
--- a/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/artemis/jms/example/TopicHierarchyExample.java
+++ b/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/artemis/jms/example/TopicHierarchyExample.java
@@ -27,22 +27,15 @@ import javax.jms.Topic;
 import javax.naming.InitialContext;
 
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
 
 /**
  * This example demonstrates how a JMS TopicSubscriber can be created to subscribe to a wild-card Topic.
  *
  * For more information please see the readme.html
  */
-public class TopicHierarchyExample extends ActiveMQExample
+public class TopicHierarchyExample
 {
-   public static void main(final String[] args)
-   {
-      new TopicHierarchyExample().run(args);
-   }
-
-   @Override
-   public boolean runExample() throws Exception
+   public static void main(final String[] args) throws Exception
    {
       Connection connection = null;
       InitialContext initialContext = null;
@@ -113,12 +106,10 @@ public class TopicHierarchyExample extends ActiveMQExample
 
          if (message != null)
          {
-            return false;
+            throw new IllegalStateException("Message was not null.");
          }
 
          System.out.println("Didn't received any more message: " + message);
-
-         return true;
       }
       finally
       {
@@ -133,5 +124,4 @@ public class TopicHierarchyExample extends ActiveMQExample
          }
       }
    }
-
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/broker.xml b/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/broker.xml
index 1f94195..ac065f6 100644
--- a/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/topic-hierarchies/src/main/resources/activemq/server0/broker.xml
@@ -40,13 +40,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Acceptors -->
       <acceptors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/pom.xml b/examples/jms/topic-selector-example1/pom.xml
index 7526dd5..bbf95ee 100644
--- a/examples/jms/topic-selector-example1/pom.xml
+++ b/examples/jms/topic-selector-example1/pom.xml
@@ -37,11 +37,6 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>common</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-jms_2.0_spec</artifactId>
       </dependency>
@@ -61,9 +56,18 @@ under the License.
                         <goals>
                            <goal>create</goal>
                         </goals>
+                     </execution>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
                         <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <spawn>true</spawn>
+                           <testURI>tcp://localhost:61616</testURI>
+                           <args>
+                              <param>run</param>
+                           </args>
                         </configuration>
                      </execution>
                      <execution>
@@ -73,8 +77,16 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TopicSelectorExample1</clientClass>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
+                        <configuration>
                            <args>
-                              <param>${basedir}/target/server0</param>
+                              <param>stop</param>
                            </args>
                         </configuration>
                      </execution>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java b/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
index 5116a76..28c128e 100644
--- a/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
+++ b/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
@@ -25,20 +25,12 @@ import javax.jms.TextMessage;
 import javax.jms.Topic;
 import javax.naming.InitialContext;
 
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
 /**
  * A simple JMS Topic example that creates a producer and consumer on a queue and sends and receives a message.
  */
-public class TopicSelectorExample1 extends ActiveMQExample
+public class TopicSelectorExample1
 {
-   public static void main(final String[] args)
-   {
-      new TopicSelectorExample1().run(args);
-   }
-
-   @Override
-   public boolean runExample() throws Exception
+   public static void main(final String[] args) throws Exception
    {
       Connection connection = null;
 
@@ -81,8 +73,8 @@ public class TopicSelectorExample1 extends ActiveMQExample
             {
                // Step 10.1 Create a text message
                TextMessage message1 = session.createTextMessage("This is a text message " + i +
-                                                                " sent for someID=" +
-                                                                someID);
+                                                                        " sent for someID=" +
+                                                                        someID);
 
                // Step 10.1 Set a property
                message1.setIntProperty("someID", someID);
@@ -110,8 +102,8 @@ public class TopicSelectorExample1 extends ActiveMQExample
             }
 
             System.out.println("messageConsumer1 received " + messageReceivedA.getText() +
-                               " someID = " +
-                               messageReceivedA.getIntProperty("someID"));
+                                       " someID = " +
+                                       messageReceivedA.getIntProperty("someID"));
          }
 
          // Step 13. Consume the messages from MessageConsumer2, filtering out someID=2
@@ -126,8 +118,8 @@ public class TopicSelectorExample1 extends ActiveMQExample
             }
 
             System.out.println("messageConsumer2 received " + messageReceivedB.getText() +
-                               " someID = " +
-                               messageReceivedB.getIntProperty("someID"));
+                                       " someID = " +
+                                       messageReceivedB.getIntProperty("someID"));
          }
 
          // Step 14. Consume the messages from MessageConsumer3, receiving the complete set of messages
@@ -141,17 +133,14 @@ public class TopicSelectorExample1 extends ActiveMQExample
                break;
             }
             System.out.println("messageConsumer3 received " + messageReceivedC.getText() +
-                               " someID = " +
-                               messageReceivedC.getIntProperty("someID"));
+                                       " someID = " +
+                                       messageReceivedC.getIntProperty("someID"));
          }
 
          // Step 15. Close the subscribers
          messageConsumer1.close();
          messageConsumer2.close();
          messageConsumer3.close();
-
-         return true;
-
       }
       finally
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/broker.xml b/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/broker.xml
index e7c1a14..4a4b505 100644
--- a/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/topic-selector-example1/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Acceptors -->
       <acceptors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/pom.xml b/examples/jms/topic-selector-example2/pom.xml
index 320d13c..b9f5332 100644
--- a/examples/jms/topic-selector-example2/pom.xml
+++ b/examples/jms/topic-selector-example2/pom.xml
@@ -37,11 +37,6 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>common</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-jms_2.0_spec</artifactId>
       </dependency>
@@ -61,9 +56,18 @@ under the License.
                         <goals>
                            <goal>create</goal>
                         </goals>
+                     </execution>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
                         <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <spawn>true</spawn>
+                           <testURI>tcp://localhost:61616</testURI>
+                           <args>
+                              <param>run</param>
+                           </args>
                         </configuration>
                      </execution>
                      <execution>
@@ -73,8 +77,16 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TopicSelectorExample2</clientClass>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
+                        <configuration>
                            <args>
-                              <param>${basedir}/target/server0</param>
+                              <param>stop</param>
                            </args>
                         </configuration>
                      </execution>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java b/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
index 301b752..e80d22d 100644
--- a/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
+++ b/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
@@ -27,24 +27,16 @@ import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
 import javax.naming.InitialContext;
-
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * A simple JMS example that consumes messages using selectors.
  */
-public class TopicSelectorExample2 extends ActiveMQExample
+public class TopicSelectorExample2
 {
-   private volatile boolean result = true;
-
-   public static void main(final String[] args)
-   {
-      new TopicSelectorExample2().run(args);
-   }
-
-   @Override
-   public boolean runExample() throws Exception
+   public static void main(final String[] args) throws Exception
    {
+      AtomicBoolean result = new AtomicBoolean(true);
       Connection connection = null;
       InitialContext initialContext = null;
       try
@@ -65,33 +57,36 @@ public class TopicSelectorExample2 extends ActiveMQExample
          connection.start();
 
          // 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 Message Producer
-         MessageProducer producer = session.createProducer(topic);
+         MessageProducer producer = producerSession.createProducer(topic);
 
          // Step 8. Prepare two selectors
          String redSelector = "color='red'";
          String greenSelector = "color='green'";
 
          // Step 9. Create a JMS Message Consumer that receives 'red' messages
-         MessageConsumer redConsumer = session.createConsumer(topic, redSelector);
-         redConsumer.setMessageListener(new SimpleMessageListener("red"));
+         Session redSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageConsumer redConsumer = redSession.createConsumer(topic, redSelector);
+         redConsumer.setMessageListener(new SimpleMessageListener("red", result));
 
          // Step 10. Create a second JMS message consumer that receives 'green' messages
-         MessageConsumer greenConsumer = session.createConsumer(topic, greenSelector);
-         greenConsumer.setMessageListener(new SimpleMessageListener("green"));
+         Session greenSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageConsumer greenConsumer = greenSession.createConsumer(topic, greenSelector);
+         greenConsumer.setMessageListener(new SimpleMessageListener("green", result));
 
          // Step 11. Create another JMS message consumer that receives all messages.
-         MessageConsumer allConsumer = session.createConsumer(topic);
-         allConsumer.setMessageListener(new SimpleMessageListener("all"));
+         Session allSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageConsumer allConsumer = allSession.createConsumer(topic);
+         allConsumer.setMessageListener(new SimpleMessageListener("all", result));
 
          // Step 12. Create three messages, each has a color property
-         TextMessage redMessage = session.createTextMessage("Red");
+         TextMessage redMessage = producerSession.createTextMessage("Red");
          redMessage.setStringProperty("color", "red");
-         TextMessage greenMessage = session.createTextMessage("Green");
+         TextMessage greenMessage = producerSession.createTextMessage("Green");
          greenMessage.setStringProperty("color", "green");
-         TextMessage blueMessage = session.createTextMessage("Blue");
+         TextMessage blueMessage = producerSession.createTextMessage("Blue");
          blueMessage.setStringProperty("color", "blue");
 
          // Step 13. Send the Messages
@@ -104,7 +99,8 @@ public class TopicSelectorExample2 extends ActiveMQExample
 
          Thread.sleep(5000);
 
-         return result;
+         if (!result.get())
+            throw new IllegalStateException();
       }
       finally
       {
@@ -121,39 +117,39 @@ public class TopicSelectorExample2 extends ActiveMQExample
          }
       }
    }
+}
 
-   public class SimpleMessageListener implements MessageListener
-   {
-
-      private final String name;
+class SimpleMessageListener implements MessageListener
+{
+   private final String name;
+   AtomicBoolean result;
 
-      public SimpleMessageListener(final String listener)
-      {
-         name = listener;
-      }
+   public SimpleMessageListener(final String listener, AtomicBoolean result)
+   {
+      name = listener;
+      this.result = result;
+   }
 
-      public void onMessage(final Message msg)
+   public void onMessage(final Message msg)
+   {
+      TextMessage textMessage = (TextMessage)msg;
+      try
       {
-         TextMessage textMessage = (TextMessage)msg;
-         try
-         {
-            String colorProp = msg.getStringProperty("color");
-            System.out.println("Receiver " + name +
-                               " receives message [" +
-                               textMessage.getText() +
-                               "] with color property: " +
-                               colorProp);
-            if (!colorProp.equals(name) && !name.equals("all"))
-            {
-               result = false;
-            }
-         }
-         catch (JMSException e)
+         String colorProp = msg.getStringProperty("color");
+         System.out.println("Receiver " + name +
+                                    " receives message [" +
+                                    textMessage.getText() +
+                                    "] with color property: " +
+                                    colorProp);
+         if (!colorProp.equals(name) && !name.equals("all"))
          {
-            e.printStackTrace();
-            result = false;
+            result.set(false);
          }
       }
-
+      catch (JMSException e)
+      {
+         e.printStackTrace();
+         result.set(false);
+      }
    }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/broker.xml b/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/broker.xml
index e7c1a14..4a4b505 100644
--- a/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/topic-selector-example2/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Acceptors -->
       <acceptors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic/pom.xml b/examples/jms/topic/pom.xml
index 0fe39ff..2c6a91a 100644
--- a/examples/jms/topic/pom.xml
+++ b/examples/jms/topic/pom.xml
@@ -37,11 +37,6 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>common</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-jms_2.0_spec</artifactId>
       </dependency>
@@ -60,9 +55,18 @@ under the License.
                         <goals>
                            <goal>create</goal>
                         </goals>
+                     </execution>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
                         <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <spawn>true</spawn>
+                           <testURI>tcp://localhost:61616</testURI>
+                           <args>
+                              <param>run</param>
+                           </args>
                         </configuration>
                      </execution>
                      <execution>
@@ -72,8 +76,16 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TopicExample</clientClass>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
+                        <configuration>
                            <args>
-                              <param>${basedir}/target/server0</param>
+                              <param>stop</param>
                            </args>
                         </configuration>
                      </execution>
@@ -90,5 +102,4 @@ under the License.
          </build>
       </profile>
    </profiles>
-
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic/src/main/java/org/apache/activemq/artemis/jms/example/TopicExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic/src/main/java/org/apache/activemq/artemis/jms/example/TopicExample.java b/examples/jms/topic/src/main/java/org/apache/activemq/artemis/jms/example/TopicExample.java
index 0564525..08ca057 100644
--- a/examples/jms/topic/src/main/java/org/apache/activemq/artemis/jms/example/TopicExample.java
+++ b/examples/jms/topic/src/main/java/org/apache/activemq/artemis/jms/example/TopicExample.java
@@ -25,20 +25,12 @@ import javax.jms.TextMessage;
 import javax.jms.Topic;
 import javax.naming.InitialContext;
 
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
 /**
  * A simple JMS Topic example that creates a producer and consumer on a queue and sends and receives a message.
  */
-public class TopicExample extends ActiveMQExample
+public class TopicExample
 {
-   public static void main(final String[] args)
-   {
-      new TopicExample().run(args);
-   }
-
-   @Override
-   public boolean runExample() throws Exception
+   public static void main(final String[] args) throws Exception
    {
       Connection connection = null;
       InitialContext initialContext = null;
@@ -88,8 +80,6 @@ public class TopicExample extends ActiveMQExample
          messageReceived = (TextMessage)messageConsumer2.receive();
 
          System.out.println("Consumer 2 Received message: " + messageReceived.getText());
-
-         return true;
       }
       finally
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/topic/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/topic/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/topic/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/topic/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic/src/main/resources/activemq/server0/broker.xml b/examples/jms/topic/src/main/resources/activemq/server0/broker.xml
index e7c1a14..f379d55 100644
--- a/examples/jms/topic/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/topic/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir}/server0/data/messaging/bindings</bindings-directory>
+      <bindings-directory>${data.dir:./data}/bindings</bindings-directory>
 
-      <journal-directory>${data.dir}/server0/data/messaging/journal</journal-directory>
+      <journal-directory>${data.dir:./data}/journal</journal-directory>
 
-      <large-messages-directory>${data.dir}/server0/data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>${data.dir:./data}/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir}/server0/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:./data}/paging</paging-directory>
 
       <!-- Acceptors -->
       <acceptors>
@@ -43,7 +43,6 @@ under the License.
       </acceptors>
 
       <!-- Other config -->
-
       <security-settings>
          <!--security for example topic-->
          <security-setting match="jms.topic.exampleTopic">

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/pom.xml b/examples/jms/transaction-failover/pom.xml
index f954478..0fe0ec8 100644
--- a/examples/jms/transaction-failover/pom.xml
+++ b/examples/jms/transaction-failover/pom.xml
@@ -37,8 +37,8 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>common</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-cli</artifactId>
          <version>${project.version}</version>
       </dependency>
       <dependency>
@@ -57,7 +57,7 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>create</id>
+                        <id>create0</id>
                         <goals>
                            <goal>create</goal>
                         </goals>
@@ -68,7 +68,7 @@ under the License.
                         </configuration>
                      </execution>
                      <execution>
-                        <id>create2</id>
+                        <id>create1</id>
                         <goals>
                            <goal>create</goal>
                         </goals>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/TransactionFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/TransactionFailoverExample.java b/examples/jms/transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/TransactionFailoverExample.java
index 4998649..119bdf8 100644
--- a/examples/jms/transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/TransactionFailoverExample.java
+++ b/examples/jms/transaction-failover/src/main/java/org/apache/activemq/artemis/jms/example/TransactionFailoverExample.java
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
+import org.apache.activemq.artemis.api.core.Message;
+import org.apache.activemq.artemis.util.ServerUtil;
+
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
@@ -26,30 +29,23 @@ import javax.jms.TextMessage;
 import javax.jms.TransactionRolledBackException;
 import javax.naming.InitialContext;
 
-import org.apache.activemq.artemis.api.core.Message;
-import org.apache.activemq.artemis.common.example.ActiveMQExample;
-
 /**
  * A simple example that demonstrates failover of the JMS connection from one node to another
  * when the live server crashes using a JMS <em>transacted</em> session.
  */
-public class TransactionFailoverExample extends ActiveMQExample
+public class TransactionFailoverExample
 {
-
-   public static void main(final String[] args)
-   {
-      new TransactionFailoverExample().run(args);
-   }
-
    // You need to guarantee uniqueIDs when using duplicate detection
    // It needs to be unique even after a restart
    // as these IDs are stored on the journal for control
    // We recommend some sort of UUID, but for this example the Current Time as string would be enough
-   String uniqueID = Long.toString(System.currentTimeMillis());
+   static String uniqueID = Long.toString(System.currentTimeMillis());
 
+   private static Process server0;
 
-   @Override
-   public boolean runExample() throws Exception
+   private static Process server1;
+
+   public static void main(final String[] args) throws Exception
    {
       final int numMessages = 10;
 
@@ -59,6 +55,9 @@ public class TransactionFailoverExample extends ActiveMQExample
 
       try
       {
+         server0 = ServerUtil.startServer(args[0], TransactionFailoverExample.class.getSimpleName() + "0", 0, 5000);
+         server1 = ServerUtil.startServer(args[1], TransactionFailoverExample.class.getSimpleName() + "1", 1, 5000);
+
          // Step 1. Get an initial context for looking up JNDI from the server #1
          initialContext = new InitialContext();
 
@@ -109,9 +108,7 @@ public class TransactionFailoverExample extends ActiveMQExample
 
             if (message0 == null)
             {
-               System.err.println("Example failed - message wasn't received");
-
-               return false;
+               throw new IllegalStateException("Example failed - message wasn't received");
             }
 
             System.out.println("Got message: " + message0.getText());
@@ -120,8 +117,6 @@ public class TransactionFailoverExample extends ActiveMQExample
          session.commit();
 
          System.out.println("Other message on the server? " + consumer.receive(5000));
-
-         return true;
       }
       finally
       {
@@ -136,10 +131,13 @@ public class TransactionFailoverExample extends ActiveMQExample
          {
             initialContext.close();
          }
+
+         ServerUtil.killServer(server0);
+         ServerUtil.killServer(server1);
       }
    }
 
-   private void sendMessages(final Session session,
+   private static void sendMessages(final Session session,
                              final MessageProducer producer,
                              final int numMessages,
                              final boolean killServer) throws Exception
@@ -161,8 +159,7 @@ public class TransactionFailoverExample extends ActiveMQExample
       {
          Thread.sleep(5000);
 
-         killServer(0);
-
+         ServerUtil.killServer(server0);
       }
 
       // We send the remaining half of messages
@@ -180,5 +177,4 @@ public class TransactionFailoverExample extends ActiveMQExample
          System.out.println("Sent message: " + message.getText());
       }
    }
-
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/transaction-failover/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/activemq/server0/broker.xml b/examples/jms/transaction-failover/src/main/resources/activemq/server0/broker.xml
index 74a66d4..916fdf5 100644
--- a/examples/jms/transaction-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/transaction-failover/src/main/resources/activemq/server0/broker.xml
@@ -29,17 +29,19 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>../../data/messaging/bindings</bindings-directory>
+      <bindings-directory>../data/bindings</bindings-directory>
 
-      <journal-directory>../../data/messaging/journal</journal-directory>
+      <journal-directory>../data/journal</journal-directory>
 
-      <large-messages-directory>../../data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>../data/largemessages</large-messages-directory>
 
-      <paging-directory>../../data/messaging/paging</paging-directory>
+      <paging-directory>../data/paging</paging-directory>
 
       <ha-policy>
          <shared-store>
-            <master/>
+            <master>
+               <failover-on-shutdown>true</failover-on-shutdown>
+            </master>
          </shared-store>
       </ha-policy>
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-roles.properties b/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-users.properties b/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/transaction-failover/src/main/resources/activemq/server1/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transaction-failover/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/activemq/server1/broker.xml b/examples/jms/transaction-failover/src/main/resources/activemq/server1/broker.xml
index 62e5154..055f04a 100644
--- a/examples/jms/transaction-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/jms/transaction-failover/src/main/resources/activemq/server1/broker.xml
@@ -29,17 +29,19 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>../../data/messaging/bindings</bindings-directory>
+      <bindings-directory>../data/bindings</bindings-directory>
 
-      <journal-directory>../../data/messaging/journal</journal-directory>
+      <journal-directory>../data/journal</journal-directory>
 
-      <large-messages-directory>../../data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>../data/largemessages</large-messages-directory>
 
-      <paging-directory>../../data/messaging/paging</paging-directory>
+      <paging-directory>../data/paging</paging-directory>
 
       <ha-policy>
          <shared-store>
-            <slave/>
+            <slave>
+               <failover-on-shutdown>true</failover-on-shutdown>
+            </slave>
          </shared-store>
       </ha-policy>
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/54d0d2b4/examples/jms/transactional/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transactional/pom.xml b/examples/jms/transactional/pom.xml
index 7461ed6..9029124 100644
--- a/examples/jms/transactional/pom.xml
+++ b/examples/jms/transactional/pom.xml
@@ -37,11 +37,6 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.activemq.examples.jms</groupId>
-         <artifactId>common</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-jms_2.0_spec</artifactId>
       </dependency>
@@ -61,9 +56,18 @@ under the License.
                         <goals>
                            <goal>create</goal>
                         </goals>
+                     </execution>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
                         <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <spawn>true</spawn>
+                           <testURI>tcp://localhost:61616</testURI>
+                           <args>
+                              <param>run</param>
+                           </args>
                         </configuration>
                      </execution>
                      <execution>
@@ -73,8 +77,16 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TransactionalExample</clientClass>
+                        </configuration>
+                     </execution>
+                     <execution>
+                        <id>stop</id>
+                        <goals>
+                           <goal>cli</goal>
+                        </goals>
+                        <configuration>
                            <args>
-                              <param>${basedir}/target/server0</param>
+                              <param>stop</param>
                            </args>
                         </configuration>
                      </execution>