activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [28/52] [abbrv] [partial] activemq-artemis git commit: This commit has improvements on the examples including:
Date Wed, 12 Aug 2015 03:47:22 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/aerogear/readme.html
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/aerogear/readme.html b/examples/broker-features/sub-modules/aerogear/readme.html
new file mode 100644
index 0000000..3534a4c
--- /dev/null
+++ b/examples/broker-features/sub-modules/aerogear/readme.html
@@ -0,0 +1,157 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+  <head>
+    <title>ActiveMQ Artemis JMS AeroGear 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 AeroGear 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 how you can send a message to a mobile device by leveraging <a href="http://aerogear.org/push/">AeroGears push</a> technology which
+         provides support for different push notification technologies like Google Cloud Messaging, Apple's APNs or
+         Mozilla's SimplePush.</p>
+
+     <p>For this example you will need an AeroGear Application running somewhere, a good way to do this is to deploy the
+        Push Application on <href a="">openshift</href>, you can follow the AeroGear Push 0.X Quickstart.</p>
+
+     <p>Once you have created your AeroGear Push Application you can create a mobile application. Simply log into the application
+     on the web and create a new mobile application by clicking the 'create' button. Once created you will see an application id
+     and a master secret, you will need the later to run the example.</p>
+
+     <p>lastly you will need to create a variant. For this example we will be using Android so you will need to create a google project,
+     this <a href="http://aerogear.org/docs/guides/aerogear-push-android/google-setup/">article</a> explains how to do this.
+     Once created click on your app then click 'add' to add a variant. choose 'google cloud messaging', enter your google
+         API key and the project number from your google project and click create</p>
+
+     <p>Now before we run the example we need a mobile application to receive it. Writing a mobile app is beyond the scope
+     of this example but for testing purposes we have supplied an Android app you can use, simply install on your android phone.
+     It can be found <a href="http://downloads.jboss.org.apache.activemq/ActiveMQAeroGear.apk">here</a>. For a more in depth mobile
+         app example visit the AeroGear site.</p>
+
+     <p>Once you have installed the mobile app you will need to configure the following:</p>
+     <p>AeroGear Unified Push URL : This is the URL where your aerogear server is running, something like http://myapp-mydomain.rhcloud.com
+        AeroGear Variant ID : This is the ID of the variant you created in AeroGear
+        AeroGear Variant Secret : This is the secret for your variant
+        GCM Sender ID : this is the Google project Number you created on Google
+        Variant : you can use this to target messages if needed.
+     </p>
+
+     <p>Once you set all these correctly you should get a message saying your mobile app is registered, if you log into
+         your AeroGear app you should see it registered with the variant.</p>
+
+
+     <p>Now to run the example simply run the following command
+         'mvn -Dendpoint=my aerogear url -Dapplicationid=my application id -Dmastersecret=my master secret -Djsse.enableSNIExtension=false clean verify'.
+     If you arent using java 7 you can omit the 'jsse.enableSNIExtension=false'</p>
+
+   <p>You should see something like this in your ActiveMQServer</p>
+     <ol>
+        <pre class="prettyprint">
+           <code>
+   Dec 04, 2013 3:25:39 PM org.jboss.aerogear.unifiedpush.SenderClient submitPayload
+   INFO: HTTP Response code from UnifiedPush Server: 302
+   Dec 04, 2013 3:25:39 PM org.jboss.aerogear.unifiedpush.SenderClient submitPayload
+   INFO: Performing redirect to 'https://myapp-mydomain.rhcloud.com/rest/sender/'
+   Dec 04, 2013 3:25:40 PM org.jboss.aerogear.unifiedpush.SenderClient submitPayload
+   INFO: HTTP Response code from UnifiedPush Server: 200
+           </code>
+        </pre>
+     </ol>
+   <p>And on your mobile app you should see a message from ActiveMQ</p>
+
+  <p>Now lets look a bit more closely at the configuration in broker.xml</p>
+     <ol>
+        <pre class="prettyprint">
+           <code>
+   &lt;queues>
+       &lt;queue name="jms.queue.exampleQueue">
+           &lt;address>jms.queue.exampleQueue&lt;/address>
+       &lt;/queue>
+   &lt;/queues>
+
+   &lt;connector-services>
+       &lt;connector-service name="aerogear-connector">
+           &lt;factory-class>org.apache.activemq.integration.aerogear.AeroGearConnectorServiceFactory&lt;/factory-class>
+           &lt;param key="endpoint" value="${endpoint}"/>
+           &lt;param key="queue" value="jms.queue.exampleQueue"/>
+           &lt;param key="application-id" value="${applicationid}"/>
+           &lt;param key="master-secret" value="${mastersecret}"/>
+       &lt;/connector-service>
+   &lt;/connector-services>
+           </code>
+        </pre>
+     </ol>
+  <p>Firstly you will see that we have to create a core queue so it is available when the connector is started, the following are mandatory parameters:</p>
+  <ol>
+      <li>endpoint - The endpoint or URL of you AeroGear application</li>
+      <li>queue - The name of the queue to consume from</li>
+      <li>application-id - The application id of your mobile application in AeroGear</li>
+      <li>master-secret - the secret of your mobile application in AeroGear</li>
+  </ol>
+  <p>as well as those there are also the following optional parameters</p>
+  <ol>
+      <li>ttl - The time to live for the message once AeroGear receives it</li>
+      <li>badge - The badge the mobile app should use for the notification</li>
+      <li>sound - The sound the mobile app should use for the notification</li>
+      <li>filter - A message filter(selector) to use on the connector</li>
+      <li>retry-interval - If an error occurs on send, how long before we try again</li>
+      <li>retry-attempts - How many times we should try to reconnect after an error</li>
+      <li>variants - A comma separated list of variants that should get the message</li>
+      <li>aliases - A list of aliases that should get the message</li>
+      <li>device-types - A list of device types that should get the message</li>
+  </ol>
+  <p>More in depth explanations of these can be found in the AeroGear docs.</p>
+  <p>Now lets look at a snippet of code we used to send the message for our JMS client</p>
+  <pre class="prettyprint">
+      <code>
+  Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+
+  // Step 3. Perform a lookup on the Connection Factory
+  ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+
+  // Step 4.Create a JMS Connection
+  connection = cf.createConnection();
+
+  // Step 5. Create a JMS Session
+  Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+  // Step 6. Create a JMS Message Producer
+  MessageProducer producer = session.createProducer(queue);
+
+  // Step 7. Create a Text Message
+  Message message = session.createMessage();
+
+  message.setStringProperty("AEROGEAR_ALERT", "Hello this is a notification from ActiveMQ");
+
+  producer.send(message);
+      </code>
+  </pre>
+  <p> The most important thing here is string propert we have set on the message, i.e. 'AEROGEAR_ALERT'. This is the
+      actual alert that is sent via AeroGear</p>
+  <p>As well as the alert itself you can override any of the above optional parameters in the same fashionby using the
+      following propert names: AEROGEAR_SOUND,AEROGEAR_BADGE,AEROGEAR_TTL,AEROGEAR_VARIANTS,AEROGEAR_ALIASES and AEROGEAR_DEVICE_TYPES</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java b/examples/broker-features/sub-modules/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java
new file mode 100644
index 0000000..b412d87
--- /dev/null
+++ b/examples/broker-features/sub-modules/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.jms.example;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.naming.InitialContext;
+
+/**
+ * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message.
+ */
+public class AerogearExample {
+
+   public static void main(final String[] args) throws Exception {
+      Connection connection = null;
+      InitialContext initialContext = null;
+      try {
+         // Step 1. Create an initial context to perform the JNDI lookup.
+         initialContext = new InitialContext();
+
+         // Step 2. Perfom a lookup on the queue
+         Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
+
+         // Step 3. Perform a lookup on the Connection Factory
+         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
+
+         // Step 4.Create a JMS Connection
+         connection = cf.createConnection();
+
+         // Step 5. Create a JMS Session
+         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         // Step 6. Create a JMS Message Producer
+         MessageProducer producer = session.createProducer(queue);
+
+         // Step 7. Create a Text Message
+         Message message = session.createMessage();
+
+         message.setStringProperty("AEROGEAR_ALERT", "Hello this is a notification from ActiveMQ");
+
+         producer.send(message);
+
+         System.out.println("Sent message");
+
+         System.out.println("now check your mobile app and press enter");
+
+         System.in.read();
+      }
+      finally {
+         // Step 12. Be sure to close our JMS resources!
+         if (initialContext != null) {
+            initialContext.close();
+         }
+         if (connection != null) {
+            connection.close();
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/aerogear/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/aerogear/src/main/resources/activemq/server0/broker.xml b/examples/broker-features/sub-modules/aerogear/src/main/resources/activemq/server0/broker.xml
new file mode 100644
index 0000000..1095761
--- /dev/null
+++ b/examples/broker-features/sub-modules/aerogear/src/main/resources/activemq/server0/broker.xml
@@ -0,0 +1,77 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xmlns="urn:activemq"
+               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
+
+   <jms xmlns="urn:activemq:jms">
+      <!--the queue used by the example-->
+      <queue name="exampleQueue"/>
+   </jms>
+
+   <core xmlns="urn:activemq:core">
+
+      <bindings-directory>./data/bindings</bindings-directory>
+
+      <journal-directory>./data/journal</journal-directory>
+
+      <large-messages-directory>./data/largemessages</large-messages-directory>
+
+      <paging-directory>./data/paging</paging-directory>
+
+      <!-- Acceptors -->
+      <acceptors>
+         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
+      </acceptors>
+
+      <!-- We need to create a core queue for the JMS queue explicitly because the connector will be deployed
+       before the JMS queue is deployed, so the first time, it otherwise won't find the queue -->
+      <queues>
+         <queue name="jms.queue.exampleQueue">
+            <address>jms.queue.exampleQueue</address>
+         </queue>
+      </queues>
+
+      <connector-services>
+         <connector-service name="aerogear-connector">
+            <factory-class>org.apache.activemq.artemis.integration.aerogear.AeroGearConnectorServiceFactory</factory-class>
+            <param key="endpoint" value="${endpoint}"/>
+            <param key="queue" value="jms.queue.exampleQueue"/>
+            <param key="application-id" value="${applicationid}"/>
+            <param key="master-secret" value="${mastersecret}"/>
+         </connector-service>
+      </connector-services>
+
+      <!-- Other config -->
+
+      <security-settings>
+         <!--security for example queue-->
+         <security-setting match="jms.queue.exampleQueue">
+            <permission type="createDurableQueue" roles="guest"/>
+            <permission type="deleteDurableQueue" roles="guest"/>
+            <permission type="createNonDurableQueue" roles="guest"/>
+            <permission type="deleteNonDurableQueue" roles="guest"/>
+            <permission type="consume" roles="guest"/>
+            <permission type="send" roles="guest"/>
+         </security-setting>
+      </security-settings>
+   </core>
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/aerogear/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/aerogear/src/main/resources/jndi.properties b/examples/broker-features/sub-modules/aerogear/src/main/resources/jndi.properties
new file mode 100644
index 0000000..93537c4
--- /dev/null
+++ b/examples/broker-features/sub-modules/aerogear/src/main/resources/jndi.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
+connectionFactory.ConnectionFactory=tcp://localhost:61616
+queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/artemis-ra-rar/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/artemis-ra-rar/pom.xml b/examples/broker-features/sub-modules/artemis-ra-rar/pom.xml
new file mode 100644
index 0000000..cae1386
--- /dev/null
+++ b/examples/broker-features/sub-modules/artemis-ra-rar/pom.xml
@@ -0,0 +1,101 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples.modules</groupId>
+      <artifactId>broker-modules</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>artemis-rar</artifactId>
+   <packaging>rar</packaging>
+   <name>ActiveMQ Artemis JMS RA</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
+         <exclusions>
+            <exclusion>
+               <groupId>org.apache.activemq</groupId>
+               <artifactId>artemis-core-client</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>org.apache.activemq</groupId>
+               <artifactId>artemis-jms-client</artifactId>
+            </exclusion>
+            <exclusion>
+              <groupId>org.apache.geronimo.specs</groupId>
+              <artifactId>geronimo-jms_2.0_spec</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>org.apache.geronimo.specs</groupId>
+               <artifactId>geronimo-ejb_3.0_spec</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-ra</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-server</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-core-client</artifactId>
+         <version>${project.version}</version>
+         <exclusions>
+            <exclusion>
+               <groupId>org.apache.activemq</groupId>
+               <artifactId>artemis-core-client</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+      <dependency>
+         <groupId>io.netty</groupId>
+         <artifactId>netty-all</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-rar-plugin</artifactId>
+            <configuration>
+               <raXmlFile>src/main/resources/ra.xml</raXmlFile>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/artemis-ra-rar/src/main/resources/ra.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/artemis-ra-rar/src/main/resources/ra.xml b/examples/broker-features/sub-modules/artemis-ra-rar/src/main/resources/ra.xml
new file mode 100644
index 0000000..db571a3
--- /dev/null
+++ b/examples/broker-features/sub-modules/artemis-ra-rar/src/main/resources/ra.xml
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: ra.xml 76819 2008-08-08 11:04:20Z jesper.pedersen $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+           version="1.5">
+
+   <description>ActiveMQ Artemis 2.0 Resource Adapter</description>
+   <display-name>ActiveMQ Artemis 2.0 Resource Adapter</display-name>
+
+   <vendor-name>Apache Software Foundation</vendor-name>
+   <eis-type>JMS 1.1 Server</eis-type>
+   <resourceadapter-version>1.0</resourceadapter-version>
+
+   <license>
+      <description>
+         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.
+      </description>
+      <license-required>true</license-required>
+   </license>
+
+   <resourceadapter>
+      <resourceadapter-class>org.apache.activemq.artemis.ra.ActiveMQResourceAdapter</resourceadapter-class>
+      <config-property>
+         <description>
+            The transport type. Multiple connectors can be configured by using a comma separated list,
+            i.e. org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory,org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory.
+         </description>
+         <config-property-name>ConnectorClassName</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
+      </config-property>
+      <config-property>
+         <description>The transport configuration. These values must be in the form of key=val;key=val;,
+            if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=61616,host=host2;port=61617.
+            Each set of params maps to the connector classname specified.
+         </description>
+         <config-property-name>ConnectionParameters</config-property-name>
+         <config-property-type>java.lang.String</config-property-type>
+         <config-property-value>server-id=0</config-property-value>
+      </config-property>
+      <!--
+      <config-property>
+        <description>Does we support HA</description>
+        <config-property-name>HA</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value>false</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The method to use for locating the transactionmanager</description>
+        <config-property-name>TransactionManagerLocatorMethod</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value>getTm</config-property-value>
+      </config-property>
+      <config-property>
+        <description>Use A local Transaction instead of XA?</description>
+        <config-property-name>UseLocalTx</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value>false</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The user name used to login to the JMS server</description>
+        <config-property-name>UserName</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The password used to login to the JMS server</description>
+        <config-property-name>Password</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The jndi params to use to look up the jms resources if local jndi is not to be used</description>
+        <config-property-name>JndiParams</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory;java.naming.provider.url=jnp://localhost:1199;java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The jGroups File name</description>
+        <config-property-name>JgroupsFile</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value>jgroups.xml</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The name of the channel used on this configuration</description>
+        <config-property-name>JgroupsChannelName</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value>my-channel</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery group address</description>
+        <config-property-name>DiscoveryAddress</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery group port</description>
+        <config-property-name>DiscoveryPort</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery refresh timeout</description>
+        <config-property-name>DiscoveryRefreshTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery initial wait timeout</description>
+        <config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The load balancing policy class name</description>
+        <config-property-name>LoadBalancingPolicyClassName</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The client failure check period</description>
+        <config-property-name>ClientFailureCheckPeriod</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The connection TTL</description>
+        <config-property-name>ConnectionTTL</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The call timeout</description>
+        <config-property-name>CallTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The dups ok batch size</description>
+        <config-property-name>DupsOKBatchSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The transaction batch size</description>
+        <config-property-name>TransactionBatchSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The consumer window size</description>
+        <config-property-name>ConsumerWindowSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The consumer max rate</description>
+        <config-property-name>ConsumerMaxRate</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The confirmation window size</description>
+        <config-property-name>ConfirmationWindowSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The producer max rate</description>
+        <config-property-name>ProducerMaxRate</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The min large message size</description>
+        <config-property-name>MinLargeMessageSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on acknowledge</description>
+        <config-property-name>BlockOnAcknowledge</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on non durable send</description>
+        <config-property-name>BlockOnNonDurableSend</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on durable send</description>
+        <config-property-name>BlockOnDurableSend</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The auto group</description>
+        <config-property-name>AutoGroup</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The max connections</description>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The pre acknowledge</description>
+        <config-property-name>PreAcknowledge</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The retry interval</description>
+        <config-property-name>RetryInterval</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The retry interval multiplier</description>
+        <config-property-name>RetryIntervalMultiplier</config-property-name>
+        <config-property-type>java.lang.Double</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The client id</description>
+        <config-property-name>ClientID</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>Whether the password is cleartext or encrypted, default false</description>
+        <config-property-name>UseMaskedPassword</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The class definition (full qualified name and its properties) used to encrypt the password</description>
+        <config-property-name>PasswordCodec</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value>org.apache.activemq.artemis.utils.DefaultSensitiveStringCodec;key=clusterpassword;algorithm=something</config-property-value>
+      </config-property>-->
+
+      <outbound-resourceadapter>
+         <connection-definition>
+            <managedconnectionfactory-class>org.apache.activemq.artemis.ra.ActiveMQRAManagedConnectionFactory</managedconnectionfactory-class>
+
+            <config-property>
+               <description>The default session type</description>
+               <config-property-name>SessionDefaultType</config-property-name>
+               <config-property-type>java.lang.String</config-property-type>
+               <config-property-value>javax.jms.Queue</config-property-value>
+            </config-property>
+            <config-property>
+               <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
+               <config-property-name>UseTryLock</config-property-name>
+               <config-property-type>java.lang.Integer</config-property-type>
+               <config-property-value>0</config-property-value>
+            </config-property>
+
+            <connectionfactory-interface>org.apache.activemq.artemis.ra.ActiveMQRAConnectionFactory</connectionfactory-interface>
+            <connectionfactory-impl-class>org.apache.activemq.artemis.ra.ActiveMQRAConnectionFactoryImpl</connectionfactory-impl-class>
+            <connection-interface>javax.jms.Session</connection-interface>
+            <connection-impl-class>org.apache.activemq.artemis.ra.ActiveMQRASession</connection-impl-class>
+         </connection-definition>
+         <transaction-support>XATransaction</transaction-support>
+         <authentication-mechanism>
+            <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+            <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+         </authentication-mechanism>
+         <reauthentication-support>false</reauthentication-support>
+      </outbound-resourceadapter>
+
+      <inbound-resourceadapter>
+         <messageadapter>
+            <messagelistener>
+               <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+               <activationspec>
+                  <activationspec-class>org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec</activationspec-class>
+                  <required-config-property>
+                      <config-property-name>destination</config-property-name>
+                  </required-config-property>
+               </activationspec>
+            </messagelistener>
+         </messageadapter>
+      </inbound-resourceadapter>
+
+   </resourceadapter>
+</connector>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/pom.xml b/examples/broker-features/sub-modules/pom.xml
new file mode 100644
index 0000000..aeeae3c
--- /dev/null
+++ b/examples/broker-features/sub-modules/pom.xml
@@ -0,0 +1,58 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples.clustered</groupId>
+      <artifactId>broker-features</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+   </parent>
+
+   <groupId>org.apache.activemq.examples.modules</groupId>
+   <artifactId>broker-modules</artifactId>
+   <packaging>pom</packaging>
+   <name>ActiveMQ Artemis Modules Examples</name>
+
+   <!-- Properties -->
+   <properties>
+      <!--
+      Explicitly declaring the source encoding eliminates the following
+      message: [WARNING] Using platform encoding (UTF-8 actually) to copy
+      filtered resources, i.e. build is platform dependent!
+      -->
+      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+      <activemq.basedir>${project.basedir}/../../..</activemq.basedir>
+   </properties>
+
+   <profiles>
+      <!-- The modules examples need to be executed manually,
+           for that reason we won't provide an examples profile here to execute all of them at once -->
+      <profile>
+         <id>release</id>
+         <modules>
+            <module>aerogear</module>
+            <module>artemis-ra-rar</module>
+            <module>vertx</module>
+         </modules>
+      </profile>
+   </profiles>
+</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/vertx/pom.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/vertx/pom.xml b/examples/broker-features/sub-modules/vertx/pom.xml
new file mode 100644
index 0000000..e38a299
--- /dev/null
+++ b/examples/broker-features/sub-modules/vertx/pom.xml
@@ -0,0 +1,145 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples.modules</groupId>
+      <artifactId>broker-modules</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>artemis-vertx-example</artifactId>
+   <packaging>jar</packaging>
+   <name>ActiveMQ Artemis Vert.x Example</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+      <vertx.version>2.1.2</vertx.version>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-server</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-core-client</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-commons</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>io.netty</groupId>
+         <artifactId>netty-all</artifactId>
+         <version>${netty.version}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.geronimo.specs</groupId>
+         <artifactId>geronimo-jms_2.0_spec</artifactId>
+      </dependency>
+      <dependency>
+         <groupId>io.vertx</groupId>
+         <artifactId>vertx-core</artifactId>
+         <version>${vertx.version}</version>
+         <scope>provided</scope>
+      </dependency>
+      <dependency>
+         <groupId>io.vertx</groupId>
+         <artifactId>vertx-platform</artifactId>
+         <version>${vertx.version}</version>
+         <scope>provided</scope>
+      </dependency>
+      <dependency>
+         <groupId>io.vertx</groupId>
+         <artifactId>vertx-hazelcast</artifactId>
+         <version>${vertx.version}</version>
+         <scope>provided</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-vertx-integration</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+
+   </dependencies>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <libList>
+                        <arg>org.apache.activemq.examples.modules:artemis-vertx-example:${project.version}</arg>
+                     </libList>
+                     <instance>${basedir}/target/server0</instance>
+                     <configuration>${basedir}/target/classes/activemq/server0</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>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.core.example.VertxConnectorExample</clientClass>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.modules</groupId>
+                  <artifactId>artemis-vertx-example</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
+</project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/vertx/readme.html
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/vertx/readme.html b/examples/broker-features/sub-modules/vertx/readme.html
new file mode 100644
index 0000000..e8f053a
--- /dev/null
+++ b/examples/broker-features/sub-modules/vertx/readme.html
@@ -0,0 +1,103 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+  <head>
+    <title>ActiveMQ Artemis Vert.x Connector Service 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>Vert.x Connector Service Example</h1>
+
+     <p>This example shows you how to configure ActiveMQ Artemis to use the Vert.x Connector Service.</p>
+
+     <p>ActiveMQ Artemis supports 2 types of Vert.x connector, incoming and outgoing.
+     Incoming connector consumes from Vert.x event bus and forwards to a configurable address.
+     Outgoing connector consumes from a configurable address and forwards to a configurable Vert.x event bus.
+     </p>
+
+     <p>In this example, an incoming connector and an outgoing connector are configured. A simple java Verticle
+     is deployed. The verticle registers a message handler on the outgoing connector's address ("outgoing.vertx.address").
+     A String message is sent to Vert.x event bus on the incoming connector's address("incoming.vertx.address").
+     The message then will be forwarded to a ActiveMQ Artemis queue by the incoming connector. The outgoing connector listens to
+     the ActiveMQ Artemis queue and forwards the message from ActiveMQ Artemis to Vert.x event bus on the outgoing connector's address.
+     The verticle finally receives the message from it's event bus.</p>
+
+     <p>For more information on Vert.x concept please visit the <a href="http://vertx.io/">Vertx site</a></p>
+
+     <h2>Example step-by-step</h2>
+     <p><i>To run the server, simply type <code>mvn verify</code>
+         from this directory.</p>
+
+     <ol>
+        <li>First we need to create a Vert.x PlatformManager</li>
+        <pre class="prettyprint">
+           <code>platformManager = PlatformLocator.factory.createPlatformManager(PORT, HOST);</code>
+        </pre>
+
+        <li>We deploy a Verticle using the platformManager</li>
+        <pre class="prettyprint">
+           <code>String verticle = "org.apache.activemq.artemis.core.example.ExampleVerticle";
+           platformManager.deployVerticle(verticle, null, new URL[0], 1, null,
+                  new Handler<AsyncResult<String>>(){
+
+                     @Override
+                     public void handle(AsyncResult<String> result)
+                     {
+                        if (!result.succeeded())
+                        {
+                           throw new RuntimeException("failed to deploy verticle", result.cause());
+                        }
+                        latch0.countDown();
+                     }
+
+           });</code>
+        </pre>
+
+        <li>We register a message handler with the event bus in the Verticle to listen on the outgoing connector's address.</li>
+        <pre class="prettyprint">
+           <code>EventBus eventBus = vertx.eventBus();
+           eventBus.registerHandler(VertxConnectorExample.OUTGOING,
+                      new Handler<Message<?>>() {
+                         @Override
+                         public void handle(Message<?> startMsg)
+                         {
+                            Object body = startMsg.body();
+                            System.out.println("Verticle receives a message: " + body);
+                            VertxConnectorExample.result.set(VertxConnectorExample.MSG.equals(body));
+                            latch0.countDown();
+                         }
+                      });
+           </code>
+        </pre>
+
+        <li>We send a message to incoming connector's address via event bus</li>
+        <pre class="prettyprint">
+           <code>
+              EventBus bus = platformManager.vertx().eventBus();
+              bus.send(INCOMING, MSG);
+           </code>
+        </pre>
+
+        <li>The message will eventually arrives at the Verticle's message handler.</li>
+     </ol>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/ExampleVerticle.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/ExampleVerticle.java b/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/ExampleVerticle.java
new file mode 100644
index 0000000..ac6ccdc
--- /dev/null
+++ b/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/ExampleVerticle.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.example;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.vertx.java.core.Handler;
+import org.vertx.java.core.eventbus.EventBus;
+import org.vertx.java.core.eventbus.Message;
+import org.vertx.java.platform.Verticle;
+
+public class ExampleVerticle extends Verticle {
+
+   @Override
+   public void start() {
+      EventBus eventBus = vertx.eventBus();
+
+      final CountDownLatch latch0 = new CountDownLatch(1);
+
+      // Register a handler on the outgoing connector's address
+      eventBus.registerHandler(VertxConnectorExample.OUTGOING, new Handler<Message<?>>() {
+         @Override
+         public void handle(Message<?> startMsg) {
+            Object body = startMsg.body();
+            System.out.println("Verticle receives a message: " + body);
+            VertxConnectorExample.result.set(VertxConnectorExample.MSG.equals(body));
+            latch0.countDown();
+            //Tell the example to finish.
+            VertxConnectorExample.latch.countDown();
+         }
+      });
+
+      try {
+         latch0.await(5000, TimeUnit.MILLISECONDS);
+      }
+      catch (InterruptedException e) {
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/VertxConnectorExample.java
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/VertxConnectorExample.java b/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/VertxConnectorExample.java
new file mode 100644
index 0000000..e7f6d62
--- /dev/null
+++ b/examples/broker-features/sub-modules/vertx/src/main/java/org/apache/activemq/artemis/core/example/VertxConnectorExample.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.example;
+
+import java.net.URL;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.vertx.java.core.AsyncResult;
+import org.vertx.java.core.Handler;
+import org.vertx.java.core.eventbus.EventBus;
+import org.vertx.java.platform.PlatformLocator;
+import org.vertx.java.platform.PlatformManager;
+import org.vertx.java.spi.cluster.impl.hazelcast.HazelcastClusterManagerFactory;
+
+/**
+ * A simple example of using Vert.x connector service.
+ */
+public class VertxConnectorExample {
+
+   public static final String INCOMING = "incoming.vertx.address";
+   public static final String OUTGOING = "outgoing.vertx.address";
+   public static final String MSG = "Welcome to Vertx world!";
+
+   public static final CountDownLatch latch = new CountDownLatch(1);
+   public static final AtomicBoolean result = new AtomicBoolean(false);
+
+   private static final String HOST = "127.0.0.1";
+   private static final int PORT = 0;
+
+   public static void main(final String[] args) throws Exception {
+      System.setProperty("vertx.clusterManagerFactory", HazelcastClusterManagerFactory.class.getName());
+      PlatformManager platformManager = null;
+
+      try {
+         // Step 1 Create a Vert.x PlatformManager
+         platformManager = PlatformLocator.factory.createPlatformManager(PORT, HOST);
+
+         final CountDownLatch latch0 = new CountDownLatch(1);
+
+         // Step 2 Deploy a Verticle to receive message
+         String verticle = "org.apache.activemq.artemis.core.example.ExampleVerticle";
+         platformManager.deployVerticle(verticle, null, new URL[0], 1, null, new Handler<AsyncResult<String>>() {
+
+            @Override
+            public void handle(AsyncResult<String> result) {
+               if (!result.succeeded()) {
+                  throw new RuntimeException("failed to deploy verticle", result.cause());
+               }
+               latch0.countDown();
+            }
+
+         });
+
+         latch0.await();
+
+         // Step 3 Send a message to the incoming connector's address
+         EventBus bus = platformManager.vertx().eventBus();
+         bus.send(INCOMING, MSG);
+
+         // Step 4 Waiting for the Verticle to process the message
+         latch.await(10000, TimeUnit.MILLISECONDS);
+      }
+      finally {
+         if (platformManager != null) {
+            platformManager.undeployAll(null);
+            platformManager.stop();
+         }
+         reportResultAndExit();
+      }
+   }
+
+   private static void reportResultAndExit() {
+      if (!result.get()) {
+         System.err.println();
+         System.err.println("#####################");
+         System.err.println("###    FAILURE!   ###");
+         System.err.println("#####################");
+         System.exit(1);
+      }
+      else {
+         System.out.println();
+         System.out.println("#####################");
+         System.out.println("###    SUCCESS!   ###");
+         System.out.println("#####################");
+         System.exit(0);
+      }
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/broker-features/sub-modules/vertx/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/broker-features/sub-modules/vertx/src/main/resources/activemq/server0/broker.xml b/examples/broker-features/sub-modules/vertx/src/main/resources/activemq/server0/broker.xml
new file mode 100644
index 0000000..9be6726
--- /dev/null
+++ b/examples/broker-features/sub-modules/vertx/src/main/resources/activemq/server0/broker.xml
@@ -0,0 +1,81 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<configuration xmlns="urn:activemq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
+   <jms xmlns="urn:activemq:jms">
+      <!--the queue used by the example-->
+      <queue name="exampleQueue"/>
+   </jms>
+   <core xmlns="urn:activemq:core">
+      <bindings-directory>target/server0/data/messaging/bindings</bindings-directory>
+
+      <journal-directory>target/server0/data/messaging/journal</journal-directory>
+
+      <large-messages-directory>target/server0/data/messaging/largemessages</large-messages-directory>
+
+      <paging-directory>target/server0/data/messaging/paging</paging-directory>
+      <!-- Connectors -->
+
+      <connectors>
+         <connector name="netty-connector">tcp://localhost:61616</connector>
+      </connectors>
+
+      <!-- Acceptors -->
+      <acceptors>
+         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
+      </acceptors>
+
+      <!-- Other config -->
+
+      <security-settings>
+         <!--security for example queue-->
+         <security-setting match="queue.vertxQueue">
+            <permission type="consume" roles="guest"/>
+            <permission type="send" roles="guest"/>
+         </security-setting>
+      </security-settings>
+
+      <queues>
+         <queue name="queue.vertxQueue">
+            <address>queue.vertxQueue</address>
+         </queue>
+      </queues>
+
+      <connector-services>
+         <connector-service name="my-incoming-vertx">
+            <factory-class>org.apache.activemq.artemis.integration.vertx.VertxIncomingConnectorServiceFactory</factory-class>
+            <param key="queue" value="queue.vertxQueue"/>
+            <param key="host" value="localhost"/>
+            <param key="port" value="0"/>
+            <param key="vertx-address" value="incoming.vertx.address"/>
+         </connector-service>
+         <connector-service name="my-outgoing-vertx">
+            <factory-class>org.apache.activemq.artemis.integration.vertx.VertxOutgoingConnectorServiceFactory</factory-class>
+            <param key="queue" value="queue.vertxQueue"/>
+            <param key="host" value="localhost"/>
+            <param key="port" value="0"/>
+            <param key="vertx-address" value="outgoing.vertx.address"/>
+         </connector-service>
+      </connector-services>
+   </core>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/common/common.css
----------------------------------------------------------------------
diff --git a/examples/common/common.css b/examples/common/common.css
new file mode 100644
index 0000000..3d4cfd4
--- /dev/null
+++ b/examples/common/common.css
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+body {
+}
+
+h1 {
+  margin-top: 20px;
+  font-size: 250%;
+}
+
+code {
+  background-color: lightgrey;
+  color:#333;
+}
+
+pre {
+  background-color: lightgrey;
+  display:block;
+  overflow:auto;
+  border: dotted grey 1px;
+}
+
+abbr {
+  border-bottom: 1px dotted #333; cursor: help;
+}
+
+.missing-doc {
+  background-color: red;
+  border: dotted black 1px;
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/common/config/logging.properties
----------------------------------------------------------------------
diff --git a/examples/common/config/logging.properties b/examples/common/config/logging.properties
new file mode 100644
index 0000000..4f4a9de
--- /dev/null
+++ b/examples/common/config/logging.properties
@@ -0,0 +1,52 @@
+# 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.
+
+############################################################
+#  	Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler
+# classes.  These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the INFO and above levels.
+handlers=java.util.logging.ConsoleHandler
+#handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
+java.util.logging.ConsoleHandler.formatter=org.apache.activemq.artemis.integration.logging.ActiveMQLoggerFormatter
+java.util.logging.FileHandler.level=INFO
+java.util.logging.FileHandler.formatter=org.apache.activemq.artemis.integration.logging.ActiveMQLoggerFormatter
+java.util.logging.FileHandler.pattern=logs/activemq.log
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers.  For any given facility this global level
+# can be overridden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= INFO
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/common/config/server.properties
----------------------------------------------------------------------
diff --git a/examples/common/config/server.properties b/examples/common/config/server.properties
new file mode 100644
index 0000000..cff66e2
--- /dev/null
+++ b/examples/common/config/server.properties
@@ -0,0 +1,18 @@
+# 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.
+
+server.args=-XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=${imported.basedir}/config/logging.properties -Djava.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/common/prettify.css
----------------------------------------------------------------------
diff --git a/examples/common/prettify.css b/examples/common/prettify.css
new file mode 100755
index 0000000..334960b
--- /dev/null
+++ b/examples/common/prettify.css
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+
+.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun{color:#660}.pln{color:#000}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec{color:#606}pre.prettyprint{padding:2px;border:1px solid #888}@media print{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/21bf4406/examples/common/prettify.js
----------------------------------------------------------------------
diff --git a/examples/common/prettify.js b/examples/common/prettify.js
new file mode 100755
index 0000000..6365598
--- /dev/null
+++ b/examples/common/prettify.js
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+function H(){var x=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);H=function(){return x};return x}(function(){function x(b){b=b.split(/ /g);var a={};for(var c=b.length;--c>=0;){var d=b[c];if(d)a[d]=null}return a}var y="break continue do else for if return while ",U=y+"auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile ",D=U+"catch class delete false import new operator private protected public this throw true try ",
+I=D+"alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ",J=D+"boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",V=J+"as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
+K=D+"debugger eval export function get null set undefined var with Infinity NaN ",L="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",M=y+"and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",N=y+"alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",
+O=y+"case done elif esac eval fi function in local set then until ",W=I+V+K+L+M+N+O;function X(b){return b>="a"&&b<="z"||b>="A"&&b<="Z"}function u(b,a,c,d){b.unshift(c,d||0);try{a.splice.apply(a,b)}finally{b.splice(0,2)}}var Y=(function(){var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue",
+"delete","do","else","finally","instanceof","return","throw","try","typeof"],a="(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)";for(var c=0;c<b.length;++c){var d=b[c];a+=X(d.charAt(0))?"|\\b"+d:"|"+d.replace(/([^=<>:&])/g,"\\$1")}a+="|^)\\s*$";return new RegExp(a)})(),P=/&/g,Q=/</g,R=/>/g,Z=/\"/g;function $(b){return b.replace(P,"&amp;").replace(Q,"&lt;").replace(R,"&gt;").replace(Z,"&quot;")}function E(b){return b.replace(P,"&amp;").replace(Q,"&lt;").replace(R,"&gt;")}var aa=
+/&lt;/g,ba=/&gt;/g,ca=/&apos;/g,da=/&quot;/g,ea=/&amp;/g,fa=/&nbsp;/g;function ga(b){var a=b.indexOf("&");if(a<0)return b;for(--a;(a=b.indexOf("&#",a+1))>=0;){var c=b.indexOf(";",a);if(c>=0){var d=b.substring(a+3,c),g=10;if(d&&d.charAt(0)==="x"){d=d.substring(1);g=16}var e=parseInt(d,g);if(!isNaN(e))b=b.substring(0,a)+String.fromCharCode(e)+b.substring(c+1)}}return b.replace(aa,"<").replace(ba,">").replace(ca,"'").replace(da,'"').replace(ea,"&").replace(fa," ")}function S(b){return"XMP"===b.tagName}
+function z(b,a){switch(b.nodeType){case 1:var c=b.tagName.toLowerCase();a.push("<",c);for(var d=0;d<b.attributes.length;++d){var g=b.attributes[d];if(!g.specified)continue;a.push(" ");z(g,a)}a.push(">");for(var e=b.firstChild;e;e=e.nextSibling)z(e,a);if(b.firstChild||!/^(?:br|link|img)$/.test(c))a.push("</",c,">");break;case 2:a.push(b.name.toLowerCase(),'="',$(b.value),'"');break;case 3:case 4:a.push(E(b.nodeValue));break}}var F=null;function ha(b){if(null===F){var a=document.createElement("PRE");
+a.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));F=!/</.test(a.innerHTML)}if(F){var c=b.innerHTML;if(S(b))c=E(c);return c}var d=[];for(var g=b.firstChild;g;g=g.nextSibling)z(g,d);return d.join("")}function ia(b){var a=0;return function(c){var d=null,g=0;for(var e=0,h=c.length;e<h;++e){var f=c.charAt(e);switch(f){case "\t":if(!d)d=[];d.push(c.substring(g,e));var i=b-a%b;a+=i;for(;i>=0;i-="                ".length)d.push("                ".substring(0,i));g=e+1;break;
+case "\n":a=0;break;default:++a}}if(!d)return c;d.push(c.substring(g));return d.join("")}}var ja=/(?:[^<]+|<!--[\s\S]*?--\>|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g,ka=/^<!--/,la=/^<\[CDATA\[/,ma=/^<br\b/i;function na(b){var a=b.match(ja),c=[],d=0,g=[];if(a)for(var e=0,h=a.length;e<h;++e){var f=a[e];if(f.length>1&&f.charAt(0)==="<"){if(ka.test(f))continue;if(la.test(f)){c.push(f.substring(9,f.length-3));d+=f.length-12}else if(ma.test(f)){c.push("\n");++d}else g.push(d,f)}else{var i=ga(f);
+c.push(i);d+=i.length}}return{source:c.join(""),tags:g}}function v(b,a){var c={};(function(){var g=b.concat(a);for(var e=g.length;--e>=0;){var h=g[e],f=h[3];if(f)for(var i=f.length;--i>=0;)c[f.charAt(i)]=h}})();var d=a.length;return function(g,e){e=e||0;var h=[e,"pln"],f="",i=0,j=g;while(j.length){var o,m=null,k,l=c[j.charAt(0)];if(l){k=j.match(l[1]);m=k[0];o=l[0]}else{for(var n=0;n<d;++n){l=a[n];var p=l[2];if(p&&!p.test(f))continue;k=j.match(l[1]);if(k){m=k[0];o=l[0];break}}if(!m){o="pln";m=j.substring(0,
+1)}}h.push(e+i,o);i+=m.length;j=j.substring(m.length);if(o!=="com"&&/\S/.test(m))f=m}return h}}var oa=v([],[["pln",/^[^<]+/,null],["dec",/^<!\w[^>]*(?:>|$)/,null],["com",/^<!--[\s\S]*?(?:--\>|$)/,null],["src",/^<\?[\s\S]*?(?:\?>|$)/,null],["src",/^<%[\s\S]*?(?:%>|$)/,null],["src",/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],["tag",/^<\/?\w[^<>]*>/,null]]);function pa(b){var a=oa(b);for(var c=0;c<a.length;c+=2)if(a[c+1]==="src"){var d,g;d=a[c];g=c+2<a.length?a[c+2]:b.length;var e=b.substring(d,
+g),h=e.match(/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/);if(h)a.splice(c,2,d,"tag",d+h[1].length,"src",d+h[1].length+(h[2]||"").length,"tag")}return a}var qa=v([["atv",/^\'[^\']*(?:\'|$)/,null,"'"],["atv",/^\"[^\"]*(?:\"|$)/,null,'"'],["pun",/^[<>\/=]+/,null,"<>/="]],[["tag",/^[\w:\-]+/,/^</],["atv",/^[\w\-]+/,/^=/],["atn",/^[\w:\-]+/,null],["pln",/^\s+/,null," \t\r\n"]]);function ra(b,a){for(var c=0;c<a.length;c+=2){var d=a[c+1];if(d==="tag"){var g,e;g=a[c];e=c+2<a.length?a[c+2]:b.length;var h=b.substring(g,
+e),f=qa(h,g);u(f,a,c,2);c+=f.length-2}}return a}function r(b){var a=[],c=[];if(b.tripleQuotedStrings)a.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]);else if(b.multiLineStrings)a.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]);else a.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
+null,"\"'"]);c.push(["pln",/^(?:[^\'\"\`\/\#]+)/,null," \r\n"]);if(b.hashComments)a.push(["com",/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments)c.push(["com",/^\/\/[^\r\n]*/,null]);if(b.regexLiterals)c.push(["str",/^\/(?:[^\\\*\/\[]|\\[\s\S]|\[(?:[^\]\\]|\\.)*(?:\]|$))+(?:\/|$)/,Y]);if(b.cStyleComments)c.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]);var d=x(b.keywords);b=null;var g=v(a,c),e=v([],[["pln",/^\s+/,null," \r\n"],["pln",/^[a-z_$@][a-z_$@0-9]*/i,null],["lit",/^0x[a-f0-9]+[a-z]/i,null],["lit",
+/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i,null,"123456789"],["pun",/^[^\s\w\.$@]+/,null]]);function h(f,i){for(var j=0;j<i.length;j+=2){var o=i[j+1];if(o==="pln"){var m,k,l,n;m=i[j];k=j+2<i.length?i[j+2]:f.length;l=f.substring(m,k);n=e(l,m);for(var p=0,t=n.length;p<t;p+=2){var w=n[p+1];if(w==="pln"){var A=n[p],B=p+2<t?n[p+2]:l.length,s=f.substring(A,B);if(s===".")n[p+1]="pun";else if(s in d)n[p+1]="kwd";else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(s))n[p+1]=s.charAt(0)==="@"?"lit":
+"typ"}}u(n,i,j,2);j+=n.length-2}}return i}return function(f){var i=g(f);i=h(f,i);return i}}var G=r({keywords:W,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function sa(b,a){for(var c=0;c<a.length;c+=2){var d=a[c+1];if(d==="src"){var g,e;g=a[c];e=c+2<a.length?a[c+2]:b.length;var h=G(b.substring(g,e));for(var f=0,i=h.length;f<i;f+=2)h[f]+=g;u(h,a,c,2);c+=h.length-2}}return a}function ta(b,a){var c=false;for(var d=0;d<a.length;d+=2){var g=a[d+1],e,h;if(g==="atn"){e=
+a[d];h=d+2<a.length?a[d+2]:b.length;c=/^on|^style$/i.test(b.substring(e,h))}else if(g==="atv"){if(c){e=a[d];h=d+2<a.length?a[d+2]:b.length;var f=b.substring(e,h),i=f.length,j=i>=2&&/^[\"\']/.test(f)&&f.charAt(0)===f.charAt(i-1),o,m,k;if(j){m=e+1;k=h-1;o=f}else{m=e+1;k=h-1;o=f.substring(1,f.length-1)}var l=G(o);for(var n=0,p=l.length;n<p;n+=2)l[n]+=m;if(j){l.push(k,"atv");u(l,a,d+2,0)}else u(l,a,d,2)}c=false}}return a}function ua(b){var a=pa(b);a=ra(b,a);a=sa(b,a);a=ta(b,a);return a}function va(b,
+a,c){var d=[],g=0,e=null,h=null,f=0,i=0,j=ia(8);function o(k){if(k>g){if(e&&e!==h){d.push("</span>");e=null}if(!e&&h){e=h;d.push('<span class="',e,'">')}var l=E(j(b.substring(g,k))).replace(/(\r\n?|\n| ) /g,"$1&nbsp;").replace(/\r\n?|\n/g,"<br />");d.push(l);g=k}}while(true){var m;m=f<a.length?(i<c.length?a[f]<=c[i]:true):false;if(m){o(a[f]);if(e){d.push("</span>");e=null}d.push(a[f+1]);f+=2}else if(i<c.length){o(c[i]);h=c[i+1];i+=2}else break}o(b.length);if(e)d.push("</span>");return d.join("")}
+var C={};function q(b,a){for(var c=a.length;--c>=0;){var d=a[c];if(!C.hasOwnProperty(d))C[d]=b;else if("console"in window)console.log("cannot override language handler %s",d)}}q(G,["default-code"]);q(ua,["default-markup","html","htm","xhtml","xml","xsl"]);q(r({keywords:I,hashComments:true,cStyleComments:true}),["c","cc","cpp","cs","cxx","cyc"]);q(r({keywords:J,cStyleComments:true}),["java"]);q(r({keywords:O,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);q(r({keywords:M,hashComments:true,
+multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);q(r({keywords:L,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);q(r({keywords:N,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);q(r({keywords:K,cStyleComments:true,regexLiterals:true}),["js"]);function T(b,a){try{var c=na(b),d=c.source,g=c.tags;if(!C.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";var e=C[a].call({},d);return va(d,g,e)}catch(h){if("console"in window){console.log(h);
+console.trace()}return b}}function wa(b){var a=H(),c=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],d=[];for(var g=0;g<c.length;++g)for(var e=0;e<c[g].length;++e)d.push(c[g][e]);c=null;var h=0;function f(){var i=(new Date).getTime()+250;for(;h<d.length&&(new Date).getTime()<i;h++){var j=d[h];if(j.className&&j.className.indexOf("prettyprint")>=0){var o=j.className.match(/\blang-(\w+)\b/);if(o)o=o[1];var m=false;for(var k=j.parentNode;k;k=
+k.parentNode)if((k.tagName==="pre"||k.tagName==="code"||k.tagName==="xmp")&&k.className&&k.className.indexOf("prettyprint")>=0){m=true;break}if(!m){var l=ha(j);l=l.replace(/(?:\r\n?|\n)$/,"");var n=T(l,o);if(!S(j))j.innerHTML=n;else{var p=document.createElement("PRE");for(var t=0;t<j.attributes.length;++t){var w=j.attributes[t];if(w.specified)p.setAttribute(w.name,w.value)}p.innerHTML=n;j.parentNode.replaceChild(p,j);p=j}if(a&&j.tagName==="PRE"){var A=j.getElementsByTagName("br");for(var B=A.length;--B>=
+0;){var s=A[B];s.parentNode.replaceChild(document.createTextNode("\r\n"),s)}}}}}if(h<d.length)setTimeout(f,250);else if(b)b()}f()}window.PR_normalizedHtml=z;window.prettyPrintOne=T;window.prettyPrint=wa;window.PR={createSimpleLexer:v,registerLangHandler:q,sourceDecorator:r,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();


Mime
View raw message