http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/jms-bridge/src/main/resources/hornetq-beans.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq-beans.xml 
b/examples/jms/jms-bridge/src/main/resources/hornetq-beans.xml
deleted file mode 100644
index c38275a..0000000
--- a/examples/jms/jms-bridge/src/main/resources/hornetq-beans.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
-
-   <!-- JNDI server. Disable this if you don't want JNDI -->
-   <bean name="JNDIServer" class="org.jnp.server.Main">
-      <property name="namingInfo">
-         <inject bean="Naming"/>
-      </property>
-      <!-- **************************************** -->
-      <!-- Replace with the *target* server address -->
-      <!-- **************************************** -->
-      <property name="bindAddress">@TARGET_SERVER@</property>
-      <!-- **************************************** -->
-      <!-- Replace with the *target* server address -->
-      <!-- **************************************** -->
-      <property name="rmiBindAddress">@TARGET_SERVER@</property>
-      <property name="port">1099</property>
-      <property name="rmiPort">1098</property>
-   </bean>
-   
-   <!-- MBean server -->
-   <bean name="MBeanServer" class="javax.management.MBeanServer">
-      <constructor factoryClass="java.lang.management.ManagementFactory"
-                   factoryMethod="getPlatformMBeanServer"/>
-   </bean> 
-
-   <!-- The core configuration -->
-   <bean name="Configuration" 
class="org.hornetq.core.config.impl.FileConfiguration"/>
-
-   <!-- The security manager -->
-   <bean name="HornetQSecurityManager" 
class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl">
-      <start ignored="true"/>
-      <stop ignored="true"/>
-   </bean>
-
-   <!-- The core server -->
-   <bean name="HornetQServer" 
class="org.hornetq.core.server.impl.HornetQServerImpl">
-      <constructor>
-         <parameter>
-            <inject bean="Configuration"/>
-         </parameter>
-         <parameter>
-            <inject bean="MBeanServer"/>
-         </parameter>
-         <parameter>
-            <inject bean="HornetQSecurityManager"/>
-         </parameter>        
-      </constructor>
-      <start ignored="true"/>
-      <stop ignored="true"/>
-   </bean>
-   
-   <!-- The JMS server -->
-   <bean name="JMSServerManager" 
class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
-      <constructor>         
-         <parameter>
-            <inject bean="HornetQServer"/>
-         </parameter>
-      </constructor>
-   </bean>
-   
-   <!-- The JMS Bridge -->
-   <bean name="JMSBridge" class="org.hornetq.jms.bridge.impl.JMSBridgeImpl">
-           <constructor>
-               <!-- Source ConnectionFactory Factory -->
-               <parameter>
-                   <inject bean="SourceCFF"/>
-               </parameter>
-               <!-- Target ConnectionFactory Factory -->
-               <parameter>
-                   <inject bean="TargetCFF"/>
-               </parameter>
-               <!-- Source DestinationFactory -->
-               <parameter>
-                   <inject bean="SourceDestinationFactory"/>
-               </parameter>
-               <!-- Target DestinationFactory -->
-               <parameter>
-                   <inject bean="TargetDestinationFactory"/>
-               </parameter>
-               <!-- Source username (no username here) -->
-               <parameter><null /></parameter>
-               <!-- Source password (no password here)-->
-               <parameter><null /></parameter>
-               <!-- Target username (no username here)-->
-               <parameter><null /></parameter>
-               <!-- Target password (no password here)-->
-               <parameter><null /></parameter>
-               <!-- Selector -->
-               <parameter><null /></parameter>
-               <!-- Interval to retry in case of failure (in ms) -->
-               <parameter>5000</parameter>
-               <!-- Maximum number of retries to connect to the source and 
target -->
-               <parameter>10</parameter>
-               <!-- Quality of service -->
-               <parameter>ONCE_AND_ONLY_ONCE</parameter>
-               <!-- Maximum batch size -->
-               <parameter>1</parameter>
-               <!-- Maximum batch time (-1 means infinite) -->
-               <parameter>-1</parameter>
-               <!-- Subscription name (no subscription name here)-->
-               <parameter><null /></parameter>
-               <!-- client ID  (no client ID here)-->
-               <parameter><null /></parameter>
-               <!-- concatenate JMS messageID to the target's message header 
-->
-               <parameter>true</parameter>
-               <!-- register the JMS Bridge in the JMX MBeanServer -->
-               <parameter>
-                   <inject bean="MBeanServer"/>
-               </parameter>
-               <parameter>org.hornetq:service=JMSBridge</parameter>
-           </constructor>
-           <property name="transactionManager">
-               <inject bean="TransactionManager"/>
-           </property>
-           
-           <!-- HornetQ JMS Server must be started before the bridge -->
-           <depends>JMSServerManager</depends>
-           
-       </bean>
-
-       <bean name="TransactionManager" 
class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple">
-       </bean>
-
-       <!-- SourceCFF describes the ConnectionFactory used to connect to the 
source destination -->
-       <bean name="SourceCFF" 
class="org.hornetq.jms.bridge.impl.JNDIConnectionFactoryFactory">
-           <constructor>
-               <parameter>
-                   <inject bean="SourceJNDI" />
-               </parameter>
-               <parameter>/source/ConnectionFactory</parameter>
-           </constructor>  
-       </bean>
-
-       <!-- TargetCFF describes the ConnectionFactory used to connect to the 
target destination -->
-       <bean name="TargetCFF" 
class="org.hornetq.jms.bridge.impl.JNDIConnectionFactoryFactory">
-           <constructor>
-               <parameter>
-                   <inject bean="TargetJNDI" />
-               </parameter>
-               <parameter>/target/ConnectionFactory</parameter>
-           </constructor>  
-       </bean>
-
-       <!-- SourceDestinationFactory describes the Destination used as the 
source -->
-       <bean name="SourceDestinationFactory" 
class="org.hornetq.jms.bridge.impl.JNDIDestinationFactory">
-           <constructor>
-               <parameter>
-                   <inject bean="SourceJNDI" />
-               </parameter>
-               <parameter>/source/topic</parameter>
-           </constructor>  
-       </bean>
-
-       <!-- TargetDestinationFactory describes the Destination used as the 
target -->
-       <bean name="TargetDestinationFactory" 
class="org.hornetq.jms.bridge.impl.JNDIDestinationFactory">
-           <constructor>
-               <parameter>
-                   <inject bean="TargetJNDI" />
-               </parameter>
-               <parameter>/target/queue</parameter>
-           </constructor>  
-       </bean>
-       
-       <!-- JNDI is a Hashtable containing the JNDI properties required -->
-       <!-- to connect to the *source* JMS resources                    -->    
   
-      <bean name="SourceJNDI" class="java.util.Hashtable">
-         <constructor class="java.util.Map">
-            <map class="java.util.Hashtable" keyClass="java.lang.String"
-                                             valueClass="java.lang.String">
-               <entry>
-                  <key>java.naming.factory.initial</key>
-                  <value>org.jnp.interfaces.NamingContextFactory</value>
-               </entry>
-               <entry>
-                  <key>java.naming.provider.url</key>
-                  <!-- **************************************** -->
-                  <!-- Replace with the *source* server address -->
-                  <!-- **************************************** -->
-                  <value>jnp://@SOURCE_SERVER@:1099</value>
-               </entry>
-               <entry>
-                  <key>java.naming.factory.url.pkgs</key>
-                  <value>org.jboss.naming:org.jnp.interfaces"</value>
-               </entry>
-               <entry>
-                  <key>jnp.timeout</key>
-                  <value>5000</value>
-               </entry>
-               <entry>
-                  <key>jnp.sotimeout</key>
-                  <value>5000</value>
-               </entry>
-            </map>
-         </constructor>
-      </bean>
-      
-      <!-- JNDI is a Hashtable containing the JNDI properties required -->
-      <!-- to connect to the *target* JMS resources                    -->     
  
-      <bean name="TargetJNDI" class="java.util.Hashtable">
-         <constructor class="java.util.Map">
-            <map class="java.util.Hashtable" keyClass="java.lang.String"
-                                             valueClass="java.lang.String">
-               <entry>
-                  <key>java.naming.factory.initial</key>
-                  <value>org.jnp.interfaces.NamingContextFactory</value>
-               </entry>
-               <entry>
-                  <key>java.naming.provider.url</key>
-                  <!-- **************************************** -->
-                  <!-- Replace with the *target* server address -->
-                  <!-- **************************************** -->
-                  <value>jnp://@TARGET_SERVER@:1099</value>
-               </entry>
-               <entry>
-                  <key>java.naming.factory.url.pkgs</key>
-                  <value>org.jboss.naming:org.jnp.interfaces"</value>
-               </entry>
-               <entry>
-                  <key>jnp.timeout</key>
-                  <value>5000</value>
-               </entry>
-               <entry>
-                  <key>jnp.sotimeout</key>
-                  <value>5000</value>
-               </entry>
-            </map>
-         </constructor>
-      </bean>
-
-</deployment>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 97f8649..c670e1f 100644
--- 
a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -10,8 +10,10 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="SHARED_STORE">
-      <allow-failback>true</allow-failback>
+   <ha-policy>
+      <shared-store>
+         <master/>
+      </shared-store>
    </ha-policy>
 
    <!-- Connectors -->

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 4edace8..c3aec8b 100644
--- 
a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -10,8 +10,10 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_SHARED_STORE">
-      <allow-failback>true</allow-failback>
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
    </ha-policy>
 
     <!-- Connectors -->

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/hornetq-configuration.xml
 
b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/hornetq-configuration.xml
index 1d6ed9f..569407b 100644
--- 
a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/hornetq-configuration.xml
+++ 
b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/hornetq-configuration.xml
@@ -10,8 +10,10 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_SHARED_STORE">
-      <allow-failback>true</allow-failback>
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
    </ha-policy>
     
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
index cc04ddc..10d84cd 100644
--- 
a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <master/>
+      </shared-store>
+   </ha-policy>
 
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 437b56e..4246cb2 100644
--- 
a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
 
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
 
b/examples/jms/multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
index 9d647c6..52f807e 100644
--- 
a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
+++ 
b/examples/jms/multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
 
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 4c2bc1e..8ade9a9 100644
--- 
a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -2,7 +2,11 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
 
-   <ha-policy template="SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <master/>
+      </shared-store>
+   </ha-policy>
 
    <!-- Connectors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 73b1f0f..206edf7 100644
--- 
a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -1,8 +1,12 @@
 <configuration xmlns="urn:hornetq"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="urn:hornetq 
../../../src/schema/hornetq-configuration.xsd">
+         xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
 
-   <ha-policy template="BACKUP_SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
     
    <!-- Connectors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/openwire/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/pom.xml b/examples/jms/openwire/pom.xml
new file mode 100644
index 0000000..e91f633
--- /dev/null
+++ b/examples/jms/openwire/pom.xml
@@ -0,0 +1,125 @@
+<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.hornetq.examples.jms</groupId>
+      <artifactId>jms-examples</artifactId>
+      <version>2.5.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>hornetq-jms-openwire-example</artifactId>
+   <packaging>jar</packaging>
+   <name>HornetQ JMS Openwire Example</name>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.hornetq.examples.jms</groupId>
+         <artifactId>hornetq-jms-examples-common</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.spec.javax.jms</groupId>
+         <artifactId>jboss-jms-api_2.0_spec</artifactId>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>activemq-client</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.hornetq</groupId>
+            <artifactId>hornetq-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>start</goal>
+                  </goals>
+                  <configuration>
+                     <systemProperties>
+                        <property>
+                           <name>build.directory</name>
+                           <value>${basedir}/target/</value>
+                        </property>
+                     </systemProperties>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     
<clientClass>org.hornetq.jms.example.OpenWireExample</clientClass>
+                     <args>
+                        <param>jnp://localhost:1099</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>stop</goal>
+                  </goals>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.hornetq.examples.jms</groupId>
+                  <artifactId>hornetq-jms-openwire-example</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.hornetq</groupId>
+                  <artifactId>hornetq-core-client</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.hornetq</groupId>
+                  <artifactId>hornetq-server</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.hornetq</groupId>
+                  <artifactId>hornetq-jms-client</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.hornetq</groupId>
+                  <artifactId>hornetq-jms-server</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.hornetq</groupId>
+                  <artifactId>hornetq-openwire-protocol</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>io.netty</groupId>
+                  <artifactId>netty-all</artifactId>
+                  <version>${netty.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.jboss.javaee</groupId>
+                  <artifactId>jboss-jms-api</artifactId>
+                  <version>1.1.0.GA</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.jboss.naming</groupId>
+                  <artifactId>jnpserver</artifactId>
+                  <version>5.0.3.GA</version>
+               </dependency>
+            </dependencies>
+            <configuration>
+               <waitOnStart>false</waitOnStart>
+               
<hornetqConfigurationDir>${basedir}/target/classes/hornetq/server0</hornetqConfigurationDir>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/openwire/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/readme.html 
b/examples/jms/openwire/readme.html
new file mode 100644
index 0000000..a7e8d72
--- /dev/null
+++ b/examples/jms/openwire/readme.html
@@ -0,0 +1,79 @@
+<html>
+  <head>
+    <title>HornetQ OpenWire Example</title>
+    <link rel="stylesheet" type="text/css" href="../common/common.css" />
+    <link rel="stylesheet" type="text/css" href="../common/prettify.css" />
+    <script type="text/javascript" src="../common/prettify.js"></script>
+  </head>
+  <body onload="prettyPrint()">
+     <h1>JMS OpenWire Example</h1>
+
+     <p>This example shows you how to configure HornetQ server to communicate 
with an ActiveMQ JMS client using ActiveMQ's native openwire protocol.</p>
+
+     <h2>Example step-by-step</h2>
+     <p><i>To run the example, simply type <code>mvn verify</code> from this 
directory</i></p>
+
+     <ol>
+        <li>First we need to create an ActiveMQ connection factory.</code></li>
+        <pre class="prettyprint">
+           <code>ConnectionFactory factory = new 
ActiveMQConnectionFactory(urlString);</code>
+        </pre>
+
+        <li>Create the target queue</li>
+        <pre class="prettyprint">
+           <code>Queue queue = new ActiveMQQueue("exampleQueue");</code>
+        </pre>
+
+        <li>We create a JMS connection and start it</li>
+        <pre class="prettyprint">
+           <code>connection = cf.createConnection();</code>
+           <code>connection.start()</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>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 (connection != null)
+              {
+                 connection.close();
+              }
+           }</code>
+        </pre>
+
+
+
+     </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/openwire/src/main/java/org/hornetq/jms/example/OpenWireExample.java
----------------------------------------------------------------------
diff --git 
a/examples/jms/openwire/src/main/java/org/hornetq/jms/example/OpenWireExample.java
 
b/examples/jms/openwire/src/main/java/org/hornetq/jms/example/OpenWireExample.java
new file mode 100644
index 0000000..81f078e
--- /dev/null
+++ 
b/examples/jms/openwire/src/main/java/org/hornetq/jms/example/OpenWireExample.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat 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.hornetq.jms.example;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.hornetq.common.example.HornetQExample;
+
+/**
+ * A simple JMS Queue example that creates a producer and consumer on a queue
+ * and sends then receives a message.
+ * 
+ * @author <a href="[email protected]">Andy Taylor</a>
+ */
+public class OpenWireExample extends HornetQExample
+{
+   public static final String OWHOST = "localhost";
+   public static final int OWPORT = 61616;
+
+   public static void main(final String[] args)
+   {
+      new OpenWireExample().run(args);
+   }
+
+   @Override
+   public boolean runExample() throws Exception
+   {
+      Connection connection = null;
+
+      try
+      {
+         String urlString = "tcp://" + OWHOST + ":" + OWPORT;
+
+         // Step 1. Create an ActiveMQ Connection Factory
+         ConnectionFactory factory = new ActiveMQConnectionFactory(urlString);
+
+         // Step 2. Create the target queue
+         Queue queue = new ActiveMQQueue("exampleQueue");
+
+         // Step 3. Create a JMS Connection
+         connection = factory.createConnection();
+
+         // Step 4. Start the Connection
+         connection.start();
+
+         // Step 5. Create a JMS Session
+         Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
+
+         // Step 6. Create a JMS Message Producer
+         MessageProducer producer = session.createProducer(queue);
+
+         // Step 7. Create a Text Message
+         TextMessage message = session.createTextMessage("This is a text 
message");
+
+         // Step 8. Send the Message
+         producer.send(message);
+
+         System.out.println("Sent message: " + message.getText());
+
+         // Step 9. Create a JMS Message Consumer
+         MessageConsumer messageConsumer = session.createConsumer(queue);
+
+         // Step 10. Receive the message
+         TextMessage messageReceived = (TextMessage) 
messageConsumer.receive(5000);
+
+         System.out.println("Received message: " + messageReceived.getText());
+
+         return true;
+      }
+      finally
+      {
+         if (connection != null)
+         {
+            connection.close();
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-configuration.xml
new file mode 100644
index 0000000..1c4b0e0
--- /dev/null
+++ 
b/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -0,0 +1,50 @@
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+   
<bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
+
+   
<journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
+
+   
<large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
+
+   
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
+   
+   <connectors>
+      <connector name="netty-connector">
+         
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+      </connector>
+   </connectors>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
        
+      </acceptor>
+      <acceptor name="openwire-acceptor">
+         
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
        
+         <param key="protocols" value="OPENWIRE" />
+         <param key="port" value="61616" />
+     </acceptor>
+   </acceptors>
+
+   <!-- Other config -->
+
+   <security-settings>
+         <security-setting match="jms.topic.ActiveMQ.Advisory.#">
+                <permission type="createNonDurableQueue" roles="guest"/>       
          
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+         </security-setting>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-jms.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-jms.xml 
b/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-jms.xml
new file mode 100644
index 0000000..71b83dd
--- /dev/null
+++ b/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-jms.xml
@@ -0,0 +1,19 @@
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+   <!--the connection factory used by the example-->
+   <connection-factory name="ConnectionFactory">
+      <connectors>
+         <connector-ref connector-name="netty-connector"/>
+      </connectors>
+      <entries>
+         <entry name="ConnectionFactory"/>
+      </entries>
+   </connection-factory>
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-users.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-users.xml 
b/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-users.xml
new file mode 100644
index 0000000..934306c
--- /dev/null
+++ b/examples/jms/openwire/src/main/resources/hornetq/server0/hornetq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:hornetq" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-cpp/compile.sh
----------------------------------------------------------------------
diff --git a/examples/jms/proton-cpp/compile.sh 
b/examples/jms/proton-cpp/compile.sh
new file mode 100755
index 0000000..7ff5579
--- /dev/null
+++ b/examples/jms/proton-cpp/compile.sh
@@ -0,0 +1,2 @@
+# This requires g++ and qpid-cpp-client-devel
+g++ src/main/cpp/hello.cpp  -o hello -l qpidmessaging -l qpidtypes

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-cpp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-cpp/pom.xml b/examples/jms/proton-cpp/pom.xml
new file mode 100644
index 0000000..b7fde84
--- /dev/null
+++ b/examples/jms/proton-cpp/pom.xml
@@ -0,0 +1,135 @@
+<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.hornetq.examples.jms</groupId>
+      <artifactId>jms-examples</artifactId>
+      <version>2.5.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>hornetq-jms-protoncpp</artifactId>
+   <packaging>jar</packaging>
+   <name>HornetQ AMQP CPP Example</name>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.hornetq</groupId>
+         <artifactId>hornetq-core-client</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.hornetq</groupId>
+         <artifactId>hornetq-commons</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>io.netty</groupId>
+         <artifactId>netty-all</artifactId>
+         <version>${netty.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.javaee</groupId>
+         <artifactId>jboss-jms-api</artifactId>
+         <version>1.1.0.GA</version>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.naming</groupId>
+         <artifactId>jnp-client</artifactId>
+         <version>5.0.5.Final</version>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.spec.javax.jms</groupId>
+         <artifactId>jboss-jms-api_2.0_spec</artifactId>
+      </dependency>
+      <dependency>
+         <groupId>org.hornetq</groupId>
+         <artifactId>hornetq-amqp-protocol</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+
+   </dependencies>
+
+   <profiles>
+      <profile>
+         <id>default</id>
+         <activation>
+            <activeByDefault>true</activeByDefault>
+         </activation>
+         <build>
+            <plugins>
+               <plugin>
+                  <groupId>org.hornetq</groupId>
+                  <artifactId>hornetq-maven-plugin</artifactId>
+                  <executions>
+                     <execution>
+                        <id>start</id>
+                        <goals>
+                           <goal>start</goal>
+                        </goals>
+                        <configuration>
+                           <waitOnStart>true</waitOnStart>
+                           
<hornetqConfigurationDir>${basedir}/target/classes/hornetq/server0</hornetqConfigurationDir>
+                           <systemProperties>
+                              <property>
+                                 <name>build.directory</name>
+                                 <value>${basedir}/target/</value>
+                              </property>
+                           </systemProperties>
+                        </configuration>
+                     </execution>
+                  </executions>
+                  <configuration>
+                     <waitOnStart>false</waitOnStart>
+                     
<hornetqConfigurationDir>${basedir}/target/classes/hornetq/server0</hornetqConfigurationDir>
+                  </configuration>
+                  <dependencies>
+                     <dependency>
+                        <groupId>org.hornetq</groupId>
+                        <artifactId>hornetq-core-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.hornetq</groupId>
+                        <artifactId>hornetq-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.hornetq</groupId>
+                        <artifactId>hornetq-jms-client</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.hornetq</groupId>
+                        <artifactId>hornetq-jms-server</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.hornetq</groupId>
+                        <artifactId>hornetq-amqp-protocol</artifactId>
+                        <version>${project.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>io.netty</groupId>
+                        <artifactId>netty-all</artifactId>
+                        <version>${netty.version}</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.jboss.javaee</groupId>
+                        <artifactId>jboss-jms-api</artifactId>
+                        <version>1.1.0.GA</version>
+                     </dependency>
+                     <dependency>
+                        <groupId>org.jboss.naming</groupId>
+                        <artifactId>jnpserver</artifactId>
+                        <version>5.0.3.GA</version>
+                     </dependency>
+                  </dependencies>
+               </plugin>
+            </plugins>
+         </build>
+      </profile>
+   </profiles>
+
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-cpp/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/proton-cpp/readme.html 
b/examples/jms/proton-cpp/readme.html
new file mode 100644
index 0000000..a64588d
--- /dev/null
+++ b/examples/jms/proton-cpp/readme.html
@@ -0,0 +1,104 @@
+<html>
+<head>
+    <title>HornetQ QPID cpp example</title>
+    <link rel="stylesheet" type="text/css" href="../common/common.css" />
+    <link rel="stylesheet" type="text/css" href="../common/prettify.css" />
+    <script type="text/javascript" src="../common/prettify.js"></script>
+</head>
+<body onload="prettyPrint()">
+<h1>AMQP CPP example</h1>
+
+<p>HornetQ is a multi protocol broker. It will inspect the initial handshake 
of clients to determine what protocol to use.</p>
+<p>All you need to do is to connect a client into hornetq's configured port 
and you should be able connect.</p>
+<p>To run this example simply run the command <literal>mvn verify</literal>, 
execute the compile.sh script and start the executable called ./hello</p>
+<pre>
+    # first make sure you have the dependencies you need to compile and run 
the client
+    # You will have to adapt this step according to your platform. Consult the 
<a href="http://qpid.apache.org/releases/qpid-0.30/programming/book/";>qpid 
docs</a> for more information.
+    # There is a list of <a 
href="http://qpid.apache.org/packages.html";>packages</a> you can install as 
well.
+    [proton-cpp]$ sudo yum install qpid-cpp-client-devel
+
+    # on a first window
+    [proton-cpp]$ mvn verify
+
+    # on a second window
+    # That goes without saying but you will of course need g++ (the C++ 
compiler) installed
+    [proton-cpp]$ ./compile.sh
+    [proton-cpp]$ ./hello
+</pre>
+
+
+<p>You don't need to do anything special to configure the HornetQ server to 
accept AMQP clients. </p>
+<p>Just for the sake of documentation though we are setting the port of 
HornetQ on this example as 5672 which is the port qpid have by default. </p>
+<p>This is totally optional and you don't need to follow this convention. You 
can use any port you chose including HornetQ's 5445 default port</p>
+     <pre class="prettyprint">
+     <code>
+         &lt;acceptor name="proton-acceptor"&gt;
+         
&lt;factory-class&gt;org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class&gt;
+         &lt;param key="port" value="5672"/&gt;
+         &lt;/acceptor&gt;
+     </code>
+     </pre>
+<h2>Example step-by-step</h2>
+<p> We are using qpid cpp client on this example. There are several libraries 
you may chose from for AMQP. We have ellect one that we consider simple enough 
for users.</p>
+
+<p> This example is based on <a 
href='http://qpid.apache.org/releases/qpid-0.30/messaging-api/cpp/examples/hello_world.cpp.html'>qpid's
 hello world example</a>.</p>
+<ol>
+    <li>qpid-cpp-client-devel installed.</li>
+    <p>Assuming you are on Linux Fedora, you will need to run this following 
command</p>
+    <pre class="prettyprint">
+        <code>yum install qpid-cpp-client-devel</code>
+    </pre>
+    <p>Consult the <a 
href="http://qpid.apache.org/releases/qpid-0.30/programming/book/";>qpid 
documentation</a>, and <a href="http://qpid.apache.org/packages.html";>the 
required </a> packages for information on other platoforms.</p>
+    <li>Make the proper C++ imports</li>
+
+    <li> Create an amqp qpid 1.0 connection.</li>
+        <pre class="prettyprint">
+           <code>
+        std::string broker = argc > 1 ? argv[1] : "localhost:5445";
+        std::string address = argc > 2 ? argv[2] : "jms.queue.exampleQueue";
+        std::string connectionOptions = argc > 3 ? argv[3] : 
"{protocol:amqp1.0}"; // Look at the <a 
href="http://qpid.apache.org/releases/qpid-0.30/programming/book/connections.html#connection-options";>docs</a>
 for more options
+
+        Connection connection(broker, connectionOptions);
+        connection.open();
+           </code>
+        </pre>
+
+    <li>Create a session</li>
+        <pre class="prettyprint">
+       <code>Session session = connection.createSession();</code>
+        </pre>
+
+    <li>Create a sender</li>
+        <pre class="prettyprint">
+       <code>Sender sender = session.createSender(address);</code>
+        </pre>
+
+    <li>send a simple message</li>
+        <pre class="prettyprint">
+       <code>sender.send(Message("Hello world!"));</code>
+        </pre>
+
+    <li>create a receiver</li>
+        <pre class="prettyprint">
+       <code>Receiver receiver = session.createReceiver(address);</code>
+        </pre>
+
+    <li>receive the simple message</li>
+        <pre class="prettyprint">
+      <code>Message message = receiver.fetch(Duration::SECOND * 1);
+      </code>
+        </pre>
+
+    <li>acknowledge the message</li>
+        <pre class="prettyprint">
+      <code>session.acknowledge();</code>
+        </pre>
+
+    <li>close the connection</li>
+        <pre class="prettyprint">
+      <code>connection.close();</code>
+        </pre>
+</ol>
+
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-cpp/src/main/cpp/hello.cpp
----------------------------------------------------------------------
diff --git a/examples/jms/proton-cpp/src/main/cpp/hello.cpp 
b/examples/jms/proton-cpp/src/main/cpp/hello.cpp
new file mode 100644
index 0000000..a14eff5
--- /dev/null
+++ b/examples/jms/proton-cpp/src/main/cpp/hello.cpp
@@ -0,0 +1,72 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// Step 2. Make the proper C++ imports
+#include <qpid/messaging/Connection.h>
+#include <qpid/messaging/Message.h>
+#include <qpid/messaging/Receiver.h>
+#include <qpid/messaging/Sender.h>
+#include <qpid/messaging/Session.h>
+
+#include <iostream>
+
+using namespace qpid::messaging;
+
+int main(int argc, char** argv) {
+    std::string broker = argc > 1 ? argv[1] : "localhost:5445";
+    std::string address = argc > 2 ? argv[2] : "jms.queue.exampleQueue";
+
+    // Connection options documented at 
http://qpid.apache.org/releases/qpid-0.30/programming/book/connections.html#connection-options
+    std::string connectionOptions = argc > 3 ? argv[3] : "{protocol:amqp1.0}";
+
+    try {
+         // Step 3. Create an amqp qpid 1.0 connection
+        Connection connection(broker, connectionOptions);
+        connection.open();
+
+         // Step 4. Create a session
+        Session session = connection.createSession();
+
+         // Step 5. Create a sender
+        Sender sender = session.createSender(address);
+
+         // Step 6. send a simple message
+        sender.send(Message("Hello world!"));
+
+         // Step 7. create a receiver
+        Receiver receiver = session.createReceiver(address);
+
+         // Step 8. receive the simple message
+        Message message = receiver.fetch(Duration::SECOND * 1);
+        std::cout << "Received a message with this following content \"" << 
message.getContent() << "\"" << std::endl;
+
+         // Step 9. acknowledge the message
+        session.acknowledge();
+
+        // Step 10. close the connection
+        connection.close();
+        return 0;
+    } catch(const std::exception& error) {
+        std::cerr << error.what() << std::endl;
+        return 1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-configuration.xml
new file mode 100644
index 0000000..253375e
--- /dev/null
+++ 
b/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -0,0 +1,35 @@
+<configuration xmlns="urn:hornetq"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+               xsi:schemaLocation="urn:hornetq 
/schema/hornetq-configuration.xsd">
+
+   
<bindings-directory>${build.directory}/server0/data/messaging/bindings</bindings-directory>
+
+   
<journal-directory>${build.directory}/server0/data/messaging/journal</journal-directory>
+
+   
<large-messages-directory>${build.directory}/server0/data/messaging/largemessages</large-messages-directory>
+
+   
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
+
+
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="proton-acceptor">
+         
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+      </acceptor>
+   </acceptors>
+
+   <!-- Other config -->
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.exampleQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-jms.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-jms.xml 
b/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-jms.xml
new file mode 100644
index 0000000..9ec5894
--- /dev/null
+++ b/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-jms.xml
@@ -0,0 +1,10 @@
+<configuration xmlns="urn:hornetq"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+               xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-users.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-users.xml 
b/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-users.xml
new file mode 100644
index 0000000..934306c
--- /dev/null
+++ 
b/examples/jms/proton-cpp/src/main/resources/hornetq/server0/hornetq-users.xml
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:hornetq" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-j/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/proton-j/readme.html 
b/examples/jms/proton-j/readme.html
index cac21b0..c732a66 100644
--- a/examples/jms/proton-j/readme.html
+++ b/examples/jms/proton-j/readme.html
@@ -8,16 +8,17 @@
 <body onload="prettyPrint()">
 <h1>Proton qpid java example</h1>
 
-<p>HornetQ can be configured to accept requests from any AMQP client that 
supports the 1.0 version of the protocol.
-    This example shows a simply qpid java 1.0 client example</p>
-<p>To run the example simply run the command <literal>mvn verify</literal></p>
+<<p>HornetQ is a multi protocol broker. It will inspect the initial handshake 
of clients to determine what protocol to use.</p>
+<p>All you need to do is to connect a client into hornetq's configured port 
and you should be able connect.</p>
+<p>To run this example simply run the command <literal>mvn verify</literal>, 
execute the compile.sh script and start the executable called ./hello</p>
 
-<p>To configure HornetQ to accept AMQP client connections you need to add an 
Acceptor like so:</p>
+<p>You don't need to do anything special to configure the HornetQ server to 
accept AMQP clients. </p>
+<p>Just for the sake of documentation though we are setting the port of 
HornetQ on this example as 5672 which is the port qpid have by default. </p>
+<p>This is totally optional and you don't need to follow this convention. You 
can use any port you chose including HornetQ's 5445 default port</p>
      <pre class="prettyprint">
      <code>
          &lt;acceptor name="proton-acceptor"&gt;
          
&lt;factory-class&gt;org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory&lt;/factory-class&gt;
-         &lt;param key="protocol" value="AMQP"/&gt;
          &lt;param key="port" value="5672"/&gt;
          &lt;/acceptor&gt;
      </code>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-j/src/main/java/org/hornetq/jms/example/ProtonJExample.java
----------------------------------------------------------------------
diff --git 
a/examples/jms/proton-j/src/main/java/org/hornetq/jms/example/ProtonJExample.java
 
b/examples/jms/proton-j/src/main/java/org/hornetq/jms/example/ProtonJExample.java
index 64defa2..7f848fc 100644
--- 
a/examples/jms/proton-j/src/main/java/org/hornetq/jms/example/ProtonJExample.java
+++ 
b/examples/jms/proton-j/src/main/java/org/hornetq/jms/example/ProtonJExample.java
@@ -41,13 +41,13 @@ public class ProtonJExample extends HornetQExample
          Session session = connection.createSession();
 
          // Step 3. Create a sender
-         Sender sender = session.createSender("testQueue");
+         Sender sender = session.createSender("jms.queue.exampleQueue");
 
          // Step 4. send a simple message
          sender.send(new Message("I am an amqp message"));
 
          // Step 5. create a moving receiver, this means the message will be 
removed from the queue
-         Receiver rec = session.createMovingReceiver("testQueue");
+         Receiver rec = session.createMovingReceiver("jms.queue.exampleQueue");
 
          // Step 6. set some credit so we can receive
          rec.setCredit(UnsignedInteger.valueOf(1), false);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 5040931..6975003 100644
--- 
a/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -15,7 +15,6 @@
     <acceptors>
         <acceptor name="proton-acceptor">
             
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-            <param key="protocol" value="AMQP"/>
             <param key="port" value="5672"/>
         </acceptor>
     </acceptors>
@@ -30,7 +29,7 @@
 
    <security-settings>
       <!--security for example queue-->
-      <security-setting match="testQueue">
+      <security-setting match="jms.queue.exampleQueue">
          <permission type="createDurableQueue" roles="guest"/>
          <permission type="deleteDurableQueue" roles="guest"/>
          <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-jms.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-jms.xml 
b/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-jms.xml
index 2aef01e..b2ec7ca 100644
--- a/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-jms.xml
+++ b/examples/jms/proton-j/src/main/resources/hornetq/server0/hornetq-jms.xml
@@ -2,5 +2,9 @@
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
             xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
 
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
 
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-failback-static/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/readme.html 
b/examples/jms/replicated-failback-static/readme.html
index c04419b..79e8f98 100644
--- a/examples/jms/replicated-failback-static/readme.html
+++ b/examples/jms/replicated-failback-static/readme.html
@@ -7,8 +7,6 @@
   </head>
   <body onload="prettyPrint()">
      <h1>JMS Multiple Failover using Replication Example</h1>
-
-     <b>Note that failback example is not working in 2.3.0.Alpha but will be 
fully functional in the next release.</b>
      
      <p>This example demonstrates three servers coupled as a 
live-backup-backup group for high availability (HA) using replication, and a 
client
      connection failing over from live to backup when the live server is 
crashed and then to the second backup once the new live fails.</p>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 8fa244a..e761e94 100644
--- 
a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -14,10 +14,14 @@
 
    <cluster-password>secret</cluster-password>
 
-   <ha-policy template="REPLICATED">
-      <!--we need this for auto failback-->
-      <check-for-live-server>true</check-for-live-server>
-      <allow-failback>true</allow-failback>
+   <ha-policy>
+      <replication>
+         <master>
+            <!--we need this for auto failback-->
+            <check-for-live-server>true</check-for-live-server>
+            <allow-failback>true</allow-failback>
+         </master>
+      </replication>
    </ha-policy>
 
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 5efbb42..d523667 100644
--- 
a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -14,10 +14,14 @@
 
     <cluster-password>secret</cluster-password>
 
-   <ha-policy template="BACKUP_REPLICATED">
-      <allow-failback>true</allow-failback>
-      <!-- not needed but tells the backup not to restart after failback as 
there will be > 0 backups saved -->
-      
<max-saved-replicated-journals-size>0</max-saved-replicated-journals-size>
+   <ha-policy>
+      <replication>
+         <slave>
+            <allow-failback>true</allow-failback>
+            <!-- not needed but tells the backup not to restart after failback 
as there will be > 0 backups saved -->
+            
<max-saved-replicated-journals-size>0</max-saved-replicated-journals-size>
+         </slave>
+      </replication>
    </ha-policy>
 
    <!-- Connectors -->

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/replicated-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
index fb7ece0..c2f96ef 100644
--- 
a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-failback/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -14,10 +14,14 @@
 
    <cluster-password>secret</cluster-password>
 
-   <ha-policy template="REPLICATED">
-      <!--we need this for auto failback-->
-      <check-for-live-server>true</check-for-live-server>
-      <allow-failback>true</allow-failback>
+   <ha-policy>
+      <replication>
+         <master>
+            <!--we need this for auto failback-->
+            <check-for-live-server>true</check-for-live-server>
+            <allow-failback>true</allow-failback>
+         </master>
+      </replication>
    </ha-policy>
 
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/replicated-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
index c4178eb..183f7cc 100644
--- 
a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-failback/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -14,8 +14,12 @@
 
    <cluster-password>secret</cluster-password>
 
-   <ha-policy template="BACKUP_REPLICATED">
-      <allow-failback>true</allow-failback>
+   <ha-policy>
+      <replication>
+         <slave>
+            <allow-failback>true</allow-failback>
+         </slave>
+      </replication>
    </ha-policy>
 
    <!-- Connectors -->

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
index cc04ddc..50b968e 100644
--- 
a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="SHARED_STORE"/>
+   <ha-policy>
+      <replication>
+         <master/>
+      </replication>
+   </ha-policy>
 
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 633f3c4..36ffd7c 100644
--- 
a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_REPLICATED"/>
+   <ha-policy>
+      <replication>
+         <slave/>
+      </replication>
+   </ha-policy>
 
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
 
b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
index 325b6ab..1b571da 100644
--- 
a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server2/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_REPLICATED"/>
+   <ha-policy>
+      <replication>
+         <slave/>
+      </replication>
+   </ha-policy>
     
    <connectors>
       <connector name="netty-live-connector">

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 551725f..3630d94 100644
--- 
a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="REPLICATED"/>
+   <ha-policy>
+      <replication>
+         <master/>
+      </replication>
+   </ha-policy>
 
    <!-- Connectors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 66b6f39..e371cdb 100644
--- 
a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -1,6 +1,6 @@
 <configuration xmlns="urn:hornetq"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="urn:hornetq 
../../../../../../../hornetq-core/src/main/resources/schema/hornetq-configuration.xsd">
+         xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
 
    
<bindings-directory>${build.directory}/server1/data/messaging/bindings</bindings-directory>
 
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server1/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_REPLICATED"/>
+   <ha-policy>
+      <replication>
+         <slave/>
+      </replication>
+   </ha-policy>
     
    <!-- Connectors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/scale-down/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/readme.html 
b/examples/jms/scale-down/readme.html
index ab7929f..f009d58 100644
--- a/examples/jms/scale-down/readme.html
+++ b/examples/jms/scale-down/readme.html
@@ -13,16 +13,18 @@
      <p>The second live server is killed and its messages are scaled down to 
the first server on shutdown.</p>
      <p>The following shows how to configure the live servers to scale down to 
one another.</p>
      <pre class="prettyprint">
-     <code>&lt;ha-policy template="NONE">
-         &lt;scale-down>true&lt;/scale-down>
-         &lt;scale-down-connectors>
-         &lt;connector-ref>server1-connector&lt;/connector-ref>
-         &lt;/scale-down-connectors>
-     </ha-policy>
+     <code>
+     &lt;ha-policy>
+         &lt;live-only>
+             &lt;scale-down>
+                 &lt;connectors>
+                     &lt;connector-ref>server0-connector&lt;/connector-ref>
+                 &lt;/connectors>
+             &lt;/scale-down>
+         &lt;/live-only>
+     &lt;/ha-policy>
      </code>
      </pre>
-     <p>notice that we have used a template to set some sensible defaults but 
overridden the backup strategy so back ups
-     are full servers</p>
      <h2>Example step-by-step</h2>
      <p><i>To run the example, simply type <code>mvn verify</code> from this 
directory</i></p>
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 23faf76..1990397 100644
--- 
a/examples/jms/scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/scale-down/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -62,13 +62,7 @@
       </cluster-connection>
    </cluster-connections>
 
-   <!--a live server that will scale down on server shutdown-->
-   <ha-policy template="NONE">
-      <scale-down>true</scale-down>
-      <scale-down-connectors>
-         <connector-ref>server1-connector</connector-ref>
-      </scale-down-connectors>
-   </ha-policy>
+   <ha-policy/>
    
    <!-- Other config -->
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 8041fb4..9db2874 100644
--- 
a/examples/jms/scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/scale-down/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -64,11 +64,14 @@
    </cluster-connections>
 
    <!--a live server that will scale down on server shutdown-->
-   <ha-policy template="NONE">
-      <scale-down>true</scale-down>
-      <scale-down-connectors>
-         <connector-ref>server0-connector</connector-ref>
-      </scale-down-connectors>
+   <ha-policy>
+      <live-only>
+         <scale-down>
+            <connectors>
+               <connector-ref>server0-connector</connector-ref>
+            </connectors>
+         </scale-down>
+      </live-only>
    </ha-policy>
    
    <!-- Other config -->

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 037891d..8ebca5d 100644
--- 
a/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <master/>
+      </shared-store>
+   </ha-policy>
     
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
index 191c5e7..c6a960b 100644
--- 
a/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
     
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/topic/src/main/resources/hornetq/server0/hornetq-beans.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/topic/src/main/resources/hornetq/server0/hornetq-beans.xml 
b/examples/jms/topic/src/main/resources/hornetq/server0/hornetq-beans.xml
deleted file mode 100644
index 171d373..0000000
--- a/examples/jms/topic/src/main/resources/hornetq/server0/hornetq-beans.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
-
-   <!-- JNDI server. Disable this if you don't want JNDI -->
-   <bean name="JNDIServer" class="org.jnp.server.Main">
-      <property name="namingInfo">
-         <inject bean="Naming"/>
-      </property>
-      <property name="port">1099</property>
-      <property name="bindAddress">localhost</property>
-      <property name="rmiPort">1098</property>
-      <property name="rmiBindAddress">localhost</property>
-   </bean>
-   
-   <!-- MBean server -->
-   <bean name="MBeanServer" class="javax.management.MBeanServer">
-      <constructor factoryClass="java.lang.management.ManagementFactory"
-                   factoryMethod="getPlatformMBeanServer"/>
-   </bean> 
-
-   <!-- The core configuration -->
-   <bean name="Configuration" 
class="org.hornetq.core.config.impl.FileConfiguration"/>
-
-   <!-- The security manager -->
-   <bean name="HornetQSecurityManager" 
class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl">
-      <start ignored="true"/>
-      <stop ignored="true"/>
-   </bean>
-
-   <!-- The core server -->
-   <bean name="HornetQServer" 
class="org.hornetq.core.server.impl.HornetQServerImpl">
-      <constructor>
-         <parameter>
-            <inject bean="Configuration"/>
-         </parameter>
-         <parameter>
-            <inject bean="MBeanServer"/>
-         </parameter>
-         <parameter>
-            <inject bean="HornetQSecurityManager"/>
-         </parameter>        
-      </constructor>
-      <start ignored="true"/>
-      <stop ignored="true"/>
-   </bean>
-   
-   <!-- The JMS server -->
-   <bean name="JMSServerManager" 
class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
-      <constructor>         
-         <parameter>
-            <inject bean="HornetQServer"/>
-         </parameter>
-      </constructor>
-   </bean>
-
-</deployment>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
 
b/examples/jms/transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
index 3669a9c..2d5dbcd 100644
--- 
a/examples/jms/transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
+++ 
b/examples/jms/transaction-failover/src/main/resources/hornetq/server0/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <master/>
+      </shared-store>
+   </ha-policy>
     
    <!-- Connectors -->
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
----------------------------------------------------------------------
diff --git 
a/examples/jms/transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
 
b/examples/jms/transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
index b23a7be..0a96b6c 100644
--- 
a/examples/jms/transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
+++ 
b/examples/jms/transaction-failover/src/main/resources/hornetq/server1/hornetq-configuration.xml
@@ -10,7 +10,11 @@
 
    
<paging-directory>${build.directory}/server0/data/messaging/paging</paging-directory>
 
-   <ha-policy template="BACKUP_SHARED_STORE"/>
+   <ha-policy>
+      <shared-store>
+         <slave/>
+      </shared-store>
+   </ha-policy>
     
    <!-- Connectors -->
    <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/jms/xa-with-jta/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-with-jta/pom.xml b/examples/jms/xa-with-jta/pom.xml
index 4a14816..e0c915d 100644
--- a/examples/jms/xa-with-jta/pom.xml
+++ b/examples/jms/xa-with-jta/pom.xml
@@ -24,7 +24,7 @@
       </dependency>
       <dependency>
          <groupId>org.jboss.spec.javax.transaction</groupId>
-         <artifactId>jboss-transaction-api_1.1_spec</artifactId>
+         <artifactId>jboss-transaction-api_1.2_spec</artifactId>
       </dependency>
       <dependency>
          <groupId>org.jboss.jbossts</groupId>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/soak/normal/README
----------------------------------------------------------------------
diff --git a/examples/soak/normal/README b/examples/soak/normal/README
index 831806f..b1025c4 100644
--- a/examples/soak/normal/README
+++ b/examples/soak/normal/README
@@ -2,23 +2,36 @@
 * Soak Test For Manual Reconnection of JMS Clients *
 ****************************************************
 
-Run The Server
-==============
+Running the Soak Tests
+=======================
+
+The default soak tests with start a HornetQ instance, 1 producer and 1 
consumer.  To run the default suite.
+
+  $mvn verify
+
+Run The Server Standalone
+==========================
+
+If would like to run a number of servers or run the server on a different 
machine:
 
 To run server using the default configuration (server0, using localhost):
-   $ ant runServer
+   $ mvn verify -Pserver
 
 To run multiple servers, you can specify the server configuration directory 
using server.dir 
 system property (which defaults to server0). To run a 2nd server with a 
configuration stored in server1:
 
-   $ ant -Dserver.dir=server1 
+   $ mvn verify -Pserver -Dserver.dir=server1
 
-server1 dir contains a copy of server0 with different settings.
+server1 should contain a copy of configuration equivilent to that found under 
the server0 director with different
+settings.
 
-To run a server with the same configuration but on a different host, change:
+To run a server with the same configuration but on a different host.  Check 
out this source on the host machine and
+change:
 * hornetq.remoting.netty.host property in hornetq-configuration.xml
 * bindAddress and rmiBindAddress properties in hornetq-beans.xml
 
+  $ mvn verify -P server
+
 Configure Server Dump
 =====================
 
@@ -39,23 +52,22 @@ total paging memory:   0,00 B
 # of conns:      0
 ********************
 
-Run The Client
-==============
+Run The Clients
+===============
+
+The clients can be run separate from the server using:
+
+  $ mvn verify -Premote
+
+Parameters are specified in soak.properties.
 
-Senders (resp. receivers) are run with "ant runSender" (resp. "ant 
runReceiver").
-Parameters are specified in soak.properties. 
 The duration of the tests is configured by duration-in-minutes (defaults to 2 
minutes, set to 
 -1 to run the test indefinitely).
 
-To configure the soak properties to run the client, use the system property 
soak.props.
+To configure the soak properties different to the defaults for the clients, 
use the system property
 To specify the JNDI server to connect to, use the system property jndi.address
-(defaults to localhost) and jndi.port (defaults to 1099)
-
-To run a receiver connected to the local server with soak.properties
-  $  ant runReceiver
 
-To run a sender connected to another server using settings in 
paging-soak.properties:
-  $ ant runSender -Djndi.address=172.16.8.10 -Djndi.port=2099 
-Dsoak.props=paging-soak.properties
+  $ mvn verify -Premote -Dsoak.props=<path to properties> 
-Pjndi.address=jnp:remote.host:1099
 
 Every 1000th message, the clients will display their recent activity:
 
@@ -72,6 +84,3 @@ You can kill the server (ctl+c or kill -9), the clients are 
configured to reconn
 indefinitely to the same single server (even in case of clean shutdown)
 Once the server restarts, all the clients will resume their activities after 
reconnecting
 to the server.
-
-
-

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/examples/soak/normal/build.xml
----------------------------------------------------------------------
diff --git a/examples/soak/normal/build.xml b/examples/soak/normal/build.xml
deleted file mode 100644
index 9b04232..0000000
--- a/examples/soak/normal/build.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-      <!ENTITY libraries SYSTEM "../../../thirdparty/libraries.ent">
-      ]>
-
-<!--
-Copyright 2009 Red Hat, Inc.
- Red Hat 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 name="HornetQ JMS Soak Example">
-
-       <import file="../../common/build.xml" />
-
-    <property name="server.dir" value="server0" />
-    <property name="jndi.address" value="localhost" />
-    <property name="jndi.port" value="1099" />
-    <property name="soak.props" value="soak.properties" />
-       
-       <path id="extra.classpath">
-               <path location="${server.dir}" />
-               <fileset dir="extra-libs">
-                       <include name="*.jar" />
-               </fileset>
-       </path>
-
-       <path id="the.classpath">
-               <path refid="client.classpath" />
-               <path location="." />
-       </path>
-
-       <target name="runSender" depends="compile">
-           <property name="jndi.url" 
value="jnp://${jndi.address}:${jndi.port}" />
-               <java classname="org.hornetq.jms.soak.example.SoakSender" 
fork="true" resultproperty="example-result">
-                       <jvmarg value="-Xms512M" />
-                       <jvmarg value="-Xmx512M" />
-                       <jvmarg value="-XX:+UseParallelGC" />
-                       <jvmarg value="-XX:+AggressiveOpts" />
-                       <jvmarg value="-Dcom.sun.management.jmxremote" />
-                       <jvmarg value="-XX:+UseFastAccessorMethods" />
-                       <!--
-                 <jvmarg 
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>
-             -->
-                       <jvmarg 
value="-Djava.util.logging.config.file=${config.dir}/logging.properties" />
-                       <classpath refid="the.classpath" />
-                       <arg line="${jndi.url} ${soak.props}" />
-               </java>
-       </target>
-
-       <target name="runReceiver" depends="compile">
-           <property name="jndi.url" 
value="jnp://${jndi.address}:${jndi.port}" />
-               <java classname="org.hornetq.jms.soak.example.SoakReceiver" 
fork="true" resultproperty="example-result">
-                       <jvmarg value="-Xms512M" />
-                       <jvmarg value="-Xmx512M" />
-                       <jvmarg value="-XX:+UseParallelGC" />
-                       <jvmarg value="-XX:+AggressiveOpts" />
-                       <jvmarg value="-Dcom.sun.management.jmxremote" />
-                       <jvmarg value="-XX:+UseFastAccessorMethods" />
-                       <!--
-                 <jvmarg 
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>
-             -->
-                       <jvmarg 
value="-Djava.util.logging.config.file=${config.dir}/logging.properties" />
-                       <classpath refid="the.classpath" />
-                       <arg line="${jndi.url} ${soak.props}" />
-               </java>
-       </target>
-
-       <target name="runServer" depends="compile">
-           <echo message="Using server configuration from server.dir: 
${server.dir}" />
-               <java 
classname="org.hornetq.common.example.SpawnedHornetQServer" fork="true" 
clonevm="true" resultproperty="example-result">
-                       <jvmarg value="-Xms2048M" />
-                       <jvmarg value="-Xmx2048M" />
-                       <jvmarg value="-XX:+UseParallelGC" />
-                       <sysproperty key="java.library.path" 
value="${java.library.path}${path.separator}${aio.library.path}" />
-                       <jvmarg value="-XX:+AggressiveOpts" />
-                       <jvmarg value="-XX:+UseFastAccessorMethods" />
-                       <jvmarg 
value="-Djava.util.logging.config.file=${config.dir}/logging.properties" />
-                       <jvmarg value="-Dcom.sun.management.jmxremote" />
-                       <arg line="hornetq-beans.xml" />
-                       <classpath refid="extra.classpath" />
-                       <classpath refid="server.classpath" />
-               </java>
-       </target>
-</project>

Reply via email to