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/08/12 05:47:05 UTC

[11/52] [abbrv] [partial] activemq-artemis git commit: This commit has improvements on the examples including:

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java b/examples/jms/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java
deleted file mode 100644
index 465a4e2..0000000
--- a/examples/jms/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java
+++ /dev/null
@@ -1,143 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/**
- * A simple JMS example that uses selectors with queue consumers.
- */
-public class QueueSelectorExample {
-
-   public static void main(final String[] args) throws Exception {
-      AtomicBoolean result = new AtomicBoolean(true);
-      Connection connection = null;
-      InitialContext initialContext = null;
-      try {
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
-         // Step 2. look-up the JMS queue object from JNDI
-         Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-
-         // Step 3. look-up the JMS connection factory object from JNDI
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 4. Create a JMS Connection
-         connection = cf.createConnection();
-
-         // Step 5. Start the connection
-         connection.start();
-
-         // Step 5. Create a JMS Session
-         Session senderSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-         // Step 6. Create a JMS Message Producer
-         MessageProducer producer = senderSession.createProducer(queue);
-
-         // Step 8. Prepare two selectors
-         String redSelector = "color='red'";
-         String greenSelector = "color='green'";
-
-         // Step 9. Create a JMS Message Consumer that receives 'red' messages
-         Session redSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer redConsumer = redSession.createConsumer(queue, redSelector);
-         redConsumer.setMessageListener(new SimpleMessageListener("red", result));
-
-         // Step 10. Create a second JMS message consumer that receives 'green' messages
-         Session greenSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer greenConsumer = greenSession.createConsumer(queue, greenSelector);
-         greenConsumer.setMessageListener(new SimpleMessageListener("green", result));
-
-         // Step 11. Create another JMS message consumer that receives any messages.
-         Session blankSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer anyConsumer = blankSession.createConsumer(queue);
-         anyConsumer.setMessageListener(new SimpleMessageListener("any", result));
-
-         // Step 12. Create three messages, each has a color property
-         TextMessage redMessage = senderSession.createTextMessage("Red");
-         redMessage.setStringProperty("color", "red");
-         TextMessage greenMessage = senderSession.createTextMessage("Green");
-         greenMessage.setStringProperty("color", "green");
-         TextMessage blueMessage = senderSession.createTextMessage("Blue");
-         blueMessage.setStringProperty("color", "blue");
-
-         // Step 13. Send the Messages
-         producer.send(redMessage);
-         System.out.println("Message sent: " + redMessage.getText());
-         producer.send(greenMessage);
-         System.out.println("Message sent: " + greenMessage.getText());
-         producer.send(blueMessage);
-         System.out.println("Message sent: " + blueMessage.getText());
-
-         Thread.sleep(5000);
-
-         if (!result.get())
-            throw new IllegalStateException();
-      }
-      finally {
-         // Step 12. Be sure to close our JMS resources!
-         if (initialContext != null) {
-            initialContext.close();
-         }
-         if (connection != null) {
-            connection.close();
-         }
-      }
-   }
-}
-
-class SimpleMessageListener implements MessageListener {
-
-   private final String name;
-   private AtomicBoolean result;
-
-   public SimpleMessageListener(final String listener, AtomicBoolean result) {
-      name = listener;
-      this.result = result;
-   }
-
-   public void onMessage(final Message msg) {
-      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("any")) {
-            result.set(false);
-         }
-      }
-      catch (JMSException e) {
-         e.printStackTrace();
-         result.set(false);
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/queue-selector/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue-selector/src/main/resources/jndi.properties b/examples/jms/queue-selector/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/jms/queue-selector/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue/pom.xml b/examples/jms/queue/pom.xml
deleted file mode 100644
index ba5e182..0000000
--- a/examples/jms/queue/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version='1.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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq.examples.jms</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>1.0.1-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>queue</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Queue Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <profiles>
-      <profile>
-         <!-- specify -PnoServer if you don't want to start the server -->
-         <id>noServer</id>
-         <properties>
-            <noServer>true</noServer>
-         </properties>
-      </profile>
-   </profiles>
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>start</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <spawn>true</spawn>
-                     <ignore>${noServer}</ignore>
-                     <testURI>tcp://localhost:61616</testURI>
-                     <args>
-                        <param>run</param>
-                     </args>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     <clientClass>org.apache.activemq.artemis.jms.example.QueueExample</clientClass>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <args>
-                        <param>stop</param>
-                     </args>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  <artifactId>queue</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-      </plugins>
-   </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/queue/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/queue/readme.html b/examples/jms/queue/readme.html
deleted file mode 100644
index 71d4a9b..0000000
--- a/examples/jms/queue/readme.html
+++ /dev/null
@@ -1,38 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis JMS Queue Example</title>
-    <link rel="stylesheet" type="text/css" href="../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../common/prettify.css" />
-    <script type="text/javascript" src="../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>JMS Queue Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
-     <p>This example shows you how to send and receive a message to a JMS Queue using ActiveMQ Artemis.</p>
-     <p>Queues are a standard part of JMS, please consult the JMS 1.1 specification for full details.</p>
-     <p>A Queue is used to send messages point to point, from a producer to a consumer. The queue guarantees message ordering between these 2 points.</p>
-     <p>Notice this example is using pretty much a default stock configuration</p>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java b/examples/jms/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java
deleted file mode 100644
index b6ce381..0000000
--- a/examples/jms/queue/src/main/java/org/apache/activemq/artemis/jms/example/QueueExample.java
+++ /dev/null
@@ -1,84 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-/**
- * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message.
- */
-public class QueueExample {
-
-   public static void main(final String[] args) throws Exception {
-      Connection connection = null;
-      InitialContext initialContext = null;
-      try {
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
-         // Step 2. Perfom a lookup on the queue
-         Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 4.Create a JMS Connection
-         connection = cf.createConnection();
-
-         // Step 5. Create a JMS Session
-         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-         // Step 6. Create a JMS Message Producer
-         MessageProducer producer = session.createProducer(queue);
-
-         // Step 7. Create a Text Message
-         TextMessage message = session.createTextMessage("This is a text message");
-
-         System.out.println("Sent message: " + message.getText());
-
-         // Step 8. Send the Message
-         producer.send(message);
-
-         // Step 9. Create a JMS Message Consumer
-         MessageConsumer messageConsumer = session.createConsumer(queue);
-
-         // Step 10. Start the Connection
-         connection.start();
-
-         // Step 11. Receive the message
-         TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-
-         System.out.println("Received message: " + messageReceived.getText());
-      }
-      finally {
-         // Step 12. Be sure to close our JMS resources!
-         if (initialContext != null) {
-            initialContext.close();
-         }
-         if (connection != null) {
-            connection.close();
-         }
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/queue/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/queue/src/main/resources/jndi.properties b/examples/jms/queue/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/jms/queue/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/reattach-node/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/pom.xml b/examples/jms/reattach-node/pom.xml
deleted file mode 100644
index cb0d5d3..0000000
--- a/examples/jms/reattach-node/pom.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version='1.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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq.examples.jms</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>1.0.1-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>reattach-node</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Reattach Node Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <profiles>
-      <profile>
-         <!-- specify -PnoServer if you don't want to start the server -->
-         <id>noServer</id>
-         <properties>
-            <noServer>true</noServer>
-         </properties>
-      </profile>
-   </profiles>
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <instance>${basedir}/target/server0</instance>
-                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>start</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <spawn>true</spawn>
-                     <testURI>tcp://localhost:61616</testURI>
-                     <args>
-                        <param>run</param>
-                     </args>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     <clientClass>org.apache.activemq.artemis.jms.example.ReattachExample</clientClass>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <args>
-                        <param>stop</param>
-                     </args>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  <artifactId>reattach-node</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-      </plugins>
-   </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/reattach-node/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/readme.html b/examples/jms/reattach-node/readme.html
deleted file mode 100644
index 3ed6a4a..0000000
--- a/examples/jms/reattach-node/readme.html
+++ /dev/null
@@ -1,55 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis JMS Automatic Reattach Example</title>
-    <link rel="stylesheet" type="text/css" href="../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../common/prettify.css" />
-    <script type="text/javascript" src="../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>JMS Reattach Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
-     <p>This example demonstrates how ActiveMQ Artemis connections can be configured to be resilient to
-     temporary network failures.</p>
-     <p>In the case of a network failure being detected, either as a result of a failure to read/write to the connection,
-     or the failure of a pong to arrive back from the server in good time after a ping is sent, instead of
-     failing the connection immediately and notifying any user ExceptionListener objects, ActiveMQ
-     can be configured to automatically retry the connection, and reattach to the server when it becomes
-     available again across the network.</p>
-     <p>When the client reattaches to the server it will be able to resume using its sessions and connections
-     where it left off</p>
-     <p>This is different to client reconnect as the sessions, consumers etc still exist on the server. With reconnect
-     The client recreates its sessions and consumers as needed.</p>
-    <p>This example starts a single server, connects to it and performs some JMS operations. We then
-     simulate failure of the network connection by temporarily stopping the network acceptor on the server.
-     (This is done by sending management messages, but that is not central to the purpose of the example).</p>
-     <p>We then wait a few seconds, then restart the acceptor. The client reattaches and the session resumes
-     as if nothing happened.</p>
-     <p>The JMS Connection Factory is configured to reattach automatically by specifying the various reconnect
-     related attributes in the <code>activemq-jms.xml</code> file.</p>
-
-     <p>For more details on how to configure this and for clustering in general
-     please consult the ActiveMQ Artemis user manual.</p>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java b/examples/jms/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java
deleted file mode 100644
index 459c33b..0000000
--- a/examples/jms/reattach-node/src/main/java/org/apache/activemq/artemis/jms/example/ReattachExample.java
+++ /dev/null
@@ -1,150 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.api.jms.management.JMSManagementHelper;
-import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
-
-/**
- * This examples demonstrates a connection created to a server. Failure of the network connection is then simulated
- *
- * The network is brought back up and the client reconnects and resumes transparently.
- */
-public class ReattachExample {
-
-   public static void main(final String[] args) throws Exception {
-      Connection connection = null;
-      InitialContext initialContext = null;
-
-      try {
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
-         // Step 2. Perform a lookup on the queue
-         Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 4. Create a JMS Connection
-         connection = cf.createConnection();
-
-         // Step 5. Create a JMS Session
-         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-         // Step 6. Create a JMS Message Producer
-         MessageProducer producer = session.createProducer(queue);
-
-         // Step 7. Create a Text Message
-         TextMessage message = session.createTextMessage("This is a text message");
-
-         System.out.println("Sent message: " + message.getText());
-
-         // Step 8. Send the Message
-         producer.send(message);
-
-         // Step 9. Create a JMS Message Consumer
-         MessageConsumer messageConsumer = session.createConsumer(queue);
-
-         // Step 10. Start the Connection
-         connection.start();
-
-         // Step 11. To simulate a temporary problem on the network, we stop the remoting acceptor on the
-         // server which will close all connections
-         stopAcceptor();
-
-         System.out.println("Acceptor now stopped, will wait for 10 seconds. This simulates the network connection failing for a while");
-
-         // Step 12. Wait a while then restart the acceptor
-         Thread.sleep(10000);
-
-         System.out.println("Re-starting acceptor");
-
-         startAcceptor();
-
-         System.out.println("Restarted acceptor. The client will now reconnect.");
-
-         // Step 13. We receive the message
-         TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-
-         System.out.println("Received message: " + messageReceived.getText());
-      }
-      finally {
-         // Step 14. Be sure to close our JMS resources!
-         if (initialContext != null) {
-            initialContext.close();
-         }
-
-         if (connection != null) {
-            connection.close();
-         }
-      }
-   }
-
-   private static void stopAcceptor() throws Exception {
-      stopStartAcceptor(true);
-   }
-
-   private static void startAcceptor() throws Exception {
-      stopStartAcceptor(false);
-   }
-
-   // To do this we send a management message to close the acceptor, we do this on a different
-   // connection factory which uses a different remoting connection so we can still send messages
-   // when the main connection has been stopped
-   private static void stopStartAcceptor(final boolean stop) throws Exception {
-      ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61617");
-
-      Connection connection = null;
-      try {
-         connection = cf.createConnection();
-
-         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-         Queue managementQueue = ActiveMQJMSClient.createQueue("activemq.management");
-
-         MessageProducer producer = session.createProducer(managementQueue);
-
-         connection.start();
-
-         Message m = session.createMessage();
-
-         String oper = stop ? "stop" : "start";
-
-         JMSManagementHelper.putOperationInvocation(m, "core.acceptor.netty-acceptor", oper);
-
-         producer.send(m);
-      }
-      finally {
-         if (connection != null) {
-            connection.close();
-         }
-      }
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/reattach-node/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/reattach-node/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index d82bc7e..0000000
--- a/examples/jms/reattach-node/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,admin
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/reattach-node/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/reattach-node/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/jms/reattach-node/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/21bf4406/examples/jms/reattach-node/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/src/main/resources/activemq/server0/broker.xml b/examples/jms/reattach-node/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 07e09bb..0000000
--- a/examples/jms/reattach-node/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version='1.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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xmlns="urn:activemq"
-               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
-   <jms xmlns="urn:activemq:jms">
-      <!--the queue used by the example-->
-      <queue name="exampleQueue"/>
-   </jms>
-
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/bindings</bindings-directory>
-
-      <journal-directory>./data/journal</journal-directory>
-
-      <large-messages-directory>./data/largemessages</large-messages-directory>
-
-      <paging-directory>./data/paging</paging-directory>
-
-      <!-- Connectors -->
-
-      <connectors>
-         <connector name="netty-connector">tcp://localhost:61616</connector>
-
-         <!-- We just use this connector so we can send management operations while the other acceptor
-         is stopped -->
-         <connector name="netty-connector2">tcp://localhost:61617</connector>
-      </connectors>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-
-         <!-- We just use this acceptor so we can send management operations while the other acceptor
-         is stopped -->
-         <acceptor name="netty-acceptor2">tcp://localhost:61617</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-setting match="jms.queue.activemq.management">
-            <!--  only the admin role can interact with the management address  -->
-            <permission type="consume" roles="admin"/>
-            <permission type="send" roles="admin"/>
-            <permission type="manage" roles="admin"/>
-         </security-setting>
-      </security-settings>
-
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/reattach-node/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/src/main/resources/jndi.properties b/examples/jms/reattach-node/src/main/resources/jndi.properties
deleted file mode 100644
index b6f8ff8..0000000
--- a/examples/jms/reattach-node/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616?retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1&failoverOnServerShutdown=true&confirmationWindowSize=1048576
-queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback-static/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/pom.xml b/examples/jms/replicated-failback-static/pom.xml
deleted file mode 100644
index a19dec5..0000000
--- a/examples/jms/replicated-failback-static/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version='1.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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq.examples.jms</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>1.0.1-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>replicated-failback-static</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Replicated Failback Static Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-cli</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create0</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <instance>${basedir}/target/server0</instance>
-                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
-                     <javaOptions>-Dudp-address=${udp-address}</javaOptions>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>create1</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <instance>${basedir}/target/server1</instance>
-                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
-                     <javaOptions>-Dudp-address=${udp-address}</javaOptions>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     <clientClass>org.apache.activemq.artemis.jms.example.ReplicatedFailbackStaticExample</clientClass>
-                     <args>
-                        <param>${basedir}/target/server0</param>
-                        <param>${basedir}/target/server1</param>
-                     </args>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  <artifactId>replicated-failback-static</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-      </plugins>
-   </build>
-</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback-static/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/readme.html b/examples/jms/replicated-failback-static/readme.html
deleted file mode 100644
index a3cf681..0000000
--- a/examples/jms/replicated-failback-static/readme.html
+++ /dev/null
@@ -1,38 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis JMS Failback using Static selectors Example</title>
-    <link rel="stylesheet" type="text/css" href="../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../common/prettify.css" />
-    <script type="text/javascript" src="../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>JMS Multiple Failover using Replication Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory.</pre>
-
-     <p>This example demonstrates three servers coupled as a live-backup-backup group for high availability (HA) using replication, and a client
-     connection failing over from live to backup when the live server is crashed and then to the second backup once the new live fails.</p>
-
-     <p>For more information on ActiveMQ Artemis failover and HA, and clustering in general, please see the clustering
-     section of the user manual.</p>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackStaticExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackStaticExample.java b/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackStaticExample.java
deleted file mode 100644
index d2f74ba..0000000
--- a/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackStaticExample.java
+++ /dev/null
@@ -1,149 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import org.apache.activemq.artemis.util.ServerUtil;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-/**
- * Example of live and replicating backup pair.
- * <p>
- * After both servers are started, the live server is killed and the backup becomes active ("fails-over").
- * <p>
- * Later the live server is restarted and takes back its position by asking the backup to stop ("fail-back").
- */
-public class ReplicatedFailbackStaticExample {
-
-   private static Process server0;
-
-   private static Process server1;
-
-   public static void main(final String[] args) throws Exception {
-      final int numMessages = 30;
-
-      Connection connection = null;
-
-      InitialContext initialContext = null;
-
-      try {
-         server0 = ServerUtil.startServer(args[0], ReplicatedFailbackStaticExample.class.getSimpleName() + "0", 0, 30000);
-         server1 = ServerUtil.startServer(args[1], ReplicatedFailbackStaticExample.class.getSimpleName() + "1", 1, 10000);
-
-         // Step 1. Get an initial context for looking up JNDI from the server #1
-         initialContext = new InitialContext();
-
-         // Step 2. Look up the JMS resources from JNDI
-         Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-         ConnectionFactory connectionFactory = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 3. Create a JMS Connection
-         connection = connectionFactory.createConnection();
-
-         // Step 4. Create a *non-transacted* JMS Session with client acknowledgement
-         Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-         // Step 5. Start the connection to ensure delivery occurs
-         connection.start();
-
-         // Step 6. Create a JMS MessageProducer and a MessageConsumer
-         MessageProducer producer = session.createProducer(queue);
-         MessageConsumer consumer = session.createConsumer(queue);
-
-         // Step 7. Send some messages to server #1, the live server
-         for (int i = 0; i < numMessages; i++) {
-            TextMessage message = session.createTextMessage("This is text message " + i);
-            producer.send(message);
-            System.out.println("Sent message: " + message.getText());
-         }
-
-         // Step 8. Receive and acknowledge a third of the sent messages
-         TextMessage message0 = null;
-         for (int i = 0; i < numMessages / 3; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.println("Got message: " + message0.getText());
-         }
-         message0.acknowledge();
-
-         // Step 9. Receive the rest third of the sent messages but *do not* acknowledge them yet
-         for (int i = numMessages / 3; i < numMessages; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.println("Got message: " + message0.getText());
-         }
-
-         // Step 10. Crash server #0, the live server, and wait a little while to make sure
-         // it has really crashed
-         ServerUtil.killServer(server0);
-
-         // Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
-         // backup server has occurred
-         try {
-            message0.acknowledge();
-         }
-         catch (JMSException e) {
-            System.out.println("Got (the expected) exception while acknowledging message: " + e.getMessage());
-         }
-
-         // Step 12. Consume again the 2nd third of the messages again. Note that they are not considered as redelivered.
-         for (int i = numMessages / 3; i < (numMessages / 3) * 2; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.printf("Got message: %s (redelivered?: %s)\n", message0.getText(), message0.getJMSRedelivered());
-         }
-         message0.acknowledge();
-
-         server0 = ServerUtil.startServer(args[0], ReplicatedFailbackStaticExample.class.getSimpleName() + "0", 0, 10000);
-
-         // Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
-         // backup server has occurred
-         try {
-            message0.acknowledge();
-         }
-         catch (JMSException e) {
-            System.err.println("Got exception while acknowledging message: " + e.getMessage());
-         }
-
-         // Step 12. Consume again the 2nd third of the messages again. Note that they are not considered as redelivered.
-         for (int i = (numMessages / 3) * 2; i < numMessages; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.printf("Got message: %s (redelivered?: %s)\n", message0.getText(), message0.getJMSRedelivered());
-         }
-         message0.acknowledge();
-      }
-      finally {
-         // Step 13. Be sure to close our resources!
-
-         if (connection != null) {
-            connection.close();
-         }
-
-         if (initialContext != null) {
-            initialContext.close();
-         }
-
-         ServerUtil.killServer(server0);
-         ServerUtil.killServer(server1);
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback-static/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/activemq/server0/broker.xml b/examples/jms/replicated-failback-static/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index f6fa349..0000000
--- a/examples/jms/replicated-failback-static/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version='1.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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xmlns="urn:activemq"
-               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
-   <jms xmlns="urn:activemq:jms">
-      <!--the queue used by the example-->
-      <queue name="exampleQueue"/>
-   </jms>
-
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/bindings</bindings-directory>
-
-      <journal-directory>./data/journal</journal-directory>
-
-      <large-messages-directory>./data/largemessages</large-messages-directory>
-
-      <paging-directory>./data/paging</paging-directory>
-
-      <cluster-user>exampleUser</cluster-user>
-
-      <cluster-password>secret</cluster-password>
-
-      <ha-policy>
-         <replication>
-            <master>
-               <!--we need this for auto failback-->
-               <check-for-live-server>true</check-for-live-server>
-            </master>
-         </replication>
-      </ha-policy>
-
-      <connectors>
-         <connector name="netty-connector">tcp://localhost:61616</connector>
-         <connector name="netty-backup-connector">tcp://localhost:61617</connector>
-      </connectors>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-      </acceptors>
-
-      <cluster-connections>
-         <cluster-connection name="my-cluster">
-            <address>jms</address>
-            <connector-ref>netty-connector</connector-ref>
-            <static-connectors>
-               <connector-ref>netty-backup-connector</connector-ref>
-            </static-connectors>
-         </cluster-connection>
-      </cluster-connections>
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
-            <permission type="createDurableQueue" roles="guest"/>
-            <permission type="deleteDurableQueue" roles="guest"/>
-            <permission type="createNonDurableQueue" roles="guest"/>
-            <permission type="deleteNonDurableQueue" roles="guest"/>
-            <permission type="consume" roles="guest"/>
-            <permission type="send" roles="guest"/>
-         </security-setting>
-      </security-settings>
-
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback-static/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/activemq/server1/broker.xml b/examples/jms/replicated-failback-static/src/main/resources/activemq/server1/broker.xml
deleted file mode 100644
index 9b89d80..0000000
--- a/examples/jms/replicated-failback-static/src/main/resources/activemq/server1/broker.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version='1.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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xmlns="urn:activemq"
-               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
-   <jms xmlns="urn:activemq:jms">
-      <!--the queue used by the example-->
-      <queue name="exampleQueue"/>
-   </jms>
-
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/bindings</bindings-directory>
-
-      <journal-directory>./data/journal</journal-directory>
-
-      <large-messages-directory>./data/largemessages</large-messages-directory>
-
-      <paging-directory>./data/paging</paging-directory>
-
-      <cluster-user>exampleUser</cluster-user>
-
-      <cluster-password>secret</cluster-password>
-
-      <ha-policy>
-         <replication>
-            <slave>
-               <allow-failback>true</allow-failback>
-               <!-- not needed but tells the backup not to restart after failback as there will be > 0 backups saved -->
-               <max-saved-replicated-journals-size>0</max-saved-replicated-journals-size>
-            </slave>
-         </replication>
-      </ha-policy>
-
-      <!-- Connectors -->
-      <connectors>
-         <connector name="netty-live-connector">tcp://localhost:61616</connector>
-         <connector name="netty-connector">tcp://localhost:61617</connector>
-      </connectors>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
-      </acceptors>
-
-      <cluster-connections>
-         <cluster-connection name="my-cluster">
-            <address>jms</address>
-            <connector-ref>netty-connector</connector-ref>
-            <static-connectors>
-               <connector-ref>netty-live-connector</connector-ref>
-            </static-connectors>
-         </cluster-connection>
-      </cluster-connections>
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
-            <permission type="createDurableQueue" roles="guest"/>
-            <permission type="deleteDurableQueue" roles="guest"/>
-            <permission type="createNonDurableQueue" roles="guest"/>
-            <permission type="deleteNonDurableQueue" roles="guest"/>
-            <permission type="consume" roles="guest"/>
-            <permission type="send" roles="guest"/>
-         </security-setting>
-      </security-settings>
-
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback-static/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/jndi.properties b/examples/jms/replicated-failback-static/src/main/resources/jndi.properties
deleted file mode 100644
index 7f7a19f..0000000
--- a/examples/jms/replicated-failback-static/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1
-queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/pom.xml b/examples/jms/replicated-failback/pom.xml
deleted file mode 100644
index 9cfdbc5..0000000
--- a/examples/jms/replicated-failback/pom.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version='1.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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq.examples.jms</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>1.0.1-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>replicated-failback</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Replicated Failback Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-cli</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create0</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <instance>${basedir}/target/server0</instance>
-                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
-                     <javaOptions>-Dudp-address=${udp-address}</javaOptions>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>create1</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <instance>${basedir}/target/server1</instance>
-                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
-                     <javaOptions>-Dudp-address=${udp-address}</javaOptions>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     <clientClass>org.apache.activemq.artemis.jms.example.ReplicatedFailbackExample</clientClass>
-                     <args>
-                        <param>${basedir}/target/server0</param>
-                        <param>${basedir}/target/server1</param>
-                     </args>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.jms</groupId>
-                  <artifactId>replicated-failback</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-      </plugins>
-   </build>
-</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/readme.html b/examples/jms/replicated-failback/readme.html
deleted file mode 100644
index aaf90eb..0000000
--- a/examples/jms/replicated-failback/readme.html
+++ /dev/null
@@ -1,38 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis JMS Multiple Failover using Replication Example</title>
-    <link rel="stylesheet" type="text/css" href="../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../common/prettify.css" />
-    <script type="text/javascript" src="../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>JMS Multiple Failover using Replication Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory.</pre>
-
-     <p>This example demonstrates three servers coupled as a live-backup-backup group for high availability (HA) using replication, and a client
-     connection failing over from live to backup when the live server is crashed and then to the second backup once the new live fails.</p>
-
-     <p>For more information on ActiveMQ Artemis failover and HA, and clustering in general, please see the clustering
-     section of the user manual.</p>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java
deleted file mode 100644
index 29ae381..0000000
--- a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/artemis/jms/example/ReplicatedFailbackExample.java
+++ /dev/null
@@ -1,149 +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.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import org.apache.activemq.artemis.util.ServerUtil;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-/**
- * Example of live and replicating backup pair.
- * <p>
- * After both servers are started, the live server is killed and the backup becomes active ("fails-over").
- * <p>
- * Later the live server is restarted and takes back its position by asking the backup to stop ("fail-back").
- */
-public class ReplicatedFailbackExample {
-
-   private static Process server0;
-
-   private static Process server1;
-
-   public static void main(final String[] args) throws Exception {
-      final int numMessages = 30;
-
-      Connection connection = null;
-
-      InitialContext initialContext = null;
-
-      try {
-         server0 = ServerUtil.startServer(args[0], ReplicatedFailbackExample.class.getSimpleName() + "0", 0, 30000);
-         server1 = ServerUtil.startServer(args[1], ReplicatedFailbackExample.class.getSimpleName() + "1", 1, 10000);
-
-         // Step 1. Get an initial context for looking up JNDI from the server #1
-         initialContext = new InitialContext();
-
-         // Step 2. Look up the JMS resources from JNDI
-         Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
-         ConnectionFactory connectionFactory = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 3. Create a JMS Connection
-         connection = connectionFactory.createConnection();
-
-         // Step 4. Create a *non-transacted* JMS Session with client acknowledgement
-         Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-         // Step 5. Start the connection to ensure delivery occurs
-         connection.start();
-
-         // Step 6. Create a JMS MessageProducer and a MessageConsumer
-         MessageProducer producer = session.createProducer(queue);
-         MessageConsumer consumer = session.createConsumer(queue);
-
-         // Step 7. Send some messages to server #1, the live server
-         for (int i = 0; i < numMessages; i++) {
-            TextMessage message = session.createTextMessage("This is text message " + i);
-            producer.send(message);
-            System.out.println("Sent message: " + message.getText());
-         }
-
-         // Step 8. Receive and acknowledge a third of the sent messages
-         TextMessage message0 = null;
-         for (int i = 0; i < numMessages / 3; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.println("Got message: " + message0.getText());
-         }
-         message0.acknowledge();
-
-         // Step 9. Receive the rest third of the sent messages but *do not* acknowledge them yet
-         for (int i = numMessages / 3; i < numMessages; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.println("Got message: " + message0.getText());
-         }
-
-         // Step 10. Crash server #0, the live server, and wait a little while to make sure
-         // it has really crashed
-         ServerUtil.killServer(server0);
-
-         // Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
-         // backup server has occurred
-         try {
-            message0.acknowledge();
-         }
-         catch (JMSException e) {
-            System.out.println("Got (the expected) exception while acknowledging message: " + e.getMessage());
-         }
-
-         // Step 12. Consume again the 2nd third of the messages again. Note that they are not considered as redelivered.
-         for (int i = numMessages / 3; i < (numMessages / 3) * 2; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.printf("Got message: %s (redelivered?: %s)\n", message0.getText(), message0.getJMSRedelivered());
-         }
-         message0.acknowledge();
-
-         server0 = ServerUtil.startServer(args[0], ReplicatedFailbackExample.class.getSimpleName() + "0", 0, 10000);
-
-         // Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
-         // backup server has occurred
-         try {
-            message0.acknowledge();
-         }
-         catch (JMSException e) {
-            System.err.println("Got exception while acknowledging message: " + e.getMessage());
-         }
-
-         // Step 12. Consume again the 2nd third of the messages again. Note that they are not considered as redelivered.
-         for (int i = (numMessages / 3) * 2; i < numMessages; i++) {
-            message0 = (TextMessage) consumer.receive(5000);
-            System.out.printf("Got message: %s (redelivered?: %s)\n", message0.getText(), message0.getJMSRedelivered());
-         }
-         message0.acknowledge();
-      }
-      finally {
-         // Step 13. Be sure to close our resources!
-
-         if (connection != null) {
-            connection.close();
-         }
-
-         if (initialContext != null) {
-            initialContext.close();
-         }
-
-         ServerUtil.killServer(server0);
-         ServerUtil.killServer(server1);
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index c7f4783..0000000
--- a/examples/jms/replicated-failback/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version='1.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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xmlns="urn:activemq"
-               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
-   <jms xmlns="urn:activemq:jms">
-      <!--the queue used by the example-->
-      <queue name="exampleQueue"/>
-   </jms>
-
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/bindings</bindings-directory>
-
-      <journal-directory>./data/journal</journal-directory>
-
-      <large-messages-directory>./data/largemessages</large-messages-directory>
-
-      <paging-directory>./data/paging</paging-directory>
-
-      <cluster-user>exampleUser</cluster-user>
-
-      <cluster-password>secret</cluster-password>
-
-      <ha-policy>
-         <replication>
-            <master>
-               <!--we need this for auto failback-->
-               <check-for-live-server>true</check-for-live-server>
-            </master>
-         </replication>
-      </ha-policy>
-
-      <connectors>
-         <connector name="netty-connector">tcp://localhost:61616</connector>
-      </connectors>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-      </acceptors>
-
-      <broadcast-groups>
-         <broadcast-group name="bg-group1">
-            <group-address>${udp-address:231.7.7.7}</group-address>
-            <group-port>9876</group-port>
-            <broadcast-period>1000</broadcast-period>
-            <connector-ref>netty-connector</connector-ref>
-         </broadcast-group>
-      </broadcast-groups>
-
-      <discovery-groups>
-         <discovery-group name="dg-group1">
-            <group-address>${udp-address:231.7.7.7}</group-address>
-            <group-port>9876</group-port>
-            <refresh-timeout>5000</refresh-timeout>
-         </discovery-group>
-      </discovery-groups>
-
-      <cluster-connections>
-         <cluster-connection name="my-cluster">
-            <address>jms</address>
-            <connector-ref>netty-connector</connector-ref>
-            <discovery-group-ref discovery-group-name="dg-group1"/>
-         </cluster-connection>
-      </cluster-connections>
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
-            <permission type="createDurableQueue" roles="guest"/>
-            <permission type="deleteDurableQueue" roles="guest"/>
-            <permission type="createNonDurableQueue" roles="guest"/>
-            <permission type="deleteNonDurableQueue" roles="guest"/>
-            <permission type="consume" roles="guest"/>
-            <permission type="send" roles="guest"/>
-         </security-setting>
-      </security-settings>
-
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml b/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml
deleted file mode 100644
index da5a656..0000000
--- a/examples/jms/replicated-failback/src/main/resources/activemq/server1/broker.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version='1.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.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xmlns="urn:activemq"
-               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
-   <jms xmlns="urn:activemq:jms">
-      <!--the queue used by the example-->
-      <queue name="exampleQueue"/>
-   </jms>
-
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/bindings</bindings-directory>
-
-      <journal-directory>./data/journal</journal-directory>
-
-      <large-messages-directory>./data/largemessages</large-messages-directory>
-
-      <paging-directory>./data/paging</paging-directory>
-
-      <cluster-user>exampleUser</cluster-user>
-
-      <cluster-password>secret</cluster-password>
-
-      <ha-policy>
-         <replication>
-            <slave>
-               <allow-failback>true</allow-failback>
-            </slave>
-         </replication>
-      </ha-policy>
-
-      <!-- Connectors -->
-      <connectors>
-         <connector name="netty-live-connector">tcp://localhost:61616</connector>
-         <connector name="netty-connector">tcp://localhost:61617</connector>
-      </connectors>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
-      </acceptors>
-
-      <broadcast-groups>
-         <broadcast-group name="bg-group1">
-            <group-address>${udp-address:231.7.7.7}</group-address>
-            <group-port>9876</group-port>
-            <broadcast-period>1000</broadcast-period>
-            <connector-ref>netty-connector</connector-ref>
-         </broadcast-group>
-      </broadcast-groups>
-
-      <discovery-groups>
-         <discovery-group name="dg-group1">
-            <group-address>${udp-address:231.7.7.7}</group-address>
-            <group-port>9876</group-port>
-            <refresh-timeout>5000</refresh-timeout>
-         </discovery-group>
-      </discovery-groups>
-
-      <cluster-connections>
-         <cluster-connection name="my-cluster">
-            <address>jms</address>
-            <connector-ref>netty-connector</connector-ref>
-            <discovery-group-ref discovery-group-name="dg-group1"/>
-         </cluster-connection>
-      </cluster-connections>
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
-            <permission type="createDurableQueue" roles="guest"/>
-            <permission type="deleteDurableQueue" roles="guest"/>
-            <permission type="createNonDurableQueue" roles="guest"/>
-            <permission type="deleteNonDurableQueue" roles="guest"/>
-            <permission type="consume" roles="guest"/>
-            <permission type="send" roles="guest"/>
-         </security-setting>
-      </security-settings>
-
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/jms/replicated-failback/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/jndi.properties b/examples/jms/replicated-failback/src/main/resources/jndi.properties
deleted file mode 100644
index 7f7a19f..0000000
--- a/examples/jms/replicated-failback/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1
-queue.queue/exampleQueue=exampleQueue