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 2018/03/01 21:23:04 UTC

[7/9] activemq-artemis git commit: NO-JIRA fix-up examples

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java b/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java
new file mode 100644
index 0000000..8c5d327
--- /dev/null
+++ b/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java
@@ -0,0 +1,173 @@
+/*
+ * 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.naming.InitialContext;
+import java.util.Hashtable;
+
+/**
+ * This example demonstrates a core bridge set-up between two nodes, consuming messages from a queue
+ * on one node and forwarding them to an address on the second node.
+ */
+public class BridgeExample {
+
+   public static void main(final String[] args) throws Exception {
+      Connection connection0 = null;
+
+      Connection connection1 = null;
+
+      InitialContext ic0 = null;
+
+      InitialContext ic1 = null;
+
+      try {
+         // Step 1 - we create an initial context for looking up JNDI on node 0
+
+         Hashtable<String, Object> properties = new Hashtable<>();
+         properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
+         properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:61616");
+         properties.put("queue.queue/sausage-factory", "sausage-factory");
+         ic0 = new InitialContext(properties);
+
+         // Step 2 - we look up the sausage-factory queue from node 0
+
+         Queue sausageFactory = (Queue) ic0.lookup("queue/sausage-factory");
+
+         // Step 3 - we look up a JMS ConnectionFactory object from node 0
+
+         ConnectionFactory cf0 = (ConnectionFactory) ic0.lookup("ConnectionFactory");
+
+         // Step 4 - we create an initial context for looking up JNDI on node 1
+
+         properties = new Hashtable<>();
+         properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
+         properties.put("connectionFactory.ConnectionFactory", "tcp://127.0.0.1:61617");
+         properties.put("queue.queue/mincing-machine", "mincing-machine");
+         ic1 = new InitialContext(properties);
+
+         // Step 5 - we look up the mincing-machine queue on node 1
+
+         Queue mincingMachine = (Queue) ic1.lookup("queue/mincing-machine");
+
+         // Step 6 - we look up a JMS ConnectionFactory object from node 1
+
+         ConnectionFactory cf1 = (ConnectionFactory) ic1.lookup("ConnectionFactory");
+
+         // Step 7. We create a JMS Connection connection0 which is a connection to server 0
+
+         connection0 = cf0.createConnection();
+
+         // Step 8. We create a JMS Connection connection1 which is a connection to server 1
+         connection1 = cf1.createConnection();
+
+         // Step 9. We create a JMS Session on server 0
+
+         Session session0 = connection0.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         // Step 10. We create a JMS Session on server 1
+
+         Session session1 = connection1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         // Step 10. We start the connection to ensure delivery occurs on them
+
+         connection1.start();
+
+         // Step 11. We create JMS MessageConsumer object
+         MessageConsumer consumer = session1.createConsumer(mincingMachine);
+
+         // Step 12. We create a JMS MessageProducer object on server 0
+         MessageProducer producer = session0.createProducer(sausageFactory);
+
+         // Step 13. We create and send a message representing an aardvark with a green hat to the sausage-factory
+         // on node 0
+         Message message = session0.createMessage();
+
+         message.setStringProperty("name", "aardvark");
+
+         message.setStringProperty("hat", "green");
+
+         producer.send(message);
+
+         System.out.println("Sent " + message.getStringProperty("name") +
+                               " message with " +
+                               message.getStringProperty("hat") +
+                               " hat to sausage-factory on node 0");
+
+         // Step 14 - we successfully receive the aardvark message from the mincing-machine one node 1. The aardvark's
+         // hat is now blue since it has been transformed!
+
+         Message receivedMessage = consumer.receive(5000);
+
+         System.out.println("Received " + receivedMessage.getStringProperty("name") +
+                               " message with " +
+                               receivedMessage.getStringProperty("hat") +
+                               " hat from mincing-machine on node 1");
+
+         // Step 13. We create and send another message, this time representing a sasquatch with a mauve hat to the
+         // sausage-factory on node 0. This won't be bridged to the mincing-machine since we only want aardvarks, not
+         // sasquatches
+
+         message = session0.createMessage();
+
+         message.setStringProperty("name", "sasquatch");
+
+         message.setStringProperty("hat", "mauve");
+
+         producer.send(message);
+
+         System.out.println("Sent " + message.getStringProperty("name") +
+                               " message with " +
+                               message.getStringProperty("hat") +
+                               " hat to sausage-factory on node 0");
+
+         // Step 14. We don't receive the message since it has not been bridged.
+
+         receivedMessage = consumer.receive(1000);
+
+         if (receivedMessage == null) {
+            System.out.println("Didn't receive that message from mincing-machine on node 1");
+         } else {
+            throw new IllegalStateException();
+         }
+      } finally {
+         // Step 15. Be sure to close our resources!
+
+         if (connection0 != null) {
+            connection0.close();
+         }
+
+         if (connection1 != null) {
+            connection1.close();
+         }
+
+         if (ic0 != null) {
+            ic0.close();
+         }
+
+         if (ic1 != null) {
+            ic1.close();
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java b/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java
new file mode 100644
index 0000000..f8ba25a
--- /dev/null
+++ b/examples/features/standard/core-bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java
@@ -0,0 +1,39 @@
+/*
+ * 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.api.core.Message;
+import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.server.transformer.Transformer;
+
+public class HatColourChangeTransformer implements Transformer {
+
+   @Override
+   public Message transform(final Message message) {
+      SimpleString propName = new SimpleString("hat");
+
+      SimpleString oldProp = message.getSimpleStringProperty(propName);
+
+      // System.out.println("Old hat colour is " + oldProp);
+
+      // Change the colour
+      message.putStringProperty(propName, new SimpleString("blue"));
+
+      return message;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/core-bridge/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/core-bridge/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/core-bridge/src/main/resources/activemq/server0/broker.xml
new file mode 100644
index 0000000..50471ba
--- /dev/null
+++ b/examples/features/standard/core-bridge/src/main/resources/activemq/server0/broker.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+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="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
+   
+
+   <core xmlns="urn:activemq:core">
+
+      <bindings-directory>./data/messaging/bindings</bindings-directory>
+
+      <journal-directory>./data/messaging/journal</journal-directory>
+
+      <large-messages-directory>./data/messaging/largemessages</large-messages-directory>
+
+      <paging-directory>./data/messaging/paging</paging-directory>
+
+      <!-- Connectors -->
+      <connectors>
+         <!-- Connector to the other node -->
+         <connector name="remote-connector">tcp://localhost:61617</connector>
+      </connectors>
+
+      <!-- Acceptors -->
+      <acceptors>
+         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
+      </acceptors>
+
+      <!-- We need to create a core queue for the JMS queue explicitly because the bridge will be deployed
+      before the JMS queue is deployed, so the first time, it otherwise won't find the queue -->
+      
+
+      <!-- We set-up a bridge that forwards from a queue on this node to an address on another node.
+      We specify a filter with the bridge, and a transformer too. The filter and transformer are optional -->
+      <bridges>
+         <bridge name="my-bridge">
+            <queue-name>sausage-factory</queue-name>
+            <forwarding-address>mincing-machine</forwarding-address>
+            <filter string="name='aardvark'"/>
+            <transformer-class-name>org.apache.activemq.artemis.jms.example.HatColourChangeTransformer</transformer-class-name>
+            <reconnect-attempts>-1</reconnect-attempts>
+            <static-connectors>
+               <connector-ref>remote-connector</connector-ref>
+            </static-connectors>
+         </bridge>
+      </bridges>
+
+      <!-- Other config -->
+
+      <security-settings>
+         <!--security for example queue-->
+         <security-setting match="#">
+            <permission roles="guest" type="createDurableQueue"/>
+            <permission roles="guest" type="deleteDurableQueue"/>
+            <permission roles="guest" type="createNonDurableQueue"/>
+            <permission roles="guest" type="deleteNonDurableQueue"/>
+            <permission roles="guest" type="consume"/>
+            <permission roles="guest" type="send"/>
+         </security-setting>
+      </security-settings>
+      <addresses>
+         <address name="sausage-factory">
+            <anycast>
+               <queue name="sausage-factory"/>
+            </anycast>
+         </address>
+      </addresses>
+   </core>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/core-bridge/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/core-bridge/src/main/resources/activemq/server1/broker.xml b/examples/features/standard/core-bridge/src/main/resources/activemq/server1/broker.xml
new file mode 100644
index 0000000..c260d7c
--- /dev/null
+++ b/examples/features/standard/core-bridge/src/main/resources/activemq/server1/broker.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+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="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">   <core xmlns="urn:activemq:core">
+
+      <bindings-directory>./data/messaging/bindings</bindings-directory>
+
+      <journal-directory>./data/messaging/journal</journal-directory>
+
+      <large-messages-directory>./data/messaging/largemessages</large-messages-directory>
+
+      <paging-directory>./data/messaging/paging</paging-directory>
+
+      <!-- Acceptors -->
+      <acceptors>
+         <acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
+      </acceptors>
+
+      <!-- Other config -->
+
+      <security-settings>
+         <!--security for example queue-->
+         <security-setting match="#">
+            <permission roles="guest" type="createDurableQueue"/>
+            <permission roles="guest" type="deleteDurableQueue"/>
+            <permission roles="guest" type="createNonDurableQueue"/>
+            <permission roles="guest" type="deleteNonDurableQueue"/>
+            <permission roles="guest" type="consume"/>
+            <permission roles="guest" type="send"/>
+         </security-setting>
+      </security-settings>
+      <addresses>
+         <address name="mincing-machine">
+            <anycast>
+               <queue name="mincing-machine"/>
+            </anycast>
+         </address>
+      </addresses>
+   </core>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/database/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/database/pom.xml b/examples/features/standard/database/pom.xml
index 51a5db0..445294c 100644
--- a/examples/features/standard/database/pom.xml
+++ b/examples/features/standard/database/pom.xml
@@ -27,9 +27,9 @@ under the License.
       <version>2.5.0-SNAPSHOT</version>
    </parent>
 
-   <artifactId>datatabase</artifactId>
+   <artifactId>database</artifactId>
    <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Expiry Example</name>
+   <name>ActiveMQ Artemis JMS Database Example</name>
 
    <properties>
       <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
@@ -104,7 +104,7 @@ under the License.
             <dependencies>
                <dependency>
                   <groupId>org.apache.activemq.examples.broker</groupId>
-                  <artifactId>datatabase</artifactId>
+                  <artifactId>database</artifactId>
                   <version>${project.version}</version>
                </dependency>
             </dependencies>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/database/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/database/readme.md b/examples/features/standard/database/readme.md
index d32f727..fa1613c 100644
--- a/examples/features/standard/database/readme.md
+++ b/examples/features/standard/database/readme.md
@@ -4,4 +4,6 @@ To run the example, simply type **mvn verify** from this directory, or **mvn -Pn
 
 This example shows you how to configure ActiveMQ Artemis to run with a database.
 
-Notice this is not making any assumption of what is the recommended database to be used with Artemis. After all we recommend the artemis journal to be used, however in certain environments users will prefer databases for specific reasons.
+### Notice
+ 
+This is not making any assumption of what is the recommended database to be used with Artemis. We generally recommend the Artemis journal to be used. However, in certain environments users will prefer databases for specific reasons.

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/embedded-simple/src/main/resources/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/embedded-simple/src/main/resources/broker.xml b/examples/features/standard/embedded-simple/src/main/resources/broker.xml
index a67720c..795e648 100644
--- a/examples/features/standard/embedded-simple/src/main/resources/broker.xml
+++ b/examples/features/standard/embedded-simple/src/main/resources/broker.xml
@@ -18,10 +18,7 @@ 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">
-
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:activemq" xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
    <core xmlns="urn:activemq:core">
 
       <persistence-enabled>false</persistence-enabled>
@@ -30,11 +27,9 @@ under the License.
          <acceptor name="in-vm">vm://0</acceptor>
       </acceptors>
 
-      <!-- Other config -->
-
       <security-settings>
-         <!--security for example queue-->
          <security-setting match="#">
+            <permission type="createAddress" roles="guest"/>
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>
@@ -43,6 +38,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/afd7d8b3/examples/features/standard/jms-auto-closeable/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-auto-closeable/pom.xml b/examples/features/standard/jms-auto-closeable/pom.xml
deleted file mode 100644
index 3ea9816..0000000
--- a/examples/features/standard/jms-auto-closeable/pom.xml
+++ /dev/null
@@ -1,121 +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.broker</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>2.5.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>auto-closeable</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Auto Closable Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client-all</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-               </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.JMSAutoCloseableExample</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.broker</groupId>
-                  <artifactId>auto-closeable</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-         </plugin>
-      </plugins>
-   </build>
-   <profiles>
-      <profile>
-         <id>release</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>com.vladsch.flexmark</groupId>
-                  <artifactId>markdown-page-generator-plugin</artifactId>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-auto-closeable/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-auto-closeable/readme.md b/examples/features/standard/jms-auto-closeable/readme.md
deleted file mode 100644
index 248fca1..0000000
--- a/examples/features/standard/jms-auto-closeable/readme.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# JMS Auto Closable Example
-
-To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
-
-This example shows you how JMS resources such as connections, sessions and consumers in JMS 2 can be automatically closed on error.
-
-In this instance we auto close a connection after a subsequent call to a JMS producer send fails.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java b/examples/features/standard/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java
deleted file mode 100644
index d53a373..0000000
--- a/examples/features/standard/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java
+++ /dev/null
@@ -1,51 +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.JMSContext;
-import javax.jms.JMSProducer;
-import javax.jms.Queue;
-
-import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
-
-/**
- * A simple JMS example that shows how AutoCloseable is used by JMS 2 resources.
- */
-public class JMSAutoCloseableExample {
-
-   public static void main(final String[] args) throws Exception {
-      // Step 2. Perfom a lookup on the queue
-      Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
-
-      // Step 4.Create a JMS Context using the try-with-resources statement
-      try
-         (
-            // Even though ConnectionFactory is not closeable it would be nice to close an ActiveMQConnectionFactory
-            ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
-            JMSContext jmsContext = cf.createContext()
-         ) {
-         // Step 5. create a jms producer
-         JMSProducer jmsProducer = jmsContext.createProducer();
-
-         // Step 6. Try sending a message, we don't have the appropriate privileges to do this so this will throw an exception
-         jmsProducer.send(queue, "A Message from JMS2!");
-
-         System.out.println("Received:" + jmsContext.createConsumer(queue).receiveBody(String.class));
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-auto-closeable/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-auto-closeable/src/main/resources/jndi.properties b/examples/features/standard/jms-auto-closeable/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/features/standard/jms-auto-closeable/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/afd7d8b3/examples/features/standard/jms-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-bridge/pom.xml b/examples/features/standard/jms-bridge/pom.xml
index 4422130..e186bb0 100644
--- a/examples/features/standard/jms-bridge/pom.xml
+++ b/examples/features/standard/jms-bridge/pom.xml
@@ -27,7 +27,7 @@ under the License.
       <version>2.5.0-SNAPSHOT</version>
    </parent>
 
-   <artifactId>bridge</artifactId>
+   <artifactId>jms-bridge</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Bridge Example</name>
 
@@ -147,7 +147,7 @@ under the License.
             <dependencies>
                <dependency>
                   <groupId>org.apache.activemq.examples.broker</groupId>
-                  <artifactId>bridge</artifactId>
+                  <artifactId>jms-bridge</artifactId>
                   <version>${project.version}</version>
                </dependency>
             </dependencies>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-completion-listener/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-completion-listener/pom.xml b/examples/features/standard/jms-completion-listener/pom.xml
deleted file mode 100644
index 16f9167..0000000
--- a/examples/features/standard/jms-completion-listener/pom.xml
+++ /dev/null
@@ -1,125 +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.broker</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>2.5.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>completion-listener</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Completion Listener Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client-all</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <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>${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.JMSCompletionListenerExample</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.broker</groupId>
-                  <artifactId>completion-listener</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-         </plugin>
-      </plugins>
-   </build>
-   <profiles>
-      <profile>
-         <id>release</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>com.vladsch.flexmark</groupId>
-                  <artifactId>markdown-page-generator-plugin</artifactId>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-completion-listener/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-completion-listener/readme.md b/examples/features/standard/jms-completion-listener/readme.md
deleted file mode 100644
index a8c7d6d..0000000
--- a/examples/features/standard/jms-completion-listener/readme.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# JMS Completion Listener Example
-
-To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
-
-This example shows you how to send a message asynchronously to ActiveMQ Artemis and use a CompletionListener to be notified of the Broker receiving it.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java b/examples/features/standard/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java
deleted file mode 100644
index ffe0b0d..0000000
--- a/examples/features/standard/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java
+++ /dev/null
@@ -1,80 +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.CompletionListener;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSContext;
-import javax.jms.JMSProducer;
-import javax.jms.Message;
-import javax.jms.Queue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
-
-/**
- * A JMS Completion Listener Example.
- */
-public class JMSCompletionListenerExample {
-
-   public static void main(final String[] args) throws Exception {
-      JMSContext jmsContext = null;
-      try {
-         // Step 2. Perfom a lookup on the queue
-         Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
-
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=10240");
-
-         // Step 4.Create a JMS Context
-         jmsContext = cf.createContext();
-
-         // Step 5. Create a message producer.
-         JMSProducer producer = jmsContext.createProducer();
-
-         final CountDownLatch latch = new CountDownLatch(1);
-
-         //Step 6. We want to send the message Asynchronously and be notified when the Broker receives it so we set a completion handler
-         producer.setAsync(new CompletionListener() {
-            @Override
-            public void onCompletion(Message message) {
-               System.out.println("message acknowledged by ActiveMQ");
-               latch.countDown();
-            }
-
-            @Override
-            public void onException(Message message, Exception e) {
-               e.printStackTrace();
-            }
-         });
-
-         //Step 6. Send the Message
-         producer.send(queue, "this is a string");
-
-         //Step 7. wait for the Completion handler
-         if (!latch.await(5, TimeUnit.SECONDS)) {
-            throw new IllegalStateException("Completion listener not called as expected.");
-         }
-      } finally {
-         if (jmsContext != null) {
-            jmsContext.close();
-         }
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-completion-listener/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-completion-listener/src/main/resources/jndi.properties b/examples/features/standard/jms-completion-listener/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/features/standard/jms-completion-listener/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/afd7d8b3/examples/features/standard/jms-context/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-context/pom.xml b/examples/features/standard/jms-context/pom.xml
deleted file mode 100644
index fa9d8cc..0000000
--- a/examples/features/standard/jms-context/pom.xml
+++ /dev/null
@@ -1,124 +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.broker</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>2.5.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>context</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Context Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client-all</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <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>
-                     <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.JMSContextExample</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.broker</groupId>
-                  <artifactId>context</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-         </plugin>
-      </plugins>
-   </build>
-   <profiles>
-      <profile>
-         <id>release</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>com.vladsch.flexmark</groupId>
-                  <artifactId>markdown-page-generator-plugin</artifactId>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-context/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-context/readme.md b/examples/features/standard/jms-context/readme.md
deleted file mode 100644
index 0f03836..0000000
--- a/examples/features/standard/jms-context/readme.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# JMS Context Example
-
-To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
-
-This example shows you how to send and receive a message to a JMS Queue using ActiveMQ Artemis by using a JMSContext.
-
-A JMSContext is part of JMS 2.0 and combines the JMS Connection and Session Objects into a simple interface.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java b/examples/features/standard/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java
deleted file mode 100644
index d2a341c..0000000
--- a/examples/features/standard/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java
+++ /dev/null
@@ -1,51 +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.DeliveryMode;
-import javax.jms.JMSContext;
-import javax.jms.Queue;
-
-import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
-
-/**
- * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message.
- */
-public class JMSContextExample {
-
-   public static void main(final String[] args) throws Exception {
-      // Instantiate the queue
-      Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
-
-      // Instantiate the ConnectionFactory (Using the default URI on this case)
-      // Also instantiate the jmsContext
-      // Using closeable interface
-      try (ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
-           JMSContext jmsContext = cf.createContext()) {
-         // Create a message producer, note that we can chain all this into one statement
-         jmsContext.createProducer().setDeliveryMode(DeliveryMode.PERSISTENT).send(queue, "this is a string");
-
-         // Create a Consumer and receive the payload of the message direct.
-         String payLoad = jmsContext.createConsumer(queue).receiveBody(String.class);
-
-         System.out.println("payLoad = " + payLoad);
-
-      }
-
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-shared-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-shared-consumer/pom.xml b/examples/features/standard/jms-shared-consumer/pom.xml
deleted file mode 100644
index 864594f..0000000
--- a/examples/features/standard/jms-shared-consumer/pom.xml
+++ /dev/null
@@ -1,126 +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.broker</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>2.5.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>shared-consumer</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Shared Consumer Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client-all</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <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.JMSSharedConsumerExample</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.broker</groupId>
-                  <artifactId>shared-consumer</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-         </plugin>
-      </plugins>
-   </build>
-   <profiles>
-      <profile>
-         <id>release</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>com.vladsch.flexmark</groupId>
-                  <artifactId>markdown-page-generator-plugin</artifactId>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-shared-consumer/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-shared-consumer/readme.md b/examples/features/standard/jms-shared-consumer/readme.md
deleted file mode 100644
index 090f110..0000000
--- a/examples/features/standard/jms-shared-consumer/readme.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# JMS Shared Consumer Example
-
-To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
-
-This example shows you how can use shared consumers to share a subscription on a topic. In JMS 1.1 this was not allowed and so caused a scalability issue. In JMS 2 this restriction has been lifted so you can share the load across different threads and connections.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java b/examples/features/standard/jms-shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java
deleted file mode 100644
index d226dbf..0000000
--- a/examples/features/standard/jms-shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java
+++ /dev/null
@@ -1,86 +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.ConnectionFactory;
-import javax.jms.JMSConsumer;
-import javax.jms.JMSContext;
-import javax.jms.JMSProducer;
-import javax.jms.Topic;
-import javax.naming.InitialContext;
-
-/**
- * A JMS Example that uses shared consumers.
- */
-public class JMSSharedConsumerExample {
-
-   public static void main(final String[] args) throws Exception {
-      InitialContext initialContext = null;
-      JMSContext jmsContext = null;
-      JMSContext jmsContext2 = null;
-      try {
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
-         // Step 2. Perfom a lookup on the queue
-         Topic topic = (Topic) initialContext.lookup("topic/exampleTopic");
-
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 4.Create a JMS Context
-         jmsContext = cf.createContext();
-
-         // Step 5. Create a message producer.
-         JMSProducer producer = jmsContext.createProducer();
-
-         // Step 6. Create a shared consumer
-         JMSConsumer jmsConsumer = jmsContext.createSharedConsumer(topic, "sc1");
-
-         // Step 7. Create a second JMS Context for a second shared consumer
-         jmsContext2 = cf.createContext();
-
-         // Step 8. Create the second shared consumer
-         JMSConsumer jmsConsumer2 = jmsContext2.createSharedConsumer(topic, "sc1");
-
-         // Step 9. send 2 messages
-         producer.send(topic, "this is a String!");
-
-         producer.send(topic, "this is a second String!");
-
-         // Step 10. receive the messages shared by both consumers
-         String body = jmsConsumer.receiveBody(String.class, 5000);
-
-         System.out.println("body = " + body);
-
-         body = jmsConsumer2.receiveBody(String.class, 5000);
-
-         System.out.println("body = " + body);
-      } finally {
-         // Step 11. Be sure to close our JMS resources!
-         if (initialContext != null) {
-            initialContext.close();
-         }
-         if (jmsContext != null) {
-            jmsContext.close();
-         }
-         if (jmsContext2 != null) {
-            jmsContext2.close();
-         }
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 91d733a..0000000
--- a/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-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="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
-   <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>
-
-      <!-- Acceptors -->
-
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-      </acceptors>
-
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example topic-->
-         <security-setting match="exampleTopic">
-            <permission roles="guest" type="createDurableQueue"/>
-            <permission roles="guest" type="deleteDurableQueue"/>
-            <permission roles="guest" type="createNonDurableQueue"/>
-            <permission roles="guest" type="deleteNonDurableQueue"/>
-            <permission roles="guest" type="consume"/>
-            <permission roles="guest" type="send"/>
-         </security-setting>
-      </security-settings>
-
-      <addresses>
-         <address name="exampleTopic">
-            <multicast/>
-         </address>
-      </addresses>
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jms-shared-consumer/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/jms-shared-consumer/src/main/resources/jndi.properties b/examples/features/standard/jms-shared-consumer/src/main/resources/jndi.properties
deleted file mode 100644
index 54bed6d..0000000
--- a/examples/features/standard/jms-shared-consumer/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
-topic.topic/exampleTopic=exampleTopic

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/readme.md b/examples/features/standard/jmx-ssl/readme.md
index e653012..454dfb6 100644
--- a/examples/features/standard/jmx-ssl/readme.md
+++ b/examples/features/standard/jmx-ssl/readme.md
@@ -14,6 +14,15 @@ To access this MBeanServer remotely, add the following to the management.xml con
 
 With these properties, ActiveMQ Artemis broker will be manageable remotely using standard JMX URL on port `1099`.
 
+The various keystore files are generated using the following commands:
+
+* `keytool -genkey -keystore server-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ Artemis Server, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA`
+* `keytool -export -keystore server-side-keystore.jks -file server-side-cert.cer -storepass secureexample`
+* `keytool -import -keystore client-side-truststore.jks -file server-side-cert.cer -storepass secureexample -keypass secureexample -noprompt`
+* `keytool -genkey -keystore client-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ Artemis Client, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA`
+* `keytool -export -keystore client-side-keystore.jks -file client-side-cert.cer -storepass secureexample`
+* `keytool -import -keystore server-side-truststore.jks -file client-side-cert.cer -storepass secureexample -keypass secureexample -noprompt`
+
 ## More information
 
 *   [Java management guide](https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/java/org/apache/activemq/artemis/jms/example/JMXOverSSLExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/java/org/apache/activemq/artemis/jms/example/JMXOverSSLExample.java b/examples/features/standard/jmx-ssl/src/main/java/org/apache/activemq/artemis/jms/example/JMXOverSSLExample.java
index b8b8ef7..8681a19 100644
--- a/examples/features/standard/jmx-ssl/src/main/java/org/apache/activemq/artemis/jms/example/JMXOverSSLExample.java
+++ b/examples/features/standard/jmx-ssl/src/main/java/org/apache/activemq/artemis/jms/example/JMXOverSSLExample.java
@@ -83,10 +83,10 @@ public class JMXOverSSLExample {
          String[] creds = {"guest", "guest"};
          env.put(JMXConnector.CREDENTIALS, creds);
 
-         System.setProperty("javax.net.ssl.trustStore", args[0] + "activemq.example.truststore");
-         System.setProperty("javax.net.ssl.trustStorePassword", "activemqexample");
-         System.setProperty("javax.net.ssl.keyStore", args[0] + "activemq.example.keystore");
-         System.setProperty("javax.net.ssl.keyStorePassword", "activemqexample");
+         System.setProperty("javax.net.ssl.trustStore", args[0] + "client-side-truststore.jks");
+         System.setProperty("javax.net.ssl.trustStorePassword", "secureexample");
+         System.setProperty("javax.net.ssl.keyStore", args[0] + "client-side-keystore.jks");
+         System.setProperty("javax.net.ssl.keyStorePassword", "secureexample");
 
          JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMXOverSSLExample.JMX_URL), env);
 
@@ -131,6 +131,11 @@ public class JMXOverSSLExample {
          if (connection != null) {
             connection.close();
          }
+
+         System.clearProperty("javax.net.ssl.trustStore");
+         System.clearProperty("javax.net.ssl.trustStorePassword");
+         System.clearProperty("javax.net.ssl.keyStore");
+         System.clearProperty("javax.net.ssl.keyStorePassword");
       }
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.keystore
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.keystore b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.keystore
deleted file mode 100644
index 50de681..0000000
Binary files a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.truststore
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.truststore b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.truststore
deleted file mode 100644
index 129391a..0000000
Binary files a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/activemq.example.truststore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-keystore.jks
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-keystore.jks b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-keystore.jks
new file mode 100644
index 0000000..cb65a44
Binary files /dev/null and b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-keystore.jks differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-truststore.jks
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-truststore.jks b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-truststore.jks
new file mode 100644
index 0000000..7eb1d56
Binary files /dev/null and b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/client-side-truststore.jks differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml
index 0bf2b62..802079c 100644
--- a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml
+++ b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/management.xml
@@ -20,10 +20,10 @@
          connector-port="1099"
          connector-host="localhost"
          secured="true"
-         key-store-path="${data.dir}/../etc/activemq.example.keystore"
-         key-store-password="activemqexample"
-         trust-store-path="${data.dir}/../etc/activemq.example.truststore"
-         trust-store-password="activemqexample"/>
+         key-store-path="${data.dir}/../etc/server-side-keystore.jks"
+         key-store-password="secureexample"
+         trust-store-path="${data.dir}/../etc/server-side-truststore.jks"
+         trust-store-password="secureexample"/>
    <authorisation>
       <whitelist>
          <entry domain="hawtio"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-keystore.jks
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-keystore.jks b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-keystore.jks
new file mode 100644
index 0000000..6089c6e
Binary files /dev/null and b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-keystore.jks differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-truststore.jks
----------------------------------------------------------------------
diff --git a/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-truststore.jks b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-truststore.jks
new file mode 100644
index 0000000..0b7e224
Binary files /dev/null and b/examples/features/standard/jmx-ssl/src/main/resources/activemq/server0/server-side-truststore.jks differ

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/pom.xml b/examples/features/standard/pom.xml
index 0d4b2f8..7ff8ded 100644
--- a/examples/features/standard/pom.xml
+++ b/examples/features/standard/pom.xml
@@ -41,12 +41,15 @@ under the License.
       <profile>
          <id>release</id>
          <modules>
-            <module>bridge</module>
+            <module>auto-closeable</module>
             <module>browser</module>
             <module>broker-plugin</module>
             <module>cdi</module>
             <module>client-kickoff</module>
+            <module>completion-listener</module>
             <module>consumer-rate-limit</module>
+            <module>context</module>
+            <module>core-bridge</module>
             <module>database</module>
             <module>dead-letter</module>
             <module>delayed-redelivery</module>
@@ -61,11 +64,7 @@ under the License.
             <module>interceptor-mqtt</module>
             <module>interceptor-amqp</module>
             <module>instantiate-connection-factory</module>
-            <module>jms-auto-closeable</module>
             <module>jms-bridge</module>
-            <module>jms-completion-listener</module>
-            <module>jms-context</module>
-            <module>jms-shared-consumer</module>
             <module>jmx</module>
             <module>jmx-ssl</module>
             <module>large-message</module>
@@ -90,32 +89,36 @@ under the License.
             <module>security</module>
             <module>security-ldap</module>
             <module>send-acknowledgements</module>
+            <module>shared-consumer</module>
             <module>slow-consumer</module>
             <module>spring-integration</module>
             <module>ssl-enabled</module>
+            <module>ssl-enabled-crl-mqtt</module>
             <module>ssl-enabled-dual-authentication</module>
             <module>static-selector</module>
             <module>temp-queue</module>
             <module>topic</module>
             <module>topic-hierarchies</module>
-            <module>topic-selector-example1</module>
-            <module>topic-selector-example2</module>
+            <module>topic-selector1</module>
+            <module>topic-selector2</module>
             <module>transactional</module>
             <module>xa-heuristic</module>
             <module>xa-receive</module>
             <module>xa-send</module>
-            <module>ssl-enabled-crl-mqtt</module>
          </modules>
       </profile>
       <profile>
          <id>examples</id>
          <modules>
-            <module>bridge</module>
+            <module>auto-closeable</module>
             <module>browser</module>
             <module>broker-plugin</module>
             <module>cdi</module>
             <module>client-kickoff</module>
+            <module>completion-listener</module>
             <module>consumer-rate-limit</module>
+            <module>context</module>
+            <module>core-bridge</module>
             <module>database</module>
             <module>dead-letter</module>
             <module>delayed-redelivery</module>
@@ -129,12 +132,8 @@ under the License.
             <module>interceptor-client</module>
             <module>interceptor-mqtt</module>
             <module>interceptor-amqp</module>
-            <module>jms-auto-closeable</module>
             <module>instantiate-connection-factory</module>
             <module>jms-bridge</module>
-            <module>jms-completion-listener</module>
-            <module>jms-context</module>
-            <module>jms-shared-consumer</module>
             <module>jmx</module>
             <module>jmx-ssl</module>
             <module>large-message</module>
@@ -153,16 +152,17 @@ under the License.
             <module>queue-requestor</module>
             <module>queue-selector</module>
             <module>reattach-node</module>
-
-            <module>request-reply</module>
             <module>rest</module>
+            <module>request-reply</module>
             <module>scheduled-message</module>
             <module>security</module>
             <module>security-ldap</module>
             <module>send-acknowledgements</module>
+            <module>shared-consumer</module>
             <module>slow-consumer</module>
             <module>spring-integration</module>
             <module>ssl-enabled</module>
+            <module>ssl-enabled-crl-mqtt</module>
             <module>ssl-enabled-dual-authentication</module>
             <module>static-selector</module>
 
@@ -172,13 +172,12 @@ under the License.
             <module>temp-queue</module>
             <module>topic</module>
             <module>topic-hierarchies</module>
-            <module>topic-selector-example1</module>
-            <module>topic-selector-example2</module>
+            <module>topic-selector1</module>
+            <module>topic-selector2</module>
             <module>transactional</module>
             <module>xa-heuristic</module>
             <module>xa-receive</module>
             <module>xa-send</module>
-            <module>ssl-enabled-crl-mqtt</module>
          </modules>
       </profile>
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/shared-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/shared-consumer/pom.xml b/examples/features/standard/shared-consumer/pom.xml
new file mode 100644
index 0000000..864594f
--- /dev/null
+++ b/examples/features/standard/shared-consumer/pom.xml
@@ -0,0 +1,126 @@
+<?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.broker</groupId>
+      <artifactId>jms-examples</artifactId>
+      <version>2.5.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>shared-consumer</artifactId>
+   <packaging>jar</packaging>
+   <name>ActiveMQ Artemis JMS Shared Consumer Example</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client-all</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+   </dependencies>
+
+   <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.JMSSharedConsumerExample</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.broker</groupId>
+                  <artifactId>shared-consumer</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
+      </plugins>
+   </build>
+   <profiles>
+      <profile>
+         <id>release</id>
+         <build>
+            <plugins>
+               <plugin>
+                  <groupId>com.vladsch.flexmark</groupId>
+                  <artifactId>markdown-page-generator-plugin</artifactId>
+               </plugin>
+            </plugins>
+         </build>
+      </profile>
+   </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/shared-consumer/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/shared-consumer/readme.md b/examples/features/standard/shared-consumer/readme.md
new file mode 100644
index 0000000..090f110
--- /dev/null
+++ b/examples/features/standard/shared-consumer/readme.md
@@ -0,0 +1,5 @@
+# JMS Shared Consumer Example
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
+
+This example shows you how can use shared consumers to share a subscription on a topic. In JMS 1.1 this was not allowed and so caused a scalability issue. In JMS 2 this restriction has been lifted so you can share the load across different threads and connections.
\ No newline at end of file