activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [11/18] activemq-artemis git commit: ARTEMIS-180 removing -Pexample and some other improvements around the examples
Date Fri, 07 Aug 2015 19:31:30 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/expiry/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/expiry/readme.html b/examples/jms/expiry/readme.html
index acbbe4b..65cb534 100644
--- a/examples/jms/expiry/readme.html
+++ b/examples/jms/expiry/readme.html
@@ -26,6 +26,7 @@ under the License.
   </head>
   <body onload="prettyPrint()">
      <h1>JMS Expiration 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 configure ActiveMQ Artemis so messages are expipired after a certain time.</p>
      <p>Messages can be retained in the messaging system for a limited period of time before being removed.
@@ -44,7 +45,7 @@ under the License.
             &lt;expiry-address&gt;jms.queue.expiryQueue&lt;/expiry-address&gt;
          &lt;/address-setting&gt;
          </code>
-     </pre>          
+     </pre>
      <p>This configuration will moved expired messages from the <code>exampleQueue</code> to the <code>expiryQueue</code></p>
      <p>ActiveMQ Artemis allows to specify either a <code>Queue</code> by prefixing the <code>expiry-address</code> with <code>jms.queue.</code>
          or a <code>Topic</code> by prefixing with <code>jms.topic.</code>.<br />
@@ -56,151 +57,5 @@ under the License.
             &lt;entry name="/queue/expiryQueue"/&gt;
          &lt;/queue&gt;</code>
      </pre>
-     </p>
-     <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create a JMS message producer on the session. This will be used to send the messages</li>
-        <pre class="prettyprint">
-          <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
-       
-       <li>Messages sent by this producer will be retained for 1s (1000ms) before expiration</li>
-       <pre class="prettyprint">
-           <code>producer.setTimeToLive(1000);</code>
-       </pre>
-
-        <li>We create a text messages</li>
-        <pre class="prettyprint">
-            <code>TextMessage message = session.createTextMessage("this is a text message");</code>
-        </pre>
-
-        <li>We send the message to the queue</li>
-        <pre class="prettyprint">
-            <code>producer.send(message);</code>
-        </pre>
-        
-       <li>We sleep a little bit to let the message expire</li>
-        <pre class="prettyprint">
-            <code>Thread.sleep(5000);</code>
-        </pre>
-
-        <p>We will now try to consume the message from the queue but it won't be there since it has expired</p>
-
-        <li>We create a JMS message consumer on the queue</li>
-        <pre class="prettyprint">
-            <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
-        </pre>
-        
-        <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li>
-        <pre class="prettyprint">
-           <code>connection.start();</code>
-        </pre>
-
-        <li>We try to receive a message from the queue. Since there is none, the call will timeout after 5000ms and <code>messageReceived</code> will be <code>null</code>
-        <pre class="prettyprint">
-           <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-           System.out.println("Received message from " + queue.getQueueName() + ": " + messageReceived);</code>
-        </pre>
-        
-        <p>However, we have configured ActiveMQ Artemis to send any expired messages to the <code>expiryQueue</code>.
-            We will now consume messages from this expiry queue and receives the <em>expired</em> message.</p>
-            
-        <li>We look up the JMS <em>expiry queue</em> object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue expiryQueue = (Queue)initialContext.lookup("/queue/expiryQueue");</code>
-        </pre>
-                  
-        <li>We create a JMS message consumer on the expiry queue</li>
-        <pre class="prettyprint">
-            <code>MessageConsumer expiryConsumer = session.createConsumer(expiryQueue);</code>
-        </pre>
-        
-        <li>We consume a message from the expiry queue:</li>
-        <pre class="prettyprint">
-            <code>messageReceived = (TextMessage)expiryConsumer.receive(5000);</code>
-        </pre>
-        
-        <li>The message consumed from the <em>expiry queue</em> has the <em>same content</em> than the message which was sent to the <em>queue</em>
-        <pre class="prettyprint">
-            <code>System.out.println("Received message from " + expiryQueue.getQueueName() + ": " + messageReceived.getText());</code>
-        </pre>    
-            
-        <p>JMS does not specify the notion of expiry queue. From JMS point of view, the message received from the expiry queue
-            is a <strong>different</strong> message than the message expired from the queue: the two messages have the same content (properties and body) but
-            their JMS headers differ.<br />
-            ActiveMQ Artemis defines additional properties to correlate the message received from the expiry queue with the 
-            message expired from the queue</p>
-            
-        <li>The expired message's destination is the expiry queue</li>
-        <pre class="prettyprint">
-            <code>System.out.println("Destination of the expired message: " + ((Queue)messageReceived.getJMSDestination()).getQueueName());</code>
-        </pre>
-
-        <li>The expired message has its own <em>expiration time</em> (its time to live in the <strong>expiry queue</strong>)</li>
-        <pre class="prettyprint">
-            <code>System.out.println("Expiration time of the expired message (relative to the expiry queue): " + messageReceived.getJMSExpiration());</code>
-        </pre>
-        
-        <p>As we have not defined a time-to-live for the expiry queue, messages sent to the expiry queue will be kept forever (their JMS Expiration value is 0)</p>
-
-        <li>The <strong>origin destination</strong> is stored in the <code>_HORNETQ_ORIG_DESTINATION</code> property
-        <pre class="prettyprint">
-            <code>System.out.println("*Origin destination* of the expired message: " + messageReceived.getStringProperty("_HORNETQ_ORIG_DESTINATION"));</code>
-        </pre>
-
-        <li>The <strong>actual expiration time</strong> (when the message was expired from the queue) is stored in the <code>_HORNETQ_ACTUAL_EXPIRY</code> property
-        <pre class="prettyprint">
-            <code>System.out.println("*Actual expiration time* of the expired message: " + messageReceived.getLongProperty("_HORNETQ_ACTUAL_EXPIRY"));</code>
-        </pre>
-
-        </p>    
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-     </ol>
-     
-     <h2>More information</h2>
-     
-     <ul>
-         <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#message-expiry">Message Expiry chapter</a></li>
-     </ul>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/ha-policy-autobackup/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/pom.xml b/examples/jms/ha-policy-autobackup/pom.xml
index cace530..9e33342 100644
--- a/examples/jms/ha-policy-autobackup/pom.xml
+++ b/examples/jms/ha-policy-autobackup/pom.xml
@@ -18,7 +18,8 @@ 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">
+<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>
@@ -42,65 +43,61 @@ under the License.
          <version>${project.version}</version>
       </dependency>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
-   <profiles>
-      <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>create2</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server1</instance>
-                           <configuration>${basedir}/target/classes/activemq/server1</configuration>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.HAPolicyAutoBackupExample</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>ha-policy-autobackup</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
-      </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>
+                     <instance>${basedir}/target/server0</instance>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create2</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server1</instance>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.HAPolicyAutoBackupExample</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>ha-policy-autobackup</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
index d561750..93d3d53 100644
--- a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
+++ b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/artemis/jms/example/HAPolicyAutoBackupExample.java
@@ -16,12 +16,6 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.api.core.client.ClusterTopologyListener;
-import org.apache.activemq.artemis.api.core.client.TopologyMember;
-import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
-import org.apache.activemq.artemis.util.ServerUtil;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
@@ -29,13 +23,18 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.naming.InitialContext;
 import java.util.ArrayList;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.apache.activemq.artemis.api.core.client.ClusterTopologyListener;
+import org.apache.activemq.artemis.api.core.client.TopologyMember;
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.artemis.util.ServerUtil;
+
 /**
  * A simple example that demonstrates server side load-balancing of messages between the queue instances on different
  * nodes of the cluster.
@@ -52,33 +51,17 @@ public class HAPolicyAutoBackupExample
 
       Connection connection1 = null;
 
-      InitialContext ic0 = null;
-
-      InitialContext ic1 = null;
-
       try
       {
          server0 = ServerUtil.startServer(args[0], HAPolicyAutoBackupExample.class.getSimpleName() + "0", 0, 5000);
          server1 = ServerUtil.startServer(args[1], HAPolicyAutoBackupExample.class.getSimpleName() + "1", 1, 5000);
 
-         // Step 1. Get an initial context for looking up JNDI from server 0 and 1
-         Hashtable<String, Object> properties = new Hashtable<String, Object>();
-         properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
-         properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
-         properties.put("queue.queue/exampleQueue", "exampleQueue");
-         ic0 = new InitialContext(properties);
-
-         properties = new Hashtable<String, Object>();
-         properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
-         properties.put("connectionFactory.ConnectionFactory", "tcp://localhost:61617?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
-         ic1 = new InitialContext(properties);
-
          // Step 2. Look-up the JMS Queue object from JNDI
-         Queue queue = (Queue) ic0.lookup("queue/exampleQueue");
+         Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
 
-         // Step 3. Look-up a JMS Connection Factory object from JNDI on server 0 and 1
-         ConnectionFactory cf0 = (ConnectionFactory) ic0.lookup("ConnectionFactory");
-         ConnectionFactory cf1 = (ConnectionFactory) ic1.lookup("ConnectionFactory");
+         // Step 3. new connection factories towards server 0 and 1
+         ConnectionFactory cf0 = new ActiveMQConnectionFactory("tcp://localhost:61616?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
+         ConnectionFactory cf1 = new ActiveMQConnectionFactory("tcp://localhost:61617?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
 
          // Step 6. We create JMS Connections to server 0 and 1
          connection0 = cf0.createConnection();
@@ -129,7 +112,7 @@ public class HAPolicyAutoBackupExample
 
          // Step 15.now kill server1, messages will be scaled down to server0
          ServerUtil.killServer(server1);
-         Thread.sleep(40000);
+         Thread.sleep(5000);
 
          // Step 16. we now receive the messages that were on server1 but were scaled down to server0
          for (int i = 0; i < numMessages / 2; i++)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/http-transport/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/pom.xml b/examples/jms/http-transport/pom.xml
index 0d9c91d..6e2914b 100644
--- a/examples/jms/http-transport/pom.xml
+++ b/examples/jms/http-transport/pom.xml
@@ -18,7 +18,8 @@ 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">
+<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>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-http-transport-example</artifactId>
+   <artifactId>http-transport</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Http Transport Example</name>
 
@@ -37,71 +38,82 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <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>
-                           <spawn>true</spawn>
-                           <testURI>tcp://localhost:8080?http-enabled=true</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.HttpTransportExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-http-transport-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- 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>${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:8080?http-enabled=true</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.HttpTransportExample</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>http-transport</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/http-transport/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/readme.html b/examples/jms/http-transport/readme.html
index 9cc3f8c..a0f0005 100644
--- a/examples/jms/http-transport/readme.html
+++ b/examples/jms/http-transport/readme.html
@@ -27,14 +27,17 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS HTTP 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 configure ActiveMQ Artemis to use the HTTP protocol as its transport layer.</p>
-     
+
      <p>ActiveMQ Artemis supports a variety of network protocols to be its underlying transport without any specific code change.</p>
-     
+
      <p>This example is taken from the queue example without any code change. By changing the configuration file, one can get ActiveMQ Artemis working with HTTP transport.</p>
      <p>All you need to do is open the server0/broker.xml and enable HTTP like the following</p>
- 
- 
+
+
       <pre class="prettyprint">
       <code>
       &lt;connector name=&quot;netty-connector&quot;&gt;tcp://localhost:8080?httpEnabled=true&lt;/connector&gt;
@@ -44,84 +47,6 @@ under the License.
       &lt;acceptor name=&quot;netty-acceptor&quot;&gt;tcp://localhost:8080 &lt;/acceptor&gt;
       </code>
       </pre>
-     
-     <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
-
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
-        <pre class="prettyprint">
-          <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
-
-        <li>We create a JMS text message that we are going to send.</li>
-        <pre class="prettyprint">
-           <code>TextMessage message = session.createTextMessage("This is a text message");</code>
-        </pre>
-
-        <li>We send message to the queue</li>
-        <pre class="prettyprint">
-           <code>messageProducer.send(message);</code>
-        </pre>
-
-        <li>We create a JMS Message Consumer to receive the message.</li>
-          <pre class="prettyprint">
-           <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
-        </pre>
-
-        <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li>
-        <pre class="prettyprint">
-           <code>connection.start();</code>
-        </pre>
-
-        <li>The message arrives at the consumer. In this case we use a timeout of 5000 milliseconds but we could use a blocking 'receive()'</li>
-        <pre class="prettyprint">
-           <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);</code>
-        </pre>
-
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-
-
 
-     </ol>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/http-transport/src/main/java/org/apache/activemq/artemis/jms/example/HttpTransportExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/java/org/apache/activemq/artemis/jms/example/HttpTransportExample.java b/examples/jms/http-transport/src/main/java/org/apache/activemq/artemis/jms/example/HttpTransportExample.java
index cd2e175..9ae1cba 100644
--- a/examples/jms/http-transport/src/main/java/org/apache/activemq/artemis/jms/example/HttpTransportExample.java
+++ b/examples/jms/http-transport/src/main/java/org/apache/activemq/artemis/jms/example/HttpTransportExample.java
@@ -25,6 +25,9 @@ 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.jms.client.ActiveMQConnectionFactory;
+
 /**
  * A simple JMS Queue example that uses HTTP protocol.
  */
@@ -33,17 +36,13 @@ public class HttpTransportExample
    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");
+         Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
 
          // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+         ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:8080?http-enabled=true");
 
          // Step 4.Create a JMS Connection
          connection = cf.createConnection();
@@ -75,15 +74,9 @@ public class HttpTransportExample
 
          System.out.println("Received message: " + messageReceived.getText());
 
-         initialContext.close();
       }
       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/dd820318/examples/jms/http-transport/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/activemq/server0/broker.xml b/examples/jms/http-transport/src/main/resources/activemq/server0/broker.xml
index ea39ccd..d1a4d2a 100644
--- a/examples/jms/http-transport/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/http-transport/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
+      <bindings-directory>./data/bindings</bindings-directory>
 
-      <journal-directory>${data.dir:../data}/journal</journal-directory>
+      <journal-directory>./data/journal</journal-directory>
 
-      <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
+      <large-messages-directory>./data/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir:../data}/paging</paging-directory>
+      <paging-directory>./data/paging</paging-directory>
 
       <!-- Acceptors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/http-transport/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/jndi.properties b/examples/jms/http-transport/src/main/resources/jndi.properties
deleted file mode 100644
index 15dae0b..0000000
--- a/examples/jms/http-transport/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:8080?http-enabled=true
-queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/instantiate-connection-factory/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/pom.xml b/examples/jms/instantiate-connection-factory/pom.xml
index 774b2b2..1f4d2e6 100644
--- a/examples/jms/instantiate-connection-factory/pom.xml
+++ b/examples/jms/instantiate-connection-factory/pom.xml
@@ -18,7 +18,8 @@ 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">
+<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>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-instantiate-connection-factory-example</artifactId>
+   <artifactId>instantiate-connection-factory</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Instantiate Connection Factory Example</name>
 
@@ -35,83 +36,85 @@ under the License.
       <activemq.basedir>${project.basedir}/../../..</activemq.basedir>
    </properties>
 
+
    <dependencies>
       <dependency>
          <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-core-client</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
          <artifactId>artemis-jms-client</artifactId>
          <version>${project.version}</version>
       </dependency>
-      <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
-      </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <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>
-                           <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.InstantiateConnectionFactoryExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-instantiate-connection-factory-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- 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>
+                     <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.InstantiateConnectionFactoryExample
+                     </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>instantiate-connection-factory</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/instantiate-connection-factory/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/readme.html b/examples/jms/instantiate-connection-factory/readme.html
index ff4e17a..fa062ea 100644
--- a/examples/jms/instantiate-connection-factory/readme.html
+++ b/examples/jms/instantiate-connection-factory/readme.html
@@ -26,7 +26,9 @@ under the License.
   </head>
   <body onload="prettyPrint()">
      <h1>JMS Instantiate Connection Factory 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>Usually, JMS Objects such as ConnectionFactories, Queue and Topic instances are looked up from JNDI
      before being used by the client code. This objects are called "administered objects" in JMS specification
      terminology.</p>
@@ -43,95 +45,5 @@ under the License.
      are that it wishes to connect to, or for specifying live-backup pairs of servers for failover.</p>
      <p>For more information on instantiating ConnectionFactories directly please consult the user manual and
      javadoc.</p>
-     
-     <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
-
-     <ol>
-        <li>Instead of looking it up from JNDI we directly instantiate the JMS Queue object. We
-        pass in the name of the JMS Queue in the constructor. The actual JMS Queue must already be deployed on
-        the server.</li>
-        <pre class="prettyprint">
-           <code>
-     Queue queue = new ActiveMQQueue("exampleQueue");</code>
-        </pre>
-
-        <li>Instantiate the TransportConfiguration object. The TransportConfiguration instance encapsulates
-        the connection details of the server we're connecting to. In this case we're using Netty as a transport, and
-        we're specifying to connect on port 61617.</li>
-        <pre class="prettyprint">
-           <code>
-     Map<String, Object> connectionParams = new HashMap<String, Object>();
-
-     connectionParams.put(PORT_PROP_NAME, 61617);
-
-     TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(),
-                                                                                connectionParams);
-           
-           </code>
-        </pre>
-
-        <li>Directly instantiate the JMS ConnectionFactory object using that TransportConfiguration.</li>
-        <pre class="prettyprint">
-           <code>
-     ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(transportConfiguration);
-           </code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
-        <pre class="prettyprint">
-          <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
-
-        <li>We create a JMS text message that we are going to send.</li>
-        <pre class="prettyprint">
-           <code>TextMessage message = session.createTextMessage("This is a text message");</code>
-        </pre>
-
-        <li>We send message to the queue</li>
-        <pre class="prettyprint">
-           <code>messageProducer.send(message);</code>
-        </pre>
-
-        <li>We create a JMS Message Consumer to receive the message.</li>
-          <pre class="prettyprint">
-           <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
-        </pre>
-
-        <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li>
-        <pre class="prettyprint">
-           <code>connection.start();</code>
-        </pre>
-
-        <li>The message arrives at the consumer. In this case we use a timeout of 5000 milliseconds but we could use a blocking 'receive()'</li>
-        <pre class="prettyprint">
-           <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);</code>
-        </pre>
-
-        <li>And finally, <b>always</b> remember to close your resources after use, in a <code>finally</code> block.</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-
-
-
-     </ol>
-  </body>
+       </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/artemis/jms/example/InstantiateConnectionFactoryExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/artemis/jms/example/InstantiateConnectionFactoryExample.java b/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/artemis/jms/example/InstantiateConnectionFactoryExample.java
index b0acce4..9b1e46e 100644
--- a/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/artemis/jms/example/InstantiateConnectionFactoryExample.java
+++ b/examples/jms/instantiate-connection-factory/src/main/java/org/apache/activemq/artemis/jms/example/InstantiateConnectionFactoryExample.java
@@ -23,14 +23,9 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import java.util.HashMap;
-import java.util.Map;
 
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.api.jms.JMSFactoryType;
-import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory;
-import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 
 /**
  *
@@ -49,17 +44,8 @@ public class InstantiateConnectionFactoryExample
          // Step 1. Directly instantiate the JMS Queue object.
          Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
 
-         // Step 2. Instantiate the TransportConfiguration object which contains the knowledge of what transport to use,
-         // The server port etc.
-
-         Map<String, Object> connectionParams = new HashMap<String, Object>();
-         connectionParams.put(TransportConstants.PORT_PROP_NAME, 61616);
-
-         TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(),
-                                                                                    connectionParams);
-
-         // Step 3 Directly instantiate the JMS ConnectionFactory object using that TransportConfiguration
-         ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
+         // Starting with Artemis 1.0.1 you can just use the URI to instantiate the object directly
+         ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
 
          // Step 4.Create a JMS Connection
          connection = cf.createConnection();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/interceptor/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/pom.xml b/examples/jms/interceptor/pom.xml
index 530a7b9..63ab338 100644
--- a/examples/jms/interceptor/pom.xml
+++ b/examples/jms/interceptor/pom.xml
@@ -18,7 +18,8 @@ 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">
+<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>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-interceptor-example</artifactId>
+   <artifactId>interceptor</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Interceptor Example</name>
 
@@ -41,72 +42,79 @@ under the License.
          <artifactId>artemis-jms-client</artifactId>
          <version>${project.version}</version>
       </dependency>
-      <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
-      </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <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>
-                           <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.InterceptorExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-interceptor-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                   </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- 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>
+                     <libList><arg>org.apache.activemq.examples.jms:interceptor:${project.version}</arg></libList>
+                     <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.InterceptorExample</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>interceptor</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/interceptor/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/readme.html b/examples/jms/interceptor/readme.html
index a680c12..e4d3601 100644
--- a/examples/jms/interceptor/readme.html
+++ b/examples/jms/interceptor/readme.html
@@ -27,6 +27,9 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS Interceptor 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 implement and configure a simple incoming, server-side interceptor with ActiveMQ Artemis.</p>
 
      <p>ActiveMQ Artemis allows an application to use an interceptor to hook into the messaging system. All that needs to do is to implement the
@@ -59,113 +62,6 @@ under the License.
      <p>With our interceptor we always return <code>true</code> from the <code>intercept</code> method. If we were
      to return <code>false</code> that signifies that no more interceptors are to run or the target
      is not to be called. Return <code>false</code> to abort processing of the packet.</p>
-
-     <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
-
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext(0);</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
-        <pre class="prettyprint">
-          <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
-
-        <li>We create a JMS text message that we are going to send.</li>
-        <pre class="prettyprint">
-           <code>TextMessage message = session.createTextMessage("This is a text message");</code>
-        </pre>
-
-        <li>We send message to the queue</li>
-        <pre class="prettyprint">
-           <code>messageProducer.send(message);</code>
-        </pre>
-
-        <li>We create a JMS Message Consumer to receive the message.</li>
-          <pre class="prettyprint">
-           <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
-        </pre>
-
-        <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li>
-        <pre class="prettyprint">
-           <code>connection.start();</code>
-        </pre>
-
-        <li>The message arrives at the consumer. In this case we use a timeout of 5000 milliseconds but we could use a blocking 'receive()'</li>
-        <pre class="prettyprint">
-           <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);</code>
-        </pre>
-
-        <li>We print out the message and the new property that has been added by the interceptor</li>
-        <pre class="prettyprint">
-           <code>System.out.println("Received message [" + messageReceived.getText() + "] with String property: " + messageReceived.getStringProperty("newproperty"));</code>
-        </pre>
-
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>
-           finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }
-           </code>
-        </pre>
-     </ol>
-     <ol>
-        <li>The SimpleInterceptor:</li>
-        <pre class="prettyprint">
-           <code>
-           public class SimpleInterceptor implements Interceptor
-           {
-              public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException
-              {
-                 System.out.println("SimpleInterceptor gets called!");
-                 System.out.println("Packet: " + packet.getClass().getName());
-                 System.out.println("RemotingConnection: " + connection.getRemoteAddress());
-
-                 if (packet instanceof SessionSendMessage)
-                 {
-                    SessionSendMessage realPacket = (SessionSendMessage)packet;
-                    Message msg = realPacket.getServerMessage();
-                    msg.putStringProperty(new SimpleString("newproperty"), new SimpleString("Hello from interceptor!"));
-                 }
-                 return true;
-              }
-           }
-           </code>
-        </pre>
-     </ol>
   </body>
 </html>
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-auto-closeable/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/pom.xml b/examples/jms/jms-auto-closeable/pom.xml
index 17376ab..3066fa5 100644
--- a/examples/jms/jms-auto-closeable/pom.xml
+++ b/examples/jms/jms-auto-closeable/pom.xml
@@ -18,7 +18,8 @@ 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">
+<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>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-auto-closeable-example</artifactId>
+   <artifactId>auto-closeable</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Auto Closable Example</name>
 
@@ -37,71 +38,78 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <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>
-                           <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>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-auto-closeable-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- 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>
+               </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.jms</groupId>
+                  <artifactId>auto-closeable</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-auto-closeable/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/readme.html b/examples/jms/jms-auto-closeable/readme.html
index 48cc246..7e71553 100644
--- a/examples/jms/jms-auto-closeable/readme.html
+++ b/examples/jms/jms-auto-closeable/readme.html
@@ -27,11 +27,12 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS Auto Closable 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 JMS resources, such as connections, sessions and consumers, in JMS 2 can be automatically closed on error.</p>
      <p>In this instance we auto close a connection after a subsequent call to a JMS producer send fails</p>
 
      <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
 
      <ol>
         <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java
index 555e8ff..a4f13e8 100644
--- a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java
+++ b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/artemis/jms/example/JMSAutoCloseableExample.java
@@ -16,9 +16,12 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import javax.jms.*;
-import javax.naming.InitialContext;
-import java.lang.Exception;
+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.
@@ -27,45 +30,24 @@ public class JMSAutoCloseableExample
 {
    public static void main(final String[] args) throws Exception
    {
-      InitialContext initialContext = null;
+      // 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 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 5. create a jms producer
+         JMSProducer jmsProducer = jmsContext.createProducer();
 
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+         // 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!");
 
-         // Step 4.Create a JMS Context using the try-with-resources statement
-         try
-                 (
-                         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, "this message will fail security!");
-         }
-         catch(JMSRuntimeException e)
-         {
-            //Step 7. we can handle the new JMSRuntimeException if we want or let the exception get handled elsewhere, the
-            //JMSCcontext will have been closed by the time we get to this point
-            System.out.println("expected exception from jmsProducer.send: " + e.getMessage());
-         }
-      }
-      finally
-      {
-         // Step 8. Be sure to close our Initial Context, note that we don't have to close the JMSContext as it is auto closeable
-         //and closed by the vm
-         if (initialContext != null)
-         {
-            initialContext.close();
-         }
+         System.out.println("Received:" + jmsContext.createConsumer(queue).receiveBody(String.class));
       }
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/pom.xml b/examples/jms/jms-bridge/pom.xml
index ac21a8c..9627051 100644
--- a/examples/jms/jms-bridge/pom.xml
+++ b/examples/jms/jms-bridge/pom.xml
@@ -18,7 +18,8 @@ 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">
+<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>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-bridge-example</artifactId>
+   <artifactId>bridge</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Bridge Example</name>
 
@@ -42,115 +43,126 @@ under the License.
          <version>${project.version}</version>
       </dependency>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <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>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>create1</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server1</instance>
-                           <configuration>${basedir}/target/classes/activemq/server1</configuration>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>start0</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <spawn>true</spawn>
-                           <location>${basedir}/target/server0</location>
-                           <testURI>tcp://localhost:61616</testURI>
-                           <args>
-                              <param>run</param>
-                           </args>
-                           <name>server0</name>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>start1</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <spawn>true</spawn>
-                           <location>${basedir}/target/server1</location>
-                           <testURI>tcp://localhost:61617</testURI>
-                           <args>
-                              <param>run</param>
-                           </args>
-                           <name>server1</name>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.JMSBridgeExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop0</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <location>${basedir}/target/server0</location>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop1</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <location>${basedir}/target/server1</location>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-bridge-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- 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>create0</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>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <instance>${basedir}/target/server1</instance>
+                     <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <location>${basedir}/target/server0</location>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                     <name>server0</name>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start1</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <location>${basedir}/target/server1</location>
+                     <testURI>tcp://localhost:61617</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                     <name>server1</name>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.JMSBridgeExample</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop0</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server0</location>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop1</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <location>${basedir}/target/server1</location>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>bridge</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-bridge/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/readme.html b/examples/jms/jms-bridge/readme.html
index 973abfd..2ded751 100644
--- a/examples/jms/jms-bridge/readme.html
+++ b/examples/jms/jms-bridge/readme.html
@@ -26,6 +26,9 @@ under the License.
   </head>
   <body onload="prettyPrint()">
      <h1>JMS Bridge 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 create a JMS Bridge between two ActiveMQ Artemis servers.</p>
      <img src="jms-bridge.png"  />
      <p>The example will use two ActiveMQ Artemis servers:</p>


Mime
View raw message