You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/10/10 16:40:24 UTC

[01/18] Porting apollo examples structure to ActiveMQ 5.9.

Updated Branches:
  refs/heads/trunk 032063006 -> 2ecf41d02


http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-throughput.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-throughput.xml b/assembly/src/sample-conf/activemq-throughput.xml
deleted file mode 100644
index 3e2b9ab..0000000
--- a/assembly/src/sample-conf/activemq-throughput.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Tune ActiveMQ broker for high throughput of messages
-    Be sure to make necessary changes in your producer and consumer, since there you can make the most notable difference
-
-    For more information, see:
-    http://activemq.apache.org/performance-tuning.html
-
-    To run ActiveMQ with this configuration add xbean:conf/activemq-throughput.xml to your command
-    e.g. $ bin/activemq console xbean:conf/activemq-throughput.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="false" advisorySupport="false">
-
-        <!--
-            Use VM cursor
-            For more information, see:
-            http://activemq.apache.org/message-cursors.html
-        -->
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
-                  <pendingSubscriberPolicy>
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!--
-            Use KahaDB for persistence
-            Tune it a bit so we minimize IO operations
-            For more information, see:
-            http://activemq.apache.org/kahadb.html
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.data}/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
-        </persistenceAdapter>
-
-        <!--
-            Use TCP transport
-            For more information, see:
-            http://activemq.apache.org/configuring-transports.html
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/jetty-demo.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/jetty-demo.xml b/assembly/src/sample-conf/jetty-demo.xml
deleted file mode 100644
index cf8d970..0000000
--- a/assembly/src/sample-conf/jetty-demo.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-
-    <!--
-        Licensed to the Apache Software Foundation (ASF) under one or more contributor
-        license agreements. See the NOTICE file distributed with this work for additional
-        information regarding copyright ownership. The ASF licenses this file to You under
-        the Apache License, Version 2.0 (the "License"); you may not use this file except in
-        compliance with the License. You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or
-        agreed to in writing, software distributed under the License is distributed on an
-        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-        implied. See the License for the specific language governing permissions and
-        limitations under the License.
-    -->
-    <!--
-        An embedded servlet engine for serving up the Admin consoles, REST and Ajax APIs and
-        some demos Include this file in your configuration to enable ActiveMQ web components
-        e.g. <import resource="jetty.xml"/>
-    -->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-    <bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
-        <property name="name" value="ActiveMQRealm" />
-        <property name="config" value="${activemq.conf}/jetty-realm.properties" />
-    </bean>
-
-    <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
-        <property name="name" value="BASIC" />
-        <property name="roles" value="user,admin" />
-        <!-- set authenticate=false to disable login -->
-        <property name="authenticate" value="true" />
-    </bean>
-    <bean id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint">
-        <property name="name" value="BASIC" />
-        <property name="roles" value="admin" />
-         <!-- set authenticate=false to disable login -->
-        <property name="authenticate" value="true" />
-    </bean>
-    <bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
-        <property name="constraint" ref="securityConstraint" />
-        <property name="pathSpec" value="/admin/*,*.jsp" />
-    </bean>
-    <bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
-        <property name="constraint" ref="adminSecurityConstraint" />
-        <property name="pathSpec" value="*.action" />
-    </bean>
-    <bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler">
-        <property name="loginService" ref="securityLoginService" />
-        <property name="authenticator">
-            <bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator" />
-        </property>
-        <property name="constraintMappings">
-            <list>
-                <ref bean="adminSecurityConstraintMapping" />
-                <ref bean="securityConstraintMapping" />
-            </list>
-        </property>
-        <property name="handler">
-            <bean id="sec" class="org.eclipse.jetty.server.handler.HandlerCollection">
-                <property name="handlers">
-                    <list>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/hawtio" />
-                            <property name="war" value="${activemq.home}/webapps/hawtio" />
-                            <property name="logUrlOnStart" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/admin" />
-                            <property name="resourceBase" value="${activemq.home}/webapps/admin" />
-                            <property name="logUrlOnStart" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/fileserver" />
-                            <property name="resourceBase" value="${activemq.home}/webapps/fileserver" />
-                            <property name="logUrlOnStart" value="true" />
-                            <property name="parentLoaderPriority" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/demo" />
-                            <property name="resourceBase" value="${activemq.home}/webapps-demo/demo" />
-                            <property name="logUrlOnStart" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/api" />
-                            <property name="resourceBase" value="${activemq.home}/webapps/api" />
-                            <property name="logUrlOnStart" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.server.handler.ResourceHandler">
-                            <property name="directoriesListed" value="false" />
-                            <property name="welcomeFiles">
-                                <list>
-                                    <value>index.html</value>
-                                </list>
-                            </property>
-                            <property name="resourceBase" value="${activemq.home}/webapps/" />
-                        </bean>
-                        <bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler">
-                            <property name="serveIcon" value="false" />
-                        </bean>
-                    </list>
-                </property>
-            </bean>
-        </property>
-    </bean>
-
-    <bean id="rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
-      <property name="rules">
-          <set>
-              <bean class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule">
-                  <property name="regex" value="/api/jolokia(.*)"/>
-                  <property name="replacement" value="/hawtio/jolokia$1"/>
-              </bean>
-          </set>
-      </property>
-    </bean>
-
-    <bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
-    </bean>
-
-    <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
-             <!-- the default port number for the web console -->
-        <property name="port" value="8161"/>
-    </bean>
-
-    <bean id="Server" depends-on="jettyPort" class="org.eclipse.jetty.server.Server" init-method="start"
-        destroy-method="stop">
-
-        <property name="connectors">
-            <list>
-                <bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
-                     <!-- see the jettyPort bean -->
-                    <property name="port" value="#{systemProperties['jetty.port']}" />
-                </bean>
-                <!--
-                    Enable this connector if you wish to use https with web console
-                -->
-                <!--
-                <bean id="SecureConnector" class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
-                    <property name="port" value="8162" />
-                    <property name="keystore" value="file:${activemq.conf}/broker.ks" />
-                    <property name="password" value="password" />
-                </bean>
-                -->
-            </list>
-        </property>
-
-        <property name="handler">
-            <bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
-                <property name="handlers">
-                    <list>
-                        <ref bean="rewrite"/>
-                        <ref bean="contexts" />
-                        <ref bean="securityHandler" />
-                    </list>
-                </property>
-            </bean>
-        </property>
-
-    </bean>
-
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 66cc829..9dd6423 100755
--- a/pom.xml
+++ b/pom.xml
@@ -126,6 +126,7 @@
     <xerces-version>2.11.0</xerces-version>
     <zookeeper-version>3.4.5</zookeeper-version>
     <jaxb-basics-version>0.6.4</jaxb-basics-version>
+    <stompjms-version>1.16</stompjms-version>
 
     <pax-exam-version>2.6.0</pax-exam-version>
     <paxexam-karaf-container-version>1.0.0</paxexam-karaf-container-version>


[16/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-demo.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-demo.xml b/assembly/src/release/examples/conf/activemq-demo.xml
new file mode 100644
index 0000000..05a5380
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-demo.xml
@@ -0,0 +1,294 @@
+<!--
+    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.
+-->
+<!--
+    Demonstrates various ActiveMQ configuration options
+
+    To run ActiveMQ with this configuration add xbean:conf/activemq-demo.xml to your command
+
+    e.g. $ bin/activemq console xbean:conf/activemq-demo.xml
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
+  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+
+    <!--
+        Allows us to use system properties as variables in this configuration
+        file. For more information, see the Javadoc:
+
+        http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html
+    -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+        <property name="locations">
+            <value>file:${activemq.conf}/credentials.properties</value>
+        </property>
+    </bean>
+
+    <!--
+        The <broker> element is used to configure the ActiveMQ broker.
+
+        Tips:
+          - Change the brokerName attribute to something unique
+    -->
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="amq-broker" useJmx="true">
+
+        <!--
+            Examples of destination-specific policies using destination
+            names or wildcards. For more information, see:
+
+            http://activemq.apache.org/per-destination-policies.html
+            http://activemq.apache.org/destination-features.html
+            http://activemq.apache.org/slow-consumer-handling.html
+            http://activemq.apache.org/subscription-recovery-policy.html
+        -->
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <!--
+                        Limit ALL queues and topics to using 5mb of memory and turn on producer flow control
+                    -->
+                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="5mb"/>
+                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="5mb">
+                        <dispatchPolicy>
+                            <!--
+                              Use total ordering, see:
+                                 http://activemq.apache.org/total-ordering.html
+                            -->
+                            <strictOrderDispatchPolicy/>
+                        </dispatchPolicy>
+                        <subscriptionRecoveryPolicy>
+                            <!--
+                                Upon subscription, receive the last image sent
+                                on the destination.
+                            -->
+                            <lastImageSubscriptionRecoveryPolicy/>
+                        </subscriptionRecoveryPolicy>
+                    </policyEntry>
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!--
+            The managementContext is used to configure how ActiveMQ is exposed in
+            JMX. By default, ActiveMQ uses the MBean server that is started by
+            the JVM. For more information, see:
+
+            http://activemq.apache.org/jmx.html
+        -->
+        <managementContext>
+            <managementContext createConnector="false"/>
+        </managementContext>
+
+        <!--
+            The network connectors are used to create a network of brokers. For
+            more information, see:
+
+            http://activemq.apache.org/networks-of-brokers.html
+        -->
+        <!-- networkConnectors-->
+            <!--
+                This connector automatically discovers the other brokers using
+                IP multicast. Such discovery is possible only because the
+                openwire transport connector is advertised via the default IP
+                multicast group. For more information on multicast, see:
+
+                http://activemq.apache.org/multicast-transport-reference.html
+
+            <networkConnector name="default-nc" uri="multicast://default"/>
+            -->
+
+            <!--
+                Example of a static configuration. For more information, see:
+
+                http://activemq.apache.org/static-transport-reference.html
+
+            <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
+            -->
+        <!-- /networkConnectors-->
+
+        <!--
+            Configure message persistence for the broker. The default persistence
+            mechanism is the AMQ store (identified by the amqPersistenceAdapter).
+            For more information, see:
+
+            http://activemq.apache.org/persistence.html
+        -->
+        <persistenceAdapter>
+             <kahaDB directory="${activemq.data}/dynamic-broker1/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" />
+        </persistenceAdapter>
+
+        <!--
+            Configure the following if you wish to use journaled JDBC for message
+            persistence.
+
+        <persistenceFactory>
+            <journalPersistenceAdapterFactory dataDirectory="${activemq.data}" dataSource="#postgres-ds"/>
+        </persistenceFactory>
+        -->
+
+        <!--
+            Configure the following if you wish to use non-journaled JDBC for message
+            persistence.
+
+        <persistenceAdapter>
+            <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
+        </persistenceAdapter>
+        -->
+
+        <!--
+            The sslContext can be used to configure broker-specific SSL properties.
+            For more information, see:
+
+            http://activemq.apache.org/how-do-i-use-ssl.html
+        -->
+        <sslContext>
+            <sslContext keyStore="file:${activemq.conf}/broker.ks"
+              keyStorePassword="password" trustStore="file:${activemq.conf}/broker.ts"
+              trustStorePassword="password"/>
+        </sslContext>
+
+
+        <!--
+            The systemUsage controls the maximum amount of space the broker will
+            use before slowing down producers. For more information, see:
+
+            http://activemq.apache.org/producer-flow-control.html
+        -->
+        <systemUsage>
+          <systemUsage>
+            <memoryUsage>
+              <memoryUsage limit="20 mb" />
+            </memoryUsage>
+            <storeUsage>
+              <storeUsage limit="1 gb" />
+            </storeUsage>
+            <tempUsage>
+              <tempUsage limit="100 mb" />
+            </tempUsage>
+          </systemUsage>
+        </systemUsage>
+
+
+        <!--
+            The transport connectors expose ActiveMQ over a given protocol to
+            clients and other brokers. For more information, see:
+
+            http://activemq.apache.org/configuring-transports.html
+        -->
+        <transportConnectors>
+            <!-- Create a TCP transport that is advertised on via an IP multicast
+              group named default. -->
+            <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
+            <!-- Create a SSL transport. Make sure to configure the SSL options
+              via the system properties or the sslContext element. -->
+            <transportConnector name="ssl" uri="ssl://localhost:61617"/>
+            <!-- Create a STOMP transport for STOMP clients. -->
+            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
+            <!-- Create a Websocket transport for the websocket dmeo -->
+            <transportConnector name="ws" uri="ws://localhost:61614/" />
+        </transportConnectors>
+
+        <!-- destroy the spring context on shutdown to stop jetty -->
+        <shutdownHooks>
+            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
+        </shutdownHooks>
+
+    </broker>
+
+    <!--
+       Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
+       For more details see
+
+       http://activemq.apache.org/enterprise-integration-patterns.html
+    -->
+    <import resource="camel.xml"/>
+
+
+    <!--
+        An embedded servlet engine for serving up the Admin console and other demos.
+        For more information, see:
+
+          http://activemq.apache.org/web-console.html
+    -->
+    <import resource="jetty-demo.xml"/>
+
+
+    <!--
+        Uncomment to create a command agent to respond to message based admin
+        commands on the ActiveMQ.Agent topic. For more information, see:
+
+        http://activemq.apache.org/command-agent.html
+
+    <commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/>
+    -->
+
+
+    <!--
+        This xbean configuration file supports all the standard Spring XML
+        configuration options such as the following bean definitions.
+    -->
+
+    <!-- Postgres DataSource Sample Setup -->
+    <!--
+    <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
+      <property name="serverName" value="localhost"/>
+      <property name="databaseName" value="activemq"/>
+      <property name="portNumber" value="0"/>
+      <property name="user" value="activemq"/>
+      <property name="password" value="activemq"/>
+      <property name="dataSourceName" value="postgres"/>
+      <property name="initialConnections" value="1"/>
+      <property name="maxConnections" value="10"/>
+    </bean>
+    -->
+
+    <!-- MySql DataSource Sample Setup -->
+    <!--
+    <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+      <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+      <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
+      <property name="username" value="activemq"/>
+      <property name="password" value="activemq"/>
+      <property name="maxActive" value="200"/>
+      <property name="poolPreparedStatements" value="true"/>
+    </bean>
+    -->
+
+    <!-- Oracle DataSource Sample Setup -->
+    <!--
+    <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+      <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
+      <property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB"/>
+      <property name="username" value="scott"/>
+      <property name="password" value="tiger"/>
+      <property name="maxActive" value="200"/>
+      <property name="poolPreparedStatements" value="true"/>
+    </bean>
+    -->
+
+    <!-- Embedded Derby DataSource Sample Setup -->
+    <!--
+    <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
+      <property name="databaseName" value="derbydb"/>
+      <property name="createDatabase" value="create"/>
+    </bean>
+    -->
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-dynamic-network-broker1.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-dynamic-network-broker1.xml b/assembly/src/release/examples/conf/activemq-dynamic-network-broker1.xml
new file mode 100644
index 0000000..6666df7
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-dynamic-network-broker1.xml
@@ -0,0 +1,108 @@
+<!--
+    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.
+-->
+<!--
+    Create a dynamic network of brokers
+    For more information, see:
+
+    http://activemq.apache.org/networks-of-brokers.html
+
+    To run this example network of ActiveMQ brokers run
+
+    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
+
+    and
+
+    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
+
+    in separate consoles
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker1" dataDirectory="${activemq.data}">
+
+        <!-- Destination specific policies using destination names or wildcards -->
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
+                        <deadLetterStrategy>
+                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
+                        </deadLetterStrategy>
+                    </policyEntry>
+                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
+                    </policyEntry>
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
+        <managementContext>
+            <managementContext createConnector="true"/>
+        </managementContext>
+
+        <!--
+            Configure network connector to use multicast protocol
+            For more information, see
+
+            http://activemq.apache.org/multicast-transport-reference.html
+        -->
+        <networkConnectors>
+          <networkConnector uri="multicast://default"
+            dynamicOnly="true"
+            networkTTL="3"
+            prefetchSize="1"
+            decreaseNetworkConsumerPriority="true" />
+        </networkConnectors>
+
+        <persistenceAdapter>
+            <kahaDB directory="${activemq.data}/dynamic-broker1/kahadb"/>
+        </persistenceAdapter>
+
+        <!--  The maximum amount of space the broker will use before slowing down producers -->
+        <systemUsage>
+            <systemUsage>
+                <memoryUsage>
+                    <memoryUsage limit="20 mb"/>
+                </memoryUsage>
+                <storeUsage>
+                    <storeUsage limit="1 gb" name="foo"/>
+                </storeUsage>
+                <tempUsage>
+                    <tempUsage limit="100 mb"/>
+                </tempUsage>
+            </systemUsage>
+        </systemUsage>
+
+        <!--
+            The transport connectors ActiveMQ will listen to
+            Configure discovery URI to use multicast protocol
+        -->
+        <transportConnectors>
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default" />
+        </transportConnectors>
+
+
+    </broker>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-dynamic-network-broker2.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-dynamic-network-broker2.xml b/assembly/src/release/examples/conf/activemq-dynamic-network-broker2.xml
new file mode 100644
index 0000000..3f8c951
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-dynamic-network-broker2.xml
@@ -0,0 +1,109 @@
+<!--
+    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.
+-->
+<!--
+    Create a dynamic network of brokers
+    For more information, see:
+
+    http://activemq.apache.org/networks-of-brokers.html
+
+    To run this example network of ActiveMQ brokers run
+
+    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
+
+    and
+
+    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
+
+    in separate consoles
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
+  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
+
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker2" dataDirectory="${activemq.data}">
+
+        <!-- Destination specific policies using destination names or wildcards -->
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
+                        <deadLetterStrategy>
+                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
+                        </deadLetterStrategy>
+                    </policyEntry>
+                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
+                    </policyEntry>
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
+        <managementContext>
+            <managementContext createConnector="true" connectorPort="1100"/>
+        </managementContext>
+
+        <!--
+            Configure network connector to use multicast protocol
+            For more information, see
+
+            http://activemq.apache.org/multicast-transport-reference.html
+        -->
+        <networkConnectors>
+          <networkConnector uri="multicast://default"
+            dynamicOnly="true"
+            networkTTL="3"
+            prefetchSize="1"
+            decreaseNetworkConsumerPriority="true" />
+        </networkConnectors>
+
+
+        <persistenceAdapter>
+            <kahaDB directory="${activemq.data}/dynamic-broker2/kahadb" />
+        </persistenceAdapter>
+
+        <!--  The maximum amount of space the broker will use before slowing down producers -->
+        <systemUsage>
+            <systemUsage>
+                <memoryUsage>
+                    <memoryUsage limit="20 mb"/>
+                </memoryUsage>
+                <storeUsage>
+                    <storeUsage limit="1 gb" name="foo"/>
+                </storeUsage>
+                <tempUsage>
+                    <tempUsage limit="100 mb"/>
+                </tempUsage>
+            </systemUsage>
+        </systemUsage>
+
+        <!--
+            The transport connectors ActiveMQ will listen to
+            Configure discovery URI to use multicast protocol
+        -->
+        <transportConnectors>
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618" discoveryUri="multicast://default" />
+        </transportConnectors>
+
+    </broker>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-jdbc-performance.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-jdbc-performance.xml b/assembly/src/release/examples/conf/activemq-jdbc-performance.xml
new file mode 100644
index 0000000..da87933
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-jdbc-performance.xml
@@ -0,0 +1,82 @@
+<!--
+    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.
+-->
+<!--
+    Use JDBC for message persistence
+    For more information, see:
+
+    http://activemq.apache.org/persistence.html
+
+    You need to add Derby database to your classpath in order to make this example work.
+    Download it from http://db.apache.org/derby/ and put it in the ${ACTIVEMQ_HOME}/lib/optional/ folder
+    Optionally you can configure any other RDBM as shown below
+
+    To run ActiveMQ with this configuration add xbean:conf/activemq-jdbc.xml to your command
+
+    e.g. $ bin/activemq console xbean:conf/activemq-jdbc.xml
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+  <!-- Allows us to use system properties as variables in this configuration file -->
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+      <property name="locations">
+          <value>file:${activemq.conf}/credentials.properties</value>
+      </property>
+  </bean>
+
+  <broker useJmx="true" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core">
+
+        <destinationPolicy>
+            <policyMap>
+              <policyEntries>
+                <policyEntry topic=">" expireMessagesPeriod="0" prioritizedMessages="false">
+                </policyEntry>
+                <policyEntry queue=">" expireMessagesPeriod="0" prioritizedMessages="false">
+                </policyEntry>
+              </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+    <!--
+        See more database locker options at http://activemq.apache.org/pluggable-storage-lockers.html
+    -->
+    <persistenceAdapter>
+       <!--  for mysql-ds below, add attribute: dataSource="#mysql-ds" -->
+       <jdbcPersistenceAdapter dataDirectory="${activemq.data}" cleanupPeriod="0" />
+    </persistenceAdapter>
+
+    <transportConnectors>
+       <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+    </transportConnectors>
+  </broker>
+
+
+
+  <!-- MySql DataSource Sample Setup -->
+  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
+    <property name="username" value="root"/>
+    <property name="password" value="root"/>
+    <property name="maxActive" value="200"/>
+    <property name="poolPreparedStatements" value="true"/>
+  </bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-jdbc.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-jdbc.xml b/assembly/src/release/examples/conf/activemq-jdbc.xml
new file mode 100644
index 0000000..0e49aa7
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-jdbc.xml
@@ -0,0 +1,102 @@
+<!--
+    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.
+-->
+<!--
+    Use JDBC for message persistence
+    For more information, see:
+
+    http://activemq.apache.org/persistence.html
+
+    You need to add Derby database to your classpath in order to make this example work.
+    Download it from http://db.apache.org/derby/ and put it in the ${ACTIVEMQ_HOME}/lib/optional/ folder
+    Optionally you can configure any other RDBM as shown below
+
+    To run ActiveMQ with this configuration add xbean:conf/activemq-jdbc.xml to your command
+
+    e.g. $ bin/activemq console xbean:conf/activemq-jdbc.xml
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+  <!-- Allows us to use system properties as variables in this configuration file -->
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+      <property name="locations">
+          <value>file:${activemq.conf}/credentials.properties</value>
+      </property>
+  </bean>
+
+  <broker useJmx="false" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core">
+
+    <!--
+        See more database locker options at http://activemq.apache.org/pluggable-storage-lockers.html
+    -->
+    <persistenceAdapter>
+       <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#derby-ds"/>
+    </persistenceAdapter>
+
+    <transportConnectors>
+       <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+    </transportConnectors>
+  </broker>
+
+  <!-- Embedded Derby DataSource Sample Setup -->
+  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
+    <property name="databaseName" value="derbydb"/>
+    <property name="createDatabase" value="create"/>
+  </bean>
+
+  <!-- Postgres DataSource Sample Setup -->
+  <!--
+  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
+    <property name="serverName" value="localhost"/>
+    <property name="databaseName" value="activemq"/>
+    <property name="portNumber" value="0"/>
+    <property name="user" value="activemq"/>
+    <property name="password" value="activemq"/>
+    <property name="dataSourceName" value="postgres"/>
+    <property name="initialConnections" value="1"/>
+    <property name="maxConnections" value="10"/>
+  </bean>
+  -->
+
+  <!-- MySql DataSource Sample Setup -->
+  <!--
+  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
+    <property name="username" value="activemq"/>
+    <property name="password" value="activemq"/>
+    <property name="maxActive" value="200"/>
+    <property name="poolPreparedStatements" value="true"/>
+  </bean>
+  -->
+
+  <!-- Oracle DataSource Sample Setup -->
+  <!--
+  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
+    <property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB"/>
+    <property name="username" value="scott"/>
+    <property name="password" value="tiger"/>
+    <property name="maxActive" value="200"/>
+    <property name="poolPreparedStatements" value="true"/>
+  </bean>
+  -->
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-leveldb-replicating.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-leveldb-replicating.xml b/assembly/src/release/examples/conf/activemq-leveldb-replicating.xml
new file mode 100644
index 0000000..c8a6560
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-leveldb-replicating.xml
@@ -0,0 +1,173 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!-- START SNIPPET: example -->
+<beans
+        xmlns="http://www.springframework.org/schema/beans"
+        xmlns:amq="http://activemq.apache.org/schema/core"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+        <property name="locations">
+            <value>file:${activemq.conf}/credentials.properties</value>
+        </property>
+    </bean>
+
+    <!--
+        The <broker> element is used to configure the ActiveMQ broker.
+    -->
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="replicating-broker" dataDirectory="${activemq.data}" start="false" >
+
+        <!--
+            For better performances use VM cursor and small memory limit.
+            For more information, see:
+
+            http://activemq.apache.org/message-cursors.html
+
+            Also, if your producer is "hanging", it's probably due to producer flow control.
+            For more information, see:
+            http://activemq.apache.org/producer-flow-control.html
+        -->
+
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <policyEntry topic=">" producerFlowControl="true">
+                        <!-- The constantPendingMessageLimitStrategy is used to prevent
+                             slow topic consumers to block producers and affect other consumers
+                             by limiting the number of messages that are retained
+                             For more information, see:
+
+                             http://activemq.apache.org/slow-consumer-handling.html
+
+                        -->
+                        <pendingMessageLimitStrategy>
+                            <constantPendingMessageLimitStrategy limit="1000"/>
+                        </pendingMessageLimitStrategy>
+                    </policyEntry>
+                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
+                        <!-- Use VM cursor for better latency
+                             For more information, see:
+
+                             http://activemq.apache.org/message-cursors.html
+
+                        <pendingQueuePolicy>
+                          <vmQueueCursor/>
+                        </pendingQueuePolicy>
+                        -->
+                    </policyEntry>
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+
+        <!--
+            The managementContext is used to configure how ActiveMQ is exposed in
+            JMX. By default, ActiveMQ uses the MBean server that is started by
+            the JVM. For more information, see:
+
+            http://activemq.apache.org/jmx.html
+        -->
+        <managementContext>
+            <managementContext createConnector="false"/>
+        </managementContext>
+
+        <!--
+            Configure message persistence for the broker. The default persistence
+            mechanism is the KahaDB store. In this sample, we use level db with
+            replication. Zookeeper is used as the distributed coordinator, so you
+            must have a zookeeper ensemble (minimum 1) to run the broker with
+            this configuration.
+
+            http://activemq.apache.org/replicated-leveldb-store.html
+        -->
+        <persistenceAdapter>
+            <replicatedLevelDB
+                    directory="${activemq.data}"
+                    replicas="2"
+                    bind="tcp://0.0.0.0:61619"
+                    zkAddress="127.0.0.1:2181"
+                    zkPassword="password"
+                    zkPath="/activemq/leveldb-stores"
+                    />
+        </persistenceAdapter>
+
+
+        <!--
+          The systemUsage controls the maximum amount of space the broker will
+          use before slowing down producers. For more information, see:
+          http://activemq.apache.org/producer-flow-control.html
+          If using ActiveMQ embedded - the following limits could safely be used:
+
+      <systemUsage>
+          <systemUsage>
+              <memoryUsage>
+                  <memoryUsage limit="20 mb"/>
+              </memoryUsage>
+              <storeUsage>
+                  <storeUsage limit="1 gb"/>
+              </storeUsage>
+              <tempUsage>
+                  <tempUsage limit="100 mb"/>
+              </tempUsage>
+          </systemUsage>
+      </systemUsage>
+      -->
+        <systemUsage>
+            <systemUsage>
+                <memoryUsage>
+                    <memoryUsage limit="64 mb"/>
+                </memoryUsage>
+                <storeUsage>
+                    <storeUsage limit="100 gb"/>
+                </storeUsage>
+                <tempUsage>
+                    <tempUsage limit="50 gb"/>
+                </tempUsage>
+            </systemUsage>
+        </systemUsage>
+
+        <!--
+            The transport connectors expose ActiveMQ over a given protocol to
+            clients and other brokers. For more information, see:
+
+            http://activemq.apache.org/configuring-transports.html
+        -->
+        <transportConnectors>
+            <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
+            <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
+        </transportConnectors>
+
+        <!-- destroy the spring context on shutdown to stop jetty -->
+        <shutdownHooks>
+            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
+        </shutdownHooks>
+
+    </broker>
+
+    <!--
+        Enable web consoles, REST and Ajax APIs and demos
+
+        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
+    -->
+    <import resource="jetty.xml"/>
+
+</beans>
+        <!-- END SNIPPET: example -->

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-scalability.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-scalability.xml b/assembly/src/release/examples/conf/activemq-scalability.xml
new file mode 100644
index 0000000..89d41ef
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-scalability.xml
@@ -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.
+-->
+<!--
+    Tune ActiveMQ broker so it can handle large number of queues (tens of thousands)
+    For more information, see:
+    http://activemq.apache.org/how-do-i-configure-10s-of-1000s-of-queues-in-a-single-broker-.html
+
+    Be sure to make necessary changes in your startup script, to
+
+    1. Give broker enough memory
+    2. Disable dedicated task runner
+
+    e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
+
+    To run ActiveMQ with this configuration add xbean:conf/activemq-scalability.xml to your command
+    e.g. $ bin/activemq console xbean:conf/activemq-scalability.xml
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="false" advisorySupport="false">
+
+        <!--
+            Turn on optimizedDispatch
+            For more information, see:
+            http://activemq.apache.org/per-destination-policies.html
+        -->
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <policyEntry queue=">" optimizedDispatch="true" />
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!--
+            Use KahaDB for persistence
+            For more information, see:
+            http://activemq.apache.org/kahadb.html
+        -->
+        <persistenceAdapter>
+            <kahaDB directory="${activemq.data}/kahadb" enableIndexWriteAsync="true"/>
+        </persistenceAdapter>
+
+        <!--
+            Use NIO transport
+            For more information, see:
+            http://activemq.apache.org/configuring-transports.html#ConfiguringTransports-TheNIOTransport
+        -->
+        <transportConnectors>
+            <transportConnector name="nio" uri="nio://0.0.0.0:61616"/>
+        </transportConnectors>
+
+    </broker>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-security.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-security.xml b/assembly/src/release/examples/conf/activemq-security.xml
new file mode 100644
index 0000000..7b116ff
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-security.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!--  
+    Secure ActiveMQ broker
+    For more information, see:
+    
+    http://activemq.apache.org/security.html
+    
+    Before you can run this configuration, you need to set ACTIVEMQ_ENCRYPTION_PASSWORD environment variable, like
+    
+    $ export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq
+    
+    For more information see: http://activemq.apache.org/encrypted-passwords.html
+    
+    To run ActiveMQ with this configuration add xbean:conf/activemq-security.xml to your command
+    
+    e.g. $ bin/activemq console xbean:conf/activemq-security.xml
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+  
+  <!-- Allows us to use encrypted system properties as variables in this configuration file -->
+  <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
+    <property name="algorithm" value="PBEWithMD5AndDES" />
+    <property name="passwordEnvName" value="ACTIVEMQ_ENCRYPTION_PASSWORD" />
+  </bean>
+                                                                     
+  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
+    <property name="config" ref="environmentVariablesConfiguration" />
+  </bean>  
+    
+  <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer"> 
+      <constructor-arg ref="configurationEncryptor" /> 
+      <property name="location" value="file:${activemq.conf}/credentials-enc.properties"/> 
+  </bean> 
+  
+  <!--     
+    Use this configuration if you don't want to set encryptor password using environment variable
+    Note however, that with this solution your passwords can be easily decrypted once the encrypter password is known
+    
+  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
+     <property name="algorithm" value="PBEWithMD5AndDES"/>
+     <property name="password" value="activemq"/>
+  </bean> 
+  -->
+
+  <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" >
+
+    <managementContext>
+        <managementContext createConnector="true">
+            <property xmlns="http://www.springframework.org/schema/beans" name="environment">
+                <map xmlns="http://www.springframework.org/schema/beans">
+                    <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.password.file"
+                           value="${activemq.conf}/jmx.password"/>
+                    <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.access.file"
+                           value="${activemq.conf}/jmx.access"/>
+                </map>
+            </property>
+        </managementContext>
+    </managementContext>
+
+    <plugins>
+        <!-- Configure authentication; Username, passwords and groups -->
+        <simpleAuthenticationPlugin>
+            <users>
+                <authenticationUser username="system" password="${activemq.password}"
+                    groups="users,admins"/>
+                <authenticationUser username="user" password="${guest.password}"
+                    groups="users"/>
+                <authenticationUser username="guest" password="${guest.password}" groups="guests"/>
+            </users>
+        </simpleAuthenticationPlugin>
+
+
+      <!--  Lets configure a destination based authorization mechanism -->
+      <authorizationPlugin>
+        <map>
+          <authorizationMap>
+            <authorizationEntries>
+              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
+              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
+              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
+              
+              <authorizationEntry queue="TEST.Q" read="guests" write="guests" />
+              
+              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
+              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
+              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
+              
+              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
+            </authorizationEntries>
+          </authorizationMap>
+        </map>
+      </authorizationPlugin>
+    </plugins>
+    
+    <transportConnectors>
+       <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+    </transportConnectors>
+
+    <!-- destroy the spring context on shutdown to stop jetty -->
+    <shutdownHooks>
+        <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
+    </shutdownHooks>
+
+  </broker>
+
+  <!-- Use Web applications and Camel in secured broker environment -->
+  <import resource="jetty.xml"/>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-specjms.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-specjms.xml b/assembly/src/release/examples/conf/activemq-specjms.xml
new file mode 100644
index 0000000..2c8349c
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-specjms.xml
@@ -0,0 +1,118 @@
+<!--
+    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.
+-->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
+
+    <!--
+        The <broker> element is used to configure the ActiveMQ broker.
+
+        advisories incurr a hit with every add connection|destination|producer|consumer
+          - client side:  providerUrl = tcp://localhost:61616?jms.watchTopicAdvisories=false
+        statistics have a small impact on concurrency so disable
+        schedualer has a small impact as it checks for the presence three properties on each message
+        jmx adds a bunch of wrapper classes
+
+        ACTIVEMQ_OPTS_MEMORY="-Xmx11g -Xms6g -Dorg.apache.activemq.UseDedicatedTaskRunner=false -Djava.util.logging.config.file=logging.properties -XX:+UseLargePages"
+    -->
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost"
+        dataDirectory="${activemq.data}" deleteAllMessagesOnStartup="true"
+        advisorySupport="false"
+        enableStatistics="false"
+        schedulerSupport="false"
+        useJmx="false">
+
+        <destinationPolicy>
+            <policyMap>
+              <policyEntries>
+                <!--
+                    producerFlowControll thread unnecessary with no memory limits
+                    with no failover, no need to suppress duplicates so audit can be disabled
+                    message expiry thread unnecessary as normal dispatch will handle expiry
+                -->
+                <policyEntry topic=">" producerFlowControl="false" enableAudit="false" expireMessagesPeriod="0">
+                  <pendingSubscriberPolicy>
+                    <!-- keep all references in memory -->
+                    <vmCursor />
+                  </pendingSubscriberPolicy>
+                </policyEntry>
+                <policyEntry queue=">" producerFlowControl="false" enableAudit="false" expireMessagesPeriod="0">
+                  <pendingQueuePolicy>
+                    <!-- keep all references in memory -->
+                    <vmQueueCursor/>
+                  </pendingQueuePolicy>
+
+                </policyEntry>
+              </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+
+        <!--
+            The managementContext is used to configure how ActiveMQ is exposed in
+            JMX. By default, ActiveMQ uses the MBean server that is started by
+            the JVM. For more information, see:
+
+            http://activemq.apache.org/jmx.html
+        -->
+        <managementContext>
+            <managementContext createConnector="false"/>
+        </managementContext>
+
+        <persistenceAdapter>
+            <!-- defer cleanup/checkpoint -->
+            <!-- write in max 62k chunks to max disk io bandwith -->
+            <!-- use small number of data files (seldom switch) -->
+            <!-- keep index off the disk (in cache) -->
+
+            <kahaDB directory="${activemq.data}/kahadb"
+                cleanupInterval="300000" checkpointInterval="50000"
+                journalMaxWriteBatchSize="62k"
+                journalMaxFileLength="1g"
+                indexCacheSize="100000" indexWriteBatchSize="100000"
+            />
+        </persistenceAdapter>
+
+        <!-- ensure there is loads or memory for destinations -->
+        <systemUsage>
+            <systemUsage>
+                <memoryUsage>
+                    <memoryUsage limit="2 g"/>
+                </memoryUsage>
+            </systemUsage>
+        </systemUsage>
+
+
+        <!--
+            The transport connectors expose ActiveMQ over a given protocol to
+            clients and other brokers. For more information, see:
+
+            http://activemq.apache.org/configuring-transports.html
+        -->
+        <transportConnectors>
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+        </transportConnectors>
+
+    </broker>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-static-network-broker1.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-static-network-broker1.xml b/assembly/src/release/examples/conf/activemq-static-network-broker1.xml
new file mode 100644
index 0000000..6503648
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-static-network-broker1.xml
@@ -0,0 +1,100 @@
+<!--
+    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.
+-->
+<!--
+    Create a static network of brokers
+    For more information, see:
+
+    http://activemq.apache.org/networks-of-brokers.html
+
+    To run this example network of ActiveMQ brokers run
+
+    $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
+
+    and
+
+    $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
+
+    in separate consoles
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
+  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.data}">
+
+        <!-- Destination specific policies using destination names or wildcards -->
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
+                        <deadLetterStrategy>
+                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
+                        </deadLetterStrategy>
+                    </policyEntry>
+                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
+                    </policyEntry>
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
+        <managementContext>
+            <managementContext createConnector="true"/>
+        </managementContext>
+
+        <!--
+            The store and forward broker networks ActiveMQ will listen to.
+            We'll leave it empty as duplex network will be configured by another broker
+            Take a look at activemq-static_network-broker2.xml for example
+        -->
+        <networkConnectors>
+        </networkConnectors>
+
+        <persistenceAdapter>
+            <kahaDB directory="${activemq.data}/static-broker1/kahadb" />
+        </persistenceAdapter>
+
+        <!--  The maximum amount of space the broker will use before slowing down producers -->
+        <systemUsage>
+            <systemUsage>
+                <memoryUsage>
+                    <memoryUsage limit="20 mb"/>
+                </memoryUsage>
+                <storeUsage>
+                    <storeUsage limit="1 gb" name="foo"/>
+                </storeUsage>
+                <tempUsage>
+                    <tempUsage limit="100 mb"/>
+                </tempUsage>
+            </systemUsage>
+        </systemUsage>
+
+        <!-- The transport connectors ActiveMQ will listen to -->
+        <transportConnectors>
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+        </transportConnectors>
+
+    </broker>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-static-network-broker2.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-static-network-broker2.xml b/assembly/src/release/examples/conf/activemq-static-network-broker2.xml
new file mode 100644
index 0000000..5f0d2da
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-static-network-broker2.xml
@@ -0,0 +1,100 @@
+<!--
+    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.
+-->
+<!--
+    Create a static network of brokers
+    For more information, see:
+
+    http://activemq.apache.org/networks-of-brokers.html
+
+    To run this example network of ActiveMQ brokers run
+
+    $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
+
+    and
+
+    $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
+
+    in separate consoles
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
+  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker2" dataDirectory="${activemq.data}">
+
+        <!-- Destination specific policies using destination names or wildcards -->
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
+                        <deadLetterStrategy>
+                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
+                        </deadLetterStrategy>
+                    </policyEntry>
+                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
+                    </policyEntry>
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
+        <managementContext>
+            <managementContext createConnector="true" connectorPort="1100"/>
+        </managementContext>
+
+        <!--
+            The store and forward broker networks ActiveMQ will listen to
+            Create a duplex connector to the first broker
+        -->
+        <networkConnectors>
+            <networkConnector uri="static:(tcp://localhost:61616)" duplex="true"/>
+        </networkConnectors>
+
+        <persistenceAdapter>
+            <kahaDB directory="${activemq.data}/static-broker2/kahadb" />
+        </persistenceAdapter>
+
+        <!--  The maximum amount of space the broker will use before slowing down producers -->
+        <systemUsage>
+            <systemUsage>
+                <memoryUsage>
+                    <memoryUsage limit="20 mb"/>
+                </memoryUsage>
+                <storeUsage>
+                    <storeUsage limit="1 gb" name="foo"/>
+                </storeUsage>
+                <tempUsage>
+                    <tempUsage limit="100 mb"/>
+                </tempUsage>
+            </systemUsage>
+        </systemUsage>
+
+        <!-- The transport connectors ActiveMQ will listen to -->
+        <transportConnectors>
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618"/>
+        </transportConnectors>
+
+    </broker>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-stomp.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-stomp.xml b/assembly/src/release/examples/conf/activemq-stomp.xml
new file mode 100644
index 0000000..fccdf10
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-stomp.xml
@@ -0,0 +1,138 @@
+<!--
+    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.
+-->
+<!--
+    Use Stomp protocol
+
+    For better behavior under heavy usage, be sure to:
+
+    1. Give broker enough memory
+    2. Disable dedicated task runner
+
+    e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
+
+    To run ActiveMQ with this configuration add xbean:conf/activemq-stomp.xml to your command
+    e.g. $ bin/activemq console xbean:conf/activemq-stomp.xml
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+        <property name="locations">
+            <value>file:${activemq.conf}/credentials.properties</value>
+        </property>
+    </bean>
+
+    <!--
+        The <broker> element is used to configure the ActiveMQ broker.
+    -->
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
+
+        <!--
+            For better performances use VM cursor and small memory limit.
+            For more information, see:
+
+            http://activemq.apache.org/message-cursors.html
+
+            Also, if your producer is "hanging", it's probably due to producer flow control.
+            For more information, see:
+            http://activemq.apache.org/producer-flow-control.html
+        -->
+
+        <destinationPolicy>
+            <policyMap>
+              <policyEntries>
+                <policyEntry topic=">" producerFlowControl="false">
+                  <pendingSubscriberPolicy>
+                    <vmCursor />
+                  </pendingSubscriberPolicy>
+                </policyEntry>
+                <policyEntry queue=">" producerFlowControl="false">
+                  <!-- Use VM cursor for better latency
+                       For more information, see:
+
+                       http://activemq.apache.org/message-cursors.html
+
+                  <pendingQueuePolicy>
+                    <vmQueueCursor/>
+                  </pendingQueuePolicy>
+                  -->
+                </policyEntry>
+              </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+
+        <!--
+            The managementContext is used to configure how ActiveMQ is exposed in
+            JMX. By default, ActiveMQ uses the MBean server that is started by
+            the JVM. For more information, see:
+
+            http://activemq.apache.org/jmx.html
+        -->
+        <managementContext>
+            <managementContext createConnector="false"/>
+        </managementContext>
+
+        <!--
+            Configure message persistence for the broker. The default persistence
+            mechanism is the KahaDB store (identified by the kahaDB tag).
+            For more information, see:
+
+            http://activemq.apache.org/persistence.html
+        -->
+        <persistenceAdapter>
+            <kahaDB directory="${activemq.data}/kahadb"/>
+        </persistenceAdapter>
+
+
+        <!--
+            The transport connectors expose ActiveMQ over a given protocol to
+            clients and other brokers. For more information, see:
+
+            http://activemq.apache.org/configuring-transports.html
+        -->
+        <transportConnectors>
+            <transportConnector name="stomp" uri="stomp://0.0.0.0:61612?transport.closeAsync=false"/>
+            <transportConnector name="stomp+nio" uri="stomp+nio://0.0.0.0:61613?transport.closeAsync=false"/>
+        </transportConnectors>
+
+        <!-- destroy the spring context on shutdown to stop jetty -->
+        <shutdownHooks>
+            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
+        </shutdownHooks>
+
+    </broker>
+
+    <!--
+        Uncomment to enable Camel
+        Take a look at activemq-camel.xml for more details
+
+    <import resource="camel.xml"/>
+    -->
+
+    <!--
+        Enable web consoles, REST and Ajax APIs 
+        Take a look at activemq-jetty.xml for more details
+    -->
+    <import resource="jetty.xml"/>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq-throughput.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq-throughput.xml b/assembly/src/release/examples/conf/activemq-throughput.xml
new file mode 100644
index 0000000..3e2b9ab
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq-throughput.xml
@@ -0,0 +1,82 @@
+<!--
+    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.
+-->
+<!--
+    Tune ActiveMQ broker for high throughput of messages
+    Be sure to make necessary changes in your producer and consumer, since there you can make the most notable difference
+
+    For more information, see:
+    http://activemq.apache.org/performance-tuning.html
+
+    To run ActiveMQ with this configuration add xbean:conf/activemq-throughput.xml to your command
+    e.g. $ bin/activemq console xbean:conf/activemq-throughput.xml
+ -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="false" advisorySupport="false">
+
+        <!--
+            Use VM cursor
+            For more information, see:
+            http://activemq.apache.org/message-cursors.html
+        -->
+        <destinationPolicy>
+            <policyMap>
+              <policyEntries>
+                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
+                  <pendingSubscriberPolicy>
+                    <vmCursor />
+                  </pendingSubscriberPolicy>
+                </policyEntry>
+                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
+                  <pendingQueuePolicy>
+                    <vmQueueCursor/>
+                  </pendingQueuePolicy>
+                </policyEntry>
+              </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!--
+            Use KahaDB for persistence
+            Tune it a bit so we minimize IO operations
+            For more information, see:
+            http://activemq.apache.org/kahadb.html
+        -->
+        <persistenceAdapter>
+            <kahaDB directory="${activemq.data}/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
+        </persistenceAdapter>
+
+        <!--
+            Use TCP transport
+            For more information, see:
+            http://activemq.apache.org/configuring-transports.html
+        -->
+        <transportConnectors>
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+        </transportConnectors>
+
+    </broker>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/activemq.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/activemq.xml b/assembly/src/release/examples/conf/activemq.xml
new file mode 100644
index 0000000..d70f16a
--- /dev/null
+++ b/assembly/src/release/examples/conf/activemq.xml
@@ -0,0 +1,41 @@
+<!--
+    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.
+-->
+<!-- START SNIPPET: xbean -->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
+  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+
+  
+  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false">
+
+    <persistenceFactory>
+      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="../data"/>
+    </persistenceFactory>
+  
+    <transportConnectors>
+      <transportConnector uri="tcp://localhost:61616"/>      
+      <transportConnector uri="stomp://localhost:61613"/>
+    </transportConnectors>
+        
+  </broker>
+  
+</beans>
+<!-- END SNIPPET: xbean -->

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/jetty-demo.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/jetty-demo.xml b/assembly/src/release/examples/conf/jetty-demo.xml
new file mode 100644
index 0000000..cf8d970
--- /dev/null
+++ b/assembly/src/release/examples/conf/jetty-demo.xml
@@ -0,0 +1,162 @@
+
+    <!--
+        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.
+    -->
+    <!--
+        An embedded servlet engine for serving up the Admin consoles, REST and Ajax APIs and
+        some demos Include this file in your configuration to enable ActiveMQ web components
+        e.g. <import resource="jetty.xml"/>
+    -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
+        <property name="name" value="ActiveMQRealm" />
+        <property name="config" value="${activemq.conf}/jetty-realm.properties" />
+    </bean>
+
+    <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
+        <property name="name" value="BASIC" />
+        <property name="roles" value="user,admin" />
+        <!-- set authenticate=false to disable login -->
+        <property name="authenticate" value="true" />
+    </bean>
+    <bean id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint">
+        <property name="name" value="BASIC" />
+        <property name="roles" value="admin" />
+         <!-- set authenticate=false to disable login -->
+        <property name="authenticate" value="true" />
+    </bean>
+    <bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
+        <property name="constraint" ref="securityConstraint" />
+        <property name="pathSpec" value="/admin/*,*.jsp" />
+    </bean>
+    <bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
+        <property name="constraint" ref="adminSecurityConstraint" />
+        <property name="pathSpec" value="*.action" />
+    </bean>
+    <bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler">
+        <property name="loginService" ref="securityLoginService" />
+        <property name="authenticator">
+            <bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator" />
+        </property>
+        <property name="constraintMappings">
+            <list>
+                <ref bean="adminSecurityConstraintMapping" />
+                <ref bean="securityConstraintMapping" />
+            </list>
+        </property>
+        <property name="handler">
+            <bean id="sec" class="org.eclipse.jetty.server.handler.HandlerCollection">
+                <property name="handlers">
+                    <list>
+                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
+                            <property name="contextPath" value="/hawtio" />
+                            <property name="war" value="${activemq.home}/webapps/hawtio" />
+                            <property name="logUrlOnStart" value="true" />
+                        </bean>
+                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
+                            <property name="contextPath" value="/admin" />
+                            <property name="resourceBase" value="${activemq.home}/webapps/admin" />
+                            <property name="logUrlOnStart" value="true" />
+                        </bean>
+                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
+                            <property name="contextPath" value="/fileserver" />
+                            <property name="resourceBase" value="${activemq.home}/webapps/fileserver" />
+                            <property name="logUrlOnStart" value="true" />
+                            <property name="parentLoaderPriority" value="true" />
+                        </bean>
+                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
+                            <property name="contextPath" value="/demo" />
+                            <property name="resourceBase" value="${activemq.home}/webapps-demo/demo" />
+                            <property name="logUrlOnStart" value="true" />
+                        </bean>
+                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
+                            <property name="contextPath" value="/api" />
+                            <property name="resourceBase" value="${activemq.home}/webapps/api" />
+                            <property name="logUrlOnStart" value="true" />
+                        </bean>
+                        <bean class="org.eclipse.jetty.server.handler.ResourceHandler">
+                            <property name="directoriesListed" value="false" />
+                            <property name="welcomeFiles">
+                                <list>
+                                    <value>index.html</value>
+                                </list>
+                            </property>
+                            <property name="resourceBase" value="${activemq.home}/webapps/" />
+                        </bean>
+                        <bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler">
+                            <property name="serveIcon" value="false" />
+                        </bean>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+
+    <bean id="rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
+      <property name="rules">
+          <set>
+              <bean class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule">
+                  <property name="regex" value="/api/jolokia(.*)"/>
+                  <property name="replacement" value="/hawtio/jolokia$1"/>
+              </bean>
+          </set>
+      </property>
+    </bean>
+
+    <bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
+    </bean>
+
+    <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
+             <!-- the default port number for the web console -->
+        <property name="port" value="8161"/>
+    </bean>
+
+    <bean id="Server" depends-on="jettyPort" class="org.eclipse.jetty.server.Server" init-method="start"
+        destroy-method="stop">
+
+        <property name="connectors">
+            <list>
+                <bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+                     <!-- see the jettyPort bean -->
+                    <property name="port" value="#{systemProperties['jetty.port']}" />
+                </bean>
+                <!--
+                    Enable this connector if you wish to use https with web console
+                -->
+                <!--
+                <bean id="SecureConnector" class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
+                    <property name="port" value="8162" />
+                    <property name="keystore" value="file:${activemq.conf}/broker.ks" />
+                    <property name="password" value="password" />
+                </bean>
+                -->
+            </list>
+        </property>
+
+        <property name="handler">
+            <bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
+                <property name="handlers">
+                    <list>
+                        <ref bean="rewrite"/>
+                        <ref bean="contexts" />
+                        <ref bean="securityHandler" />
+                    </list>
+                </property>
+            </bean>
+        </property>
+
+    </bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/log4j.properties b/assembly/src/release/examples/conf/log4j.properties
new file mode 100644
index 0000000..ac07489
--- /dev/null
+++ b/assembly/src/release/examples/conf/log4j.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+## 
+## http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used by the standalone ActiveMQ broker
+#
+log4j.rootLogger=INFO, stdout, logfile
+
+# CONSOLE appender
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %-5p %m%n
+
+# Log File appender
+log4j.appender.logfile=org.apache.log4j.FileAppender
+log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.logfile.file=activemq.log
+log4j.appender.logfile.append=true
+
+#
+#  You can change logger levels here.
+#
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/resin-web.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/resin-web.xml b/assembly/src/release/examples/conf/resin-web.xml
new file mode 100644
index 0000000..1641549
--- /dev/null
+++ b/assembly/src/release/examples/conf/resin-web.xml
@@ -0,0 +1,35 @@
+<!--
+    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.
+-->
+<web-app>
+  <!--
+      In order to be able to compatiable with Resin 2.1.x and 3.0.x,
+      both XML and XSLT have to be replaced.
+      If only xalan is included, Resin 2.1.x will fail but not 3.0.x.
+      Therefore the best way is to use the compatiable version of the
+      XML parser ans XSLT.
+       - Please refere to the following link for more detailed information.
+       - http://www.caucho.com/resin-3.0/xml/jaxp.xtp
+  -->
+  <!-- xml -->
+  <system-property javax.xml.parsers.DocumentBuilderFactory=
+               "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
+  <system-property javax.xml.parsers.SAXParserFactory=
+               "org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
+  <!--  xslt -->
+  <system-property javax.xml.transform.TransformerFactory=
+               "org.apache.xalan.processor.TransformerFactoryImpl"/>
+</web-app>


[08/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/DurableChat/DurableChat.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/DurableChat/DurableChat.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/DurableChat/DurableChat.java
new file mode 100644
index 0000000..5bcdc8b
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/DurableChat/DurableChat.java
@@ -0,0 +1,268 @@
+/*
+Copyright 2001-2008, Progress Software Corporation -  All Rights Reserved
+
+DurableChat application
+
+A basic JMS Application that uses:
+    - Publish and Subscribe
+    - Durable Subsciptions
+    - Persistent Messages
+
+This sample publishes and subscribes to a specified topic.
+Text you enter is published to the topic with the user name.
+The message will persist for ten minutes if the subscriber is not available.
+If the subscriber reconnects within that time, the message is delivered.
+
+Usage:
+  java DurableChat -b <broker:port> -u <username> -p <password>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+      -p password    password for user (not checked)
+
+Suggested demonstration:
+  - In separate console windows, start instances of the application
+    under unique user names.For example:
+       java DurableChat -b tcp://localhost:61616 -u ACCOUNTING
+       java DurableChat -b tcp://localhost:61616 -u LEGAL
+  - Enter text and then press Enter to publish the message.
+  - See messages appear under the various user names as you
+    enter messages in each console window.
+  - Stop a session by pressing CTRL+C in its console window.
+  - Keep sending messages in other sessions.
+  - Restart the subscriber username session that was stopped.
+  - Note that the "missed" messages are still available if the restart is
+    within thirty minutes.
+
+*/
+import org.apache.activemq.*;
+
+
+public class DurableChat implements
+     javax.jms.MessageListener      // to handle message subscriptions
+{
+    private static final String APP_TOPIC = "jms.samples.durablechat";
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_PASSWORD = "password";
+    private static final long   MESSAGE_LIFESPAN = 1800000; //30 minutes
+
+    private javax.jms.Connection connection = null;
+    private javax.jms.Session pubSession = null;
+    private javax.jms.Session subSession = null;
+
+
+    public void DurableChatter(String broker, String username, String password)
+    {
+        javax.jms.MessageProducer publisher = null;
+        javax.jms.MessageConsumer subscriber = null;
+        javax.jms.Topic topic = null;
+
+        //Create a connection:
+        try{
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connection = factory.createConnection (username, password);
+
+            //Durable Subscriptions are indexed by username, clientID and subscription name
+            //It is a good practice to set the clientID:
+            connection.setClientID(username);
+            pubSession = connection.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            subSession = connection.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse){
+            System.err.println ("Error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        //Create Publisher and Durable Subscriber:
+        try{
+
+            topic = pubSession.createTopic(APP_TOPIC);
+            subscriber = subSession.createDurableSubscriber(topic, username);
+            subscriber.setMessageListener(this);
+            publisher = pubSession.createProducer(topic);
+            connection.start();
+        }
+        catch (javax.jms.JMSException jmse){
+            System.out.println("Error: connection not started.");
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        //Wait for user input
+        try
+        {
+            System.out.println("\nDurableChat application:\n"
+            					+ "========================\n"
+            					+ "The user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+								+ "The application will publish messages to the " + APP_TOPIC + " topic.\n"
+                                + "The application also creates a durable subscription to that topic to consume any messages published there.\n\n"
+                                + "Type some text, and then press Enter to publish it as a TextMesssage from " + username + ".\n");
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
+            while (true)
+            {
+                String s = stdin.readLine();
+
+                if(s == null){
+                    exit();
+                }
+                else if (s.length()>0)
+                {
+                    try
+                    {
+                        javax.jms.TextMessage msg = pubSession.createTextMessage();
+                        msg.setText(username + ": " + s);
+                        //Publish the message persistantly:
+                        publisher.send(
+                            msg,                               //message
+                            javax.jms.DeliveryMode.PERSISTENT, //publish persistently
+                            javax.jms.Message.DEFAULT_PRIORITY,//priority
+                            MESSAGE_LIFESPAN);                 //Time to Live
+                    }
+                    catch (javax.jms.JMSException jmse){
+                        System.err.println("Error publishing message:" + jmse.getMessage());
+                    }
+                }
+            }
+        }
+        catch (java.io.IOException ioe)
+        {
+            ioe.printStackTrace();
+        }
+    }
+
+    /** Message Handler**/
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( string );
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+
+
+    /** Cleanup resources cleanly and exit. */
+    private void exit()
+    {
+        try
+        {
+            connection.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = null;
+        String password  = DEFAULT_PASSWORD;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+
+            if (arg.equals("-b")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing broker name:port");
+                    System.exit(1);
+                }
+                broker = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-u")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing user name");
+                    System.exit(1);
+                }
+                username = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-p")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing password");
+                    System.exit(1);
+                }
+                password = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-h")) {
+                printUsage();
+                System.exit(1);
+            }
+
+            // Invalid argument
+            System.err.println ("error: unexpected argument: "+arg);
+            printUsage();
+            System.exit(1);
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+        }
+
+        // Start the JMS client for the "chat".
+        DurableChat durableChat = new DurableChat();
+        durableChat.DurableChatter (broker, username, password);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java DurableChat (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u username  Specify unique user name. (Required)\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/HierarchicalChat/HierarchicalChat.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/HierarchicalChat/HierarchicalChat.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/HierarchicalChat/HierarchicalChat.java
new file mode 100644
index 0000000..997e3b5
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/HierarchicalChat/HierarchicalChat.java
@@ -0,0 +1,303 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a JMS Application using Publish and Subscribe with
+Hierarchical Topics
+
+This sample publishes and subscribes to specified topic nodes.
+Text you enter is published and then received by all subscribers to
+the that topic on the specified broker.
+
+Usage:
+  java HierarchicalChat -b <broker:port> -u <username> -p <password> -t <pubTopicname> -s <subTopicname>
+      -b broker:port        points to a message broker
+                            Default: tcp://localhost:61616
+      -u username           must be unique (but is not checked)
+      -p password           password for user (not checked)
+      -t pubTopicname     	name of topic to which to publish
+                            Default: jms.samples.hierarchicalchat
+      -s subTopicname	    name of topic to which to subscribe
+                            Default: jms.samples.*
+
+Suggested demonstration:
+  - In separate console windows with the environment set,
+    start instances of the application
+    under unique user names.
+    For example:
+       java HierarchicalChat -u SALES -t sales -s sales.*
+       java HierarchicalChat -u USA -t sales.usa -s sales.usa
+  - Enter text in the USA console window and then press Enter
+    to publish the message.
+  - Note that messages published from the SALES console window
+    to the sales topic are not seen by the USA user listening
+    to messages on the sales.usa topic
+  - Message published to the sales.usa are received by the SALES
+    user listening to sales.*
+  - Stop a session by pressing CTRL+C in its console window.
+
+*/
+
+import org.apache.activemq.*;
+
+
+public class HierarchicalChat
+    implements javax.jms.MessageListener
+{
+    private static final String DEFAULT_PUBLISHER_TOPIC = "jms.samples.hierarchicalchat";
+    private static final String DEFAULT_SUBSCRIBER_TOPIC = "jms.samples.*";
+    private static final String DEFAULT_SUBSCRIBER_ROOT = "jms.samples";
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+
+    private static final String DEFAULT_PASSWORD = "password";
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session pubSession = null;
+    private javax.jms.Session subSession = null;
+    private javax.jms.MessageProducer publisher = null;
+
+    /** Create JMS client for publishing and subscribing to messages. */
+    private void chatter( String broker, String username, String password, String pubTopicname, String subTopicname)
+    {
+
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            pubSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            subSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Publisher and Subscriber to 'chat' topics
+        // Note that the publish and subscribe topics are different.
+        try
+        {
+            javax.jms.Topic subscriberTopic = pubSession.createTopic (subTopicname);
+            javax.jms.MessageConsumer subscriber = subSession.createConsumer(subscriberTopic, null, false);
+            subscriber.setMessageListener(this);
+            javax.jms.Topic publisherTopic = pubSession.createTopic (pubTopicname);
+            publisher = pubSession.createProducer(publisherTopic);
+            // Now that setup is complete, start the Connection
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+        try
+        {
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+                        System.out.println("\nHierarchicalChat application:\n"
+			            					+ "============================\n"
+			            					+ "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+											+ "The application will publish messages to the " + DEFAULT_PUBLISHER_TOPIC + " topic." + ".\n"
+			                                + "The application also subscribes to topics using the wildcard syntax " + DEFAULT_SUBSCRIBER_TOPIC 
+											+ " so that it can receive all messages to " + DEFAULT_SUBSCRIBER_ROOT + " and its subtopics.\n\n"
+			                                + "Type some text, and then press Enter to publish a TextMesssage from " + username + ".\n");
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if ( s.length() > 0 )
+                {
+                    javax.jms.TextMessage msg = pubSession.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    publisher.send( msg );
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+    }
+
+    /**
+     * Handle the message
+     * (as specified in the javax.jms.MessageListener interface).
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( string );
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources and then exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = null;
+        String password  = DEFAULT_PASSWORD;
+        String pubTopicname = DEFAULT_PUBLISHER_TOPIC;
+        String subTopicname = DEFAULT_SUBSCRIBER_TOPIC;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+            // Options
+            if (!arg.startsWith("-")) {
+                System.err.println ("error: unexpected argument - "+arg);
+                printUsage();
+                System.exit(1);
+            }
+            else {
+                if (arg.equals("-b")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing broker name:port");
+                        System.exit(1);
+                    }
+                    broker = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-u")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing user name");
+                        System.exit(1);
+                    }
+                    username = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-p")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing password");
+                        System.exit(1);
+                    }
+                    password = argv[++i];
+                    continue;
+                }
+                if (arg.equals("-t")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing publisher topic name");
+                        System.exit(1);
+                    }
+                    pubTopicname = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-s")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing subscriber topic name");
+                        System.exit(1);
+                    }
+                    subTopicname = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-h")) {
+                    printUsage();
+                    System.exit(1);
+                }
+            }
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+        }
+
+        // Start the JMS client for the "chat".
+        HierarchicalChat chat = new HierarchicalChat();
+        chat.chatter (broker, username, password, pubTopicname, subTopicname);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java HierarchicalChat (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port          Specify name:port of broker.\n");
+        use.append("                        Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name               Specify unique user name. (Required)\n");
+        use.append("  -p password           Specify password for user.\n");
+        use.append("                        Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -t pubTopicname       name of topic to which to publish.\n");
+        use.append("                        Default publisher topic name: "+DEFAULT_PUBLISHER_TOPIC+"\n");
+        use.append("  -s subTopicname       Specify subscriber topic name.\n");
+        use.append("                        name of topic to which to subscribe: "+DEFAULT_SUBSCRIBER_TOPIC+"\n");
+        use.append("  -h                    This help screen.\n");
+        System.err.println (use);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.java
new file mode 100644
index 0000000..19ab78f
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.java
@@ -0,0 +1,328 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application Using
+    Subscribe
+
+When you run this program, it will
+subscribe to any group of messages specified
+in a properties file. [See comments in
+MessageMonitor.properties for information on
+this file.]
+
+Every message topic being monitored will be
+displayed to a Java window.
+
+Usage:
+  java MessageMonitor
+
+Suggested demonstration:
+  - Start one instance of this application:
+        java MessageMonitor
+  - Run one or more Chat and/or DurableChat window(s).
+  - Enter messages on the various chat windows.
+  - Watch the MessageMonitor display the messages.
+*/
+import org.apache.activemq.*;
+
+import javax.swing.JTextArea;
+import javax.swing.JFrame;
+import javax.swing.JScrollPane;
+import javax.swing.JButton;
+
+import javax.swing.text.Highlighter;
+import javax.swing.text.DefaultHighlighter;
+import javax.swing.text.BadLocationException;
+
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.BevelBorder;
+import javax.swing.border.SoftBevelBorder;
+
+import java.awt.Toolkit;
+import java.awt.Dimension;
+import java.awt.BorderLayout;
+import java.awt.Rectangle;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+
+import javax.jms.Topic;
+import javax.jms.Session;
+import javax.jms.Connection;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+
+
+import java.io.FileInputStream;
+
+import java.util.Vector;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+public class MessageMonitor
+extends JFrame
+{
+    private static final String DEFAULT_PROPERTIES_FILE = "MessageMonitor.properties";
+
+    String propertiesFile = DEFAULT_PROPERTIES_FILE;
+    String brokerHostPort = "localhost";
+    String connectID = "MessageMonitor";
+    String userID = "Administrator";
+    
+    String subscriptionTopics = "jms.samples.chat";
+    String textFontName = "Dialog";
+    String textFontStyle = "PLAIN";
+    String textFontSize = "12";
+    String title = "MessageMonitor";
+
+    JTextArea textArea = new JTextArea();
+    JScrollPane scrollPane = new JScrollPane(textArea);
+    JButton clearButton = new JButton("Clear");
+
+    Connection connection = null;
+    Session session = null;
+
+    private String user = ActiveMQConnection.DEFAULT_USER;
+    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
+    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
+
+
+    /** Constructor for MessageMonitor window. */
+    public MessageMonitor()
+    {
+        loadProperties();
+
+        setTitle(title);
+
+        // Connect to Message Broker
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(user, password, url);
+
+            connection = factory.createConnection (userID, password);
+            session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("Cannot connect to Broker");
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Subscribe to Topics
+        StringTokenizer topics = new StringTokenizer(subscriptionTopics, ",");
+        while (topics.hasMoreTokens())
+        {
+            try
+            {
+                String topicName = topics.nextToken();
+                System.out.println ("Subscribing to: " + topicName);
+                new Subscription(session.createTopic(topicName));
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+
+        // Set up the viewing area.
+        textArea.setEditable(false);
+        scrollPane.setBorder(new CompoundBorder(new EmptyBorder(6,6,6,6),
+                                                new SoftBevelBorder(BevelBorder.LOWERED)));
+        getContentPane().add(scrollPane,BorderLayout.CENTER);
+        getContentPane().add(clearButton,BorderLayout.SOUTH);
+        clearButton.addActionListener(new OnClear());
+        // Start the connection so that we can now receive messages.
+        try
+        {
+            connection.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("Cannot start connection");
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+    }
+
+    /** Class to handle the subsciption to messages. */
+    public class Subscription implements javax.jms.MessageListener
+    {
+        public Subscription(Topic topic)
+        {
+            try
+            {
+                topicSubscriber = session.createConsumer(topic);
+                topicSubscriber.setMessageListener(this);
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+
+       /**
+        * Handle the text message
+        * (as specified in the javax.jms.MessageListener interface).
+        */
+
+        public void onMessage(javax.jms.Message message)
+        {
+            String msgBody = null;
+            String msgClass = null;
+
+            if (message instanceof javax.jms.TextMessage)
+            {
+                msgClass = "javax.jms.TextMessage";
+                try
+                {
+                    msgBody = ((javax.jms.TextMessage)message).getText();
+                }
+                catch (javax.jms.JMSException jmse)
+                {
+                    msgBody = "";
+                }
+            }
+            else
+            {
+                return;
+            }
+            try
+            {
+                textArea.append("\n");
+                textArea.append("-----------------------------------------------------------------------------------------------------\n");
+                // textArea.append("Class: " + msgClass + "\n");
+                textArea.append("The following message, received on topic " + ((Topic)message.getJMSDestination()).getTopicName() + ", was sent by\n");
+                //textArea.append("\n");
+                textArea.append(msgBody);
+
+                // Ensure Appended Text is Visible
+                Rectangle area = textArea.modelToView(textArea.getText().length());
+                if (area != null) textArea.scrollRectToVisible(area);
+
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+            catch (BadLocationException ble)
+            {
+                ble.printStackTrace();
+            }
+
+        }
+
+        MessageConsumer topicSubscriber = null;
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String[] args)
+    {
+        // There should be no arguments to this program.
+        if (args.length > 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        MessageMonitor messageMonitor = new MessageMonitor();
+
+        messageMonitor.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e)
+            {
+                System.exit(0);
+            }
+        });
+
+        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+        screenSize.height = screenSize.height / 2 ;
+        screenSize.width = screenSize.width / 2 ;
+        messageMonitor.setSize(screenSize);
+        messageMonitor.setVisible(true);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage()
+    {
+        StringBuffer use = new StringBuffer();
+        use.append("\nusage: MessageMonitor\n\n");
+        use.append("Properties for this sample can be set in a properties file.\n");
+        String dfltFile = System.getProperty("propertiesFile", DEFAULT_PROPERTIES_FILE);
+        use.append("[Default file: " + dfltFile +"]\n\n");
+
+        System.out.print(use);
+    }
+
+    /** Load the window and JMS properties from a file. */
+    private void loadProperties()
+    {
+        try
+        {
+            Properties properties = new Properties();
+
+            propertiesFile = System.getProperty("propertiesFile", propertiesFile);
+
+            properties.load(new FileInputStream(propertiesFile));
+
+            // Connection Properties
+            brokerHostPort = properties.getProperty("brokerHostPort",brokerHostPort).trim();
+            connectID = properties.getProperty("connectID",connectID).trim();
+            userID = properties.getProperty("userID",userID).trim();
+            password = properties.getProperty("password",password).trim();
+
+            // Subscription Properties
+            subscriptionTopics = properties.getProperty("subscriptionTopics", subscriptionTopics).trim();
+
+            // Text Properties
+            textFontName = properties.getProperty("textFontName", textFontName).trim();
+            textFontStyle = properties.getProperty("textFontSize", textFontStyle).trim();
+            textFontSize = properties.getProperty("textFontSize", textFontSize).trim();
+
+            // Window Properties
+            title = properties.getProperty("title", title).trim();
+
+        }
+        catch (java.io.FileNotFoundException fnfe)
+        {
+            System.out.println (propertiesFile + " not found: using defaults"); // Use Defaults
+        }
+        catch (java.io.IOException ioe)
+        {
+            ioe.printStackTrace();
+        }
+    }
+
+    /** Class to handle the "Clear" button action. */
+    public class OnClear implements ActionListener
+    {
+        public void actionPerformed(ActionEvent evt)
+        {
+            textArea.setText("");
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.properties b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.properties
new file mode 100644
index 0000000..b272abe
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/MessageMonitor/MessageMonitor.properties
@@ -0,0 +1,55 @@
+#
+# This is the properties file for the MessageMonitor Class.
+#
+# A MessageMonitor object will load this file when constructed.
+# By default, a MessageMonitor object searches for and load a 
+# file named "MessageMonitor.properties" in the JVM's "current" directory.
+#
+# This behavior may be overriden by assigning an alternate property file
+# name and location to the System property "propertiesFile".
+#
+# Property:         brokerHostPort
+# Default Value:    localhost   
+# Description:      Specifies the host and port of the Messaging Broker to connect to.
+brokerHostPort      localhost  
+#
+# Property:         connectID
+# Default Value:    MessageMonitor
+# Description:      Specifies the program identifier used to connect to the Messaging Broker.
+connectID MessageMonitor   
+#
+# Property:         userID
+# Default Value:    MessageMonitor
+# Description:      Specifies the user identifier used to connect to the Messaging Broker.
+userID              Administrator   
+#
+# Property:         password
+# Default Value:    MessageMonitor
+# Description:      Specifies the password used to connect to the Messaging Broker.
+password            Administrator   
+#
+# Property:         subscriptionTopics
+# Default Value:    jms.samples.#
+# Description:      A comma-separated list of topics that MessageMonitor subscribes to.
+#                   An empty list will subscribe to jms.samples.#.
+subscriptionTopics  jms.samples.*
+##
+# Property:         textFontName
+# Default Value:    Dialog
+# Description:      The name of the font used to display recieved messages.
+textFontName        Dialog   
+#
+# Property:         textFontStyle
+# Default Value:    PLAIN
+# Description:      The style of the font used to display recieved messages.
+textFontStyle       PLAIN   
+#
+# Property:         textFontSize
+# Default Value:    12
+# Description:      The size of the font used to display recieved messages.
+textFontSize        12   
+#
+# Property:         title
+# Default Value:    MessageMonitor
+# Description:      The title of the MessageMonitor Window.
+title               MessageMonitor   

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicReplier.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicReplier.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicReplier.java
new file mode 100644
index 0000000..a786afe
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicReplier.java
@@ -0,0 +1,318 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application using:
+    - Synchronous Request/Reply
+    - Publish/Subscribe
+    - javax.jms.TopicRequestor class
+    - JMSReplyTo Header
+
+When this program runs, it waits for
+messages to the topic "jms.samples.request".
+When that message occurs, a response based on the request
+is sent back to the "Requestor" specified in the JMSReplyTo header.
+
+This sample replies with a simple text manipulation of the request;
+the text is either folded to all UPPERCASE or all lowercase.
+
+Usage:
+  java TopicReplier -b <broker:port> -u <username> -p <password> -m <mode>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+                     Default: SampleReplier
+      -p password    password for user (not checked)
+                     Default: password
+      -m mode        replier mode (uppercase, or lowercase)
+                     Default: uppercase
+
+Suggested usage:
+  - In a console window with the environment set, start a replier:
+       java TopicReplier -u SampleReplier
+  - In another console window, start a Requestor:
+       java TopicRequestor -u SampleRequestor
+  - Enter text in the Requestor window then press Enter.
+
+    The Replier responds with the message in all uppercase characters.
+  - Start other TopicRequestors with different user names to see that
+    replies are not broadcast to all users. For example:
+       java TopicRequestor -u SampleRequestorToo
+
+  - Start other TopicRepliers.
+  - See that all repliers are receiving all the messages,(as they should).
+  - See the Requestor only receives one response.
+       java TopicReplier -u toLower -m lowercase
+
+ */
+
+import org.apache.activemq.*;
+
+
+public class TopicReplier
+    implements javax.jms.MessageListener
+{
+    private static final String APP_TOPIC = "jms.samples.request";
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_USER_NAME = "SampleReplier";
+    private static final String DEFAULT_PASSWORD = "password";
+    private static final String DEFAULT_MODE = "uppercase";
+    private static final int UPPERCASE = 0;
+    private static final int LOWERCASE = 1;
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session session = null;
+    private javax.jms.MessageProducer replier = null;
+
+    private int imode = UPPERCASE;
+
+    /** Create JMS client for publishing and subscribing to messages. */
+    private void start ( String broker, String username, String password, String mode)
+    {
+        // Set the operation mode
+        imode = (mode.equals("uppercase")) ? UPPERCASE : LOWERCASE;
+
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            session = connect.createSession(true, javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Subscriber to application topics as well as a Publisher
+        // to use for JMS replies.
+        try
+        {
+            javax.jms.Topic topic = session.createTopic (APP_TOPIC);
+            javax.jms.MessageConsumer subscriber = session.createConsumer(topic);
+            subscriber.setMessageListener(this);
+            replier = session.createProducer(null);  // Topic will be set for each reply
+            // Now that all setup is complete, start the Connection
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        try
+        {
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            while ( true )
+            {
+                  System.out.println ("\nReplier application:\n"
+			            					+ "============================\n"
+			            					+ "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+											+ "The application gets requests with JMSReplyTo set on the " + APP_TOPIC + " topic."
+											+ "The message is transformed to all uppercase or all lowercase, and then returned to the requestor."
+			                                + "The Requestor application displays the result.\n\n"
+			                                + "Enter EXIT or press Ctrl+C to close the Replier.\n");
+                String s = stdin.readLine();
+                if ( s == null || s.equalsIgnoreCase("EXIT"))
+                {
+                    System.out.println ("\nStopping Replier. Please wait..\n>");
+                    exit();
+                }
+           }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+    }
+
+    /**
+     * Handle the message.
+     * (as specified in the javax.jms.MessageListener interface).
+     *
+     * IMPORTANT NOTE: We must follow the design paradigm for JMS
+     * synchronous requests.  That is, we must:
+     *   - get the message
+     *   - look for the header specifying JMSReplyTo
+     *   - send a reply to the topic specified there.
+     * Failing to follow these steps might leave the originator
+     * of the request waiting forever.
+     *
+     * OPTIONAL BEHAVIOR: The following actions taken by the
+     * message handler represent good programming style, but are
+     * not required by the design paradigm for JMS requests.
+     *   - set the JMSCorrelationID (tying the response back to
+     *     the original request.
+     *   - use transacted session "commit" so receipt of request
+     *     won't happen without the reply being sent.
+     *
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( "[Request] " + string );
+
+                // Check for a ReplyTo topic
+                javax.jms.Topic replyTopic = (javax.jms.Topic) aMessage.getJMSReplyTo();
+                if (replyTopic != null)
+                {
+                    // Send the modified message back.
+                    javax.jms.TextMessage reply =  session.createTextMessage();
+                    if (imode == UPPERCASE)
+                        reply.setText("Transformed " + string + " to all uppercase: " + string.toUpperCase());
+                    else
+                        reply.setText("Transformed " + string + " to all lowercase " + string.toLowerCase());
+                    reply.setJMSCorrelationID(aMessage.getJMSMessageID());
+                    replier.send(replyTopic, reply);
+                    session.commit();
+                }
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources cleanly and exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = DEFAULT_USER_NAME;
+        String password  = DEFAULT_PASSWORD;
+        String mode  = DEFAULT_MODE;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+
+            if (arg.equals("-b")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing broker name:port");
+                    System.exit(1);
+                }
+                broker = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-u")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing user name");
+                    System.exit(1);
+                }
+                username = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-p")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing password");
+                    System.exit(1);
+                }
+                password = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-m")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing mode");
+                    System.exit(1);
+                }
+                mode = argv[++i];
+                if (!(mode.equals("uppercase") || mode.equals("lowercase"))) {
+                    System.err.println("error: mode must be 'uppercase' or 'lowercase'");
+                    System.exit(1);
+                }
+                continue;
+            }
+
+            if (arg.equals("-h")) {
+                printUsage();
+                System.exit(1);
+            }
+
+            // Invalid argument
+            System.err.println ("error: unexpected argument: "+arg);
+            printUsage();
+            System.exit(1);
+        }
+
+
+        // Start the JMS client for the "chat".
+        TopicReplier replier = new TopicReplier();
+        replier.start (broker, username, password, mode);
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java Replier (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name.\n");
+        use.append("               Default broker: "+DEFAULT_USER_NAME+"\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -m mode      Replier operating mode - uppercase or lowercase.\n");
+        use.append("               Default mode: "+DEFAULT_MODE+"\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicRequestor.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicRequestor.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicRequestor.java
new file mode 100644
index 0000000..4c48fab
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/RequestReply/TopicRequestor.java
@@ -0,0 +1,241 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+ Sample Application
+
+Writing a Basic JMS Application using:
+    - Synchronous Request/Reply
+    - Publish/Subscribe
+    - javax.jms.TopicRequestor class
+    - JMSReplyTo Header
+
+When this program runs, it reads input from System.in
+and then sends the text as a message to the topic
+"progress.samples.request".
+
+A "Replier" class should be waiting for the request.
+It will reply with a message.
+
+NOTE: You must run the TopicReplier first.
+(Otherwise the syncronous request will block forever.)
+
+Usage:
+  java TopicRequestor -b <broker:port> -u <username> -p <password>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+                     Default: SampleRequestor
+      -p password    password for user (not checked)
+                     Default: password
+
+Suggested demonstration:
+  - In a console window with the environment set,
+    start a copy of the Replier. For example:
+       java TopicReplier -u SampleReplier
+  - In another console window, start a Requestor.
+    For example:
+       java TopicRequestor -u SampleRequestor
+  - Enter text in the Requestor window then press Enter.
+  
+    The Replier responds with the message in all uppercase characters.
+  - Start other Requestors with different user names to see that
+    replies are not broadcast to all users. For example:
+       java TopicRequestor -u SampleRequestorToo
+
+  - Start other Repliers.
+  - See that all repliers are receiving all the messages,(as they should).
+  - See the Requestor only receives one response.
+       java TopicReplier -u toLower -m lowercase
+*/
+import org.apache.activemq.*;
+
+
+public class TopicRequestor
+{
+    private static final String APP_TOPIC = "jms.samples.request";
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_USER_NAME = "SampleRequestor";
+    private static final String DEFAULT_PASSWORD = "password";
+
+    private javax.jms.TopicConnection connect = null;
+    private javax.jms.TopicSession session = null;
+
+    /** Create JMS client for publishing and subscribing to messages. */
+    private void start ( String broker, String username, String password)
+    {
+        // Create a connection.
+        try
+        {
+            javax.jms.TopicConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createTopicConnection (username, password);
+            session = connect.createTopicSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Topic for all requests.  TopicRequestor will be created
+        // as needed.
+        javax.jms.Topic topic = null;
+        try
+        {
+            topic = session.createTopic (APP_TOPIC);
+            // Now that all setup is complete, start the Connection
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+          try
+        {
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            System.out.println ("\nRequestor application:\n"
+			            					+ "============================\n"
+			            					+ "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+											+ "The application uses a TopicRequestor to on the " + APP_TOPIC + " topic."
+											+ "The Replier application gets the message, and transforms it."
+			                                + "The Requestor application displays the result.\n\n"
+			                                + "Type some mixed case text, and then press Enter to make a request.\n");
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if ( s.length() > 0 )
+                {
+                    javax.jms.TextMessage msg = session.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    // Instead of publishing, we will use a TopicRequestor.
+                    javax.jms.TopicRequestor requestor = new javax.jms.TopicRequestor(session, topic);
+                    javax.jms.Message response = requestor.request(msg);
+                    // The message should be a TextMessage.  Just report it.
+                    javax.jms.TextMessage textMessage = (javax.jms.TextMessage) response;
+                    System.out.println( "[Reply] " + textMessage.getText() );
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources cleanly and exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = DEFAULT_USER_NAME;
+        String password  = DEFAULT_PASSWORD;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+
+            if (arg.equals("-b")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing broker name:port");
+                    System.exit(1);
+                }
+                broker = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-u")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing user name");
+                    System.exit(1);
+                }
+                username = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-p")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing password");
+                    System.exit(1);
+                }
+                password = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-h")) {
+                printUsage();
+                System.exit(1);
+            }
+
+            // Invalid argument
+            System.err.println ("error: unexpected argument: "+arg);
+            printUsage();
+            System.exit(1);
+        }
+
+        // Start the JMS client for the "chat".
+        TopicRequestor requestor = new TopicRequestor();
+        requestor.start (broker, username, password);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java Requestor (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name.\n");
+        use.append("               Default broker: "+DEFAULT_USER_NAME+"\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/SelectorChat/SelectorChat.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/SelectorChat/SelectorChat.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/SelectorChat/SelectorChat.java
new file mode 100644
index 0000000..64c9a77
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/SelectorChat/SelectorChat.java
@@ -0,0 +1,296 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application using Publish and Subscribe using
+Message Selectors
+
+This sample publishes messages and sets a property in the message header when
+publishing messages. The subscriber set a message selector to select these
+messages. In this sample we name the property "Department"
+
+Usage:
+  java SelectorChat -b <broker:port> -u <username> -p <password> -v <property> -s <selector>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+      -p password    (optional) password for user (not checked)
+                     Default: password
+      -s selection   required, selection value to set to message property
+
+
+Suggested demonstration:
+  - In separate console windows with the environment set,
+    start instances of the application
+    under unique user names.
+    For example:
+       java SelectorChat -u BOB -s MARKETING
+       java SelectorChat -u JANE -s MARKETING
+  - Enter text and then press Enter to publish the message.
+  - See messages appear under the various user names as you
+    enter messages in each console window.
+  - Try starting a new instance with a different message selector
+  - Stop a session by pressing CTRL+C in its console window.
+
+*/
+
+import org.apache.activemq.*;
+
+
+public class SelectorChat
+    implements javax.jms.MessageListener
+{
+    private static final String APP_TOPIC = "jms.samples.chat";
+    private static final String PROPERTY_NAME = "Department";
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_PASSWORD = "password";
+
+    private javax.jms.Connection connect  = null;
+    private javax.jms.Session pubSession  = null;
+    private javax.jms.Session subSession  = null;
+    private javax.jms.MessageProducer publisher = null;
+
+    /** Create JMS client for publishing and subscribing to messages. */
+    private void chatter( String broker, String username, String password, String selection)
+    {
+
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            pubSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            subSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Publisher and Subscriber to 'chat' topics
+
+        try
+        {
+            javax.jms.Topic topic = pubSession.createTopic (APP_TOPIC);
+            // NOTE: The subscriber's message selector will now be set:
+            javax.jms.MessageConsumer subscriber = subSession.createConsumer(topic, PROPERTY_NAME + " = \'" + selection +"\'", false);
+            subscriber.setMessageListener(this);
+            publisher = pubSession.createProducer(topic);
+            // Now that setup is complete, start the Connection
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        try
+        {
+            // Read all standard input and send it as a message.
+
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );		   
+		        System.out.println ("\nSelectorChat application:\n"
+			            	  + "===========================\n"
+			            	  + "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+							  + "The application will publish messages with " + PROPERTY_NAME + " set to " + selection + " to the " + APP_TOPIC + " topic .\n" 	
+							  + "The application also subscribes to that topic, selecting only messages where " + PROPERTY_NAME + " is " + selection + ".\n"
+							  + "Type some text, and then press Enter to publish it as a TextMesssage from " + username + ".\n");
+		   
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if ( s.length() > 0 )
+                {
+                    javax.jms.TextMessage msg = pubSession.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    // NOTE: here we set a property on messages to be published:
+                    msg.setStringProperty(PROPERTY_NAME, selection);
+                    publisher.send( msg );
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+    }
+
+    /**
+     * Handle the message
+     * (as specified in the javax.jms.MessageListener interface).
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( string );
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources and then exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = null;
+        String password  = DEFAULT_PASSWORD;
+        String selection  = null;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+            // Options
+            if (!arg.startsWith("-")) {
+                System.err.println ("error: unexpected argument - "+arg);
+                printUsage();
+                System.exit(1);
+            }
+            else {
+                if (arg.equals("-b")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing broker name:port");
+                        System.exit(1);
+                    }
+                    broker = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-u")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing user name");
+                        System.exit(1);
+                    }
+                    username = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-p")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing password");
+                        System.exit(1);
+                    }
+                    password = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-s")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing selection");
+                        System.exit(1);
+                    }
+                    selection = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-h")) {
+                    printUsage();
+                    System.exit(1);
+                }
+            }
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+        }
+
+        if (selection == null) {
+            System.err.println ("error: selection must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        // Start the JMS client for the "chat".
+        SelectorChat chat = new SelectorChat();
+        chat.chatter (broker, username, password, selection);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java SelectorChat (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port  Specify name:port of broker.\n");
+        use.append("                Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name       Specify unique user name. (Required)\n");
+        use.append("  -p password   Specify password for user.\n");
+        use.append("                Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -s selection  Message selector value. (Required)\n");
+        use.append("  -h            This help screen\n");
+        System.err.println (use);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/TransactedChat/TransactedChat.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/TransactedChat/TransactedChat.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/TransactedChat/TransactedChat.java
new file mode 100644
index 0000000..3122783
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/TransactedChat/TransactedChat.java
@@ -0,0 +1,296 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application using
+    - Publish and Subscribe
+    - Transacted Sessions
+    - Multiple Sessions
+
+Run this program to publish and subscribe to the specified topic.
+Messages are buffered and sent when a specific string is seen ("COMMIT").
+Messages buffered can be discarded by entering a specified string ("CANCEL").
+
+Usage:
+  java TransactedChat -b <broker:port> -u <username> -p <password>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+      -p password    password for user (not checked)
+
+Suggested demonstration:
+  - In a console window with the environment set, start this
+    application. In other console windows start other sessions
+    under different user names. For example:
+       java TransactedChat -u ADMINISTRATION
+       java TransactedChat -u FACILITIES
+  - Type some text and then press Enter.
+  - Repeat to create a batch of messages.
+  - Send the batched messages by entering the text "COMMIT"
+  - Discard the batched messages by entering the text "CANCEL"
+    
+
+*/
+import org.apache.activemq.*;
+
+public class TransactedChat
+    implements javax.jms.MessageListener
+{
+    private static final String APP_TOPIC = "jms.samples.chat";
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_PASSWORD = "password";
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session publishSession = null;
+    private javax.jms.Session subscribeSession = null;
+    private javax.jms.MessageProducer publisher = null;
+
+    /** Create JMS client for publishing and subscribing to messages. */
+    private void chatter( String broker, String username, String password)
+    {
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            // We want to be able up commit/rollback messages published,
+            // but not affect messages consumed. Therefore, we need two sessions.
+            publishSession = connect.createSession(true, javax.jms.Session.AUTO_ACKNOWLEDGE);
+            subscribeSession = connect.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Publisher and Subscriber to 'chat' topics
+        try
+        {
+            javax.jms.Topic topic = subscribeSession.createTopic (APP_TOPIC);
+            javax.jms.MessageConsumer subscriber = subscribeSession.createConsumer(topic);
+            subscriber.setMessageListener(this);
+            publisher = publishSession.createProducer(topic);
+            // Now start the Connection
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        try
+        {
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            boolean showMessage = true;
+            while ( true )
+            {
+                if (showMessage)
+                {
+                    System.out.println ("TransactedChat application:");
+	                System.out.println ("===========================" );
+                    System.out.println ("The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".");
+					System.out.println ("The application will stage messages to the " + APP_TOPIC + " topic until you either commit them or roll them back.");
+				    System.out.println ("The application also subscribes to that topic to consume any committed messages published there.\n");
+                    System.out.println ("1. Enter text to publish and then press Enter to stage the message.");
+                    System.out.println ("2. Add a few messages to the transaction batch.");
+                    System.out.println ("3. Then, either:");
+                    System.out.println ("     o Enter the text 'COMMIT', and press Enter to publish all the staged messages.");
+                    System.out.println ("     o Enter the text 'CANCEL', and press Enter to drop the staged messages waiting to be sent.");
+                    showMessage = false;
+                }
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if (s.trim().equals("CANCEL"))
+                {
+                    // Rollback the messages. A new transaction is implicitly
+                    // started for following messages.
+                    System.out.println ("Cancelling messages...");
+                    publishSession.rollback();
+                    System.out.println ("Staged messages have been cleared.");
+                    showMessage = false; // don't show the help message again.
+                }
+                else if ( s.length() > 0 )
+                // See if we should send the messages
+                  if (s.trim().equals("COMMIT"))
+                  {
+                        // Commit (send) the messages. A new transaction is
+                        // implicitly  started for following messages.
+                        System.out.println ("Committing messages... ");
+                        publishSession.commit();
+                        System.out.println ("Staged messages have all been sent.");
+                        showMessage = false; // dont't show the help message again.
+                  }
+                  else
+                   {
+                    javax.jms.TextMessage msg = publishSession.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    // Publish the message persistently
+                    publisher.send( msg );
+                   }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+    }
+
+    /**
+     * Handle the message
+     * (as specified in the javax.jms.MessageListener interface).
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( string );
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources cleanly and exit. */
+    private void exit()
+    {
+        try
+        {
+            publishSession.rollback(); // Rollback any uncommitted messages.
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = null;
+        String password  = DEFAULT_PASSWORD;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+
+            if (arg.equals("-b")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing broker name:port");
+                    System.exit(1);
+                }
+                broker = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-u")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing user name");
+                    System.exit(1);
+                }
+                username = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-p")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing password");
+                    System.exit(1);
+                }
+                password = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-h")) {
+                printUsage();
+                System.exit(1);
+            }
+
+            // Invalid argument
+            System.err.println ("error: unexpected argument: "+arg);
+            printUsage();
+            System.exit(1);
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+        }
+
+        // Start the JMS client for the "chat".
+        TransactedChat chat = new TransactedChat();
+        chat.chatter (broker, username, password);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java TransactedChat (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name. (Required)\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+}
+


[17/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/Log4jJMSAppenderExample.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/Log4jJMSAppenderExample.java b/assembly/src/release/example/src/Log4jJMSAppenderExample.java
deleted file mode 100644
index 657b9b2..0000000
--- a/assembly/src/release/example/src/Log4jJMSAppenderExample.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.log4j.Logger;
-import org.apache.log4j.spi.LoggingEvent;
-
-
-/**
- * A simple example of log4j jms appender in conjuction with ActiveMQ
- */
-public class Log4jJMSAppenderExample implements MessageListener {
-
-	public Log4jJMSAppenderExample() throws Exception {
-		// create a logTopic topic consumer
-		ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-		Connection conn = factory.createConnection();
-		Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		conn.start();
-		MessageConsumer consumer = sess.createConsumer(sess.createTopic("logTopic"));
-		consumer.setMessageListener(this);
-		// log a message
-		Logger log = Logger.getLogger(Log4jJMSAppenderExample.class);
-		log.info("Test log");
-		// clean up
-		Thread.sleep(1000);
-		consumer.close();
-		sess.close();
-		conn.close();
-		System.exit(1);
-	}
-	
-	public static void main(String[] args) throws Exception {
-		new Log4jJMSAppenderExample();
-	}
-
-	public void onMessage(Message message) {
-		try {
-			// receive log event in your consumer
-			LoggingEvent event = (LoggingEvent)((ActiveMQObjectMessage)message).getObject();
-			System.out.println("Received log [" + event.getLevel() + "]: "+ event.getMessage());
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-	
-	
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/ProducerAndConsumerTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/ProducerAndConsumerTool.java b/assembly/src/release/example/src/ProducerAndConsumerTool.java
deleted file mode 100644
index a1b96ff..0000000
--- a/assembly/src/release/example/src/ProducerAndConsumerTool.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.util.Arrays;
-import java.util.HashSet;
-
-import javax.jms.MessageListener;
-
-/**
- * A simple tool for producing and consuming messages
- * 
- * 
- */
-public class ProducerAndConsumerTool extends ConsumerTool implements MessageListener {
-
-    public static void main(String[] args) {
-
-        ConsumerTool consumerTool = new ConsumerTool();
-        String[] unknown = CommandLineSupport.setOptions(consumerTool, args);
-        HashSet<String> set1 = new HashSet<String>(Arrays.asList(unknown));
-
-        ProducerTool producerTool = new ProducerTool();
-        unknown = CommandLineSupport.setOptions(producerTool, args);
-        HashSet<String> set2 = new HashSet<String>(Arrays.asList(unknown));
-
-        set1.retainAll(set2);
-        if (set1.size() > 0) {
-            System.out.println("Unknown options: " + set1);
-            System.exit(-1);
-        }
-
-        consumerTool.run();
-        producerTool.run();
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/ProducerTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/ProducerTool.java b/assembly/src/release/example/src/ProducerTool.java
deleted file mode 100755
index 3693fd7..0000000
--- a/assembly/src/release/example/src/ProducerTool.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * A simple tool for publishing messages
- * 
- * 
- */
-public class ProducerTool extends Thread {
-
-    private Destination destination;
-    private int messageCount = 10;
-    private long sleepTime;
-    private boolean verbose = true;
-    private int messageSize = 255;
-    private static int parallelThreads = 1;
-    private long timeToLive;
-    private String user = ActiveMQConnection.DEFAULT_USER;
-    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
-    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
-    private String subject = "TOOL.DEFAULT";
-    private boolean topic;
-    private boolean transacted;
-    private boolean persistent;
-    private long batch = 10;
-    private static Object lockResults = new Object();
-
-    public static void main(String[] args) {
-        ArrayList<ProducerTool> threads = new ArrayList();
-        ProducerTool producerTool = new ProducerTool();
-        String[] unknown = CommandLineSupport.setOptions(producerTool, args);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        producerTool.showParameters();
-        for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) {
-            producerTool = new ProducerTool();
-            CommandLineSupport.setOptions(producerTool, args);
-            producerTool.start();
-            threads.add(producerTool);
-        }
-
-        while (true) {
-            Iterator<ProducerTool> itr = threads.iterator();
-            int running = 0;
-            while (itr.hasNext()) {
-                ProducerTool thread = itr.next();
-                if (thread.isAlive()) {
-                    running++;
-                }
-            }
-            if (running <= 0) {
-                System.out.println("All threads completed their work");
-                break;
-            }
-            try {
-                Thread.sleep(1000);
-            } catch (Exception e) {
-            }
-        }
-    }
-
-    public void showParameters() {
-        System.out.println("Connecting to URL: " + url + " (" + user + ":" + password + ")");
-        System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
-        System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
-        System.out.println("Sleeping between publish " + sleepTime + " ms");
-        System.out.println("Running " + parallelThreads + " parallel threads");
-
-        if (timeToLive != 0) {
-            System.out.println("Messages time to live " + timeToLive + " ms");
-        }
-    }
-
-    public void run() {
-        Connection connection = null;
-        try {
-            // Create the connection.
-            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-            connection = connectionFactory.createConnection();
-            connection.start();
-
-            // Create the session
-            Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-            if (topic) {
-                destination = session.createTopic(subject);
-            } else {
-                destination = session.createQueue(subject);
-            }
-
-            // Create the producer.
-            MessageProducer producer = session.createProducer(destination);
-            if (persistent) {
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            } else {
-                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-            }
-            if (timeToLive != 0) {
-                producer.setTimeToLive(timeToLive);
-            }
-
-            // Start sending messages
-            sendLoop(session, producer);
-
-            System.out.println("[" + this.getName() + "] Done.");
-
-            synchronized (lockResults) {
-                ActiveMQConnection c = (ActiveMQConnection) connection;
-                System.out.println("[" + this.getName() + "] Results:\n");
-                c.getConnectionStats().dump(new IndentPrinter());
-            }
-
-        } catch (Exception e) {
-            System.out.println("[" + this.getName() + "] Caught: " + e);
-            e.printStackTrace();
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected void sendLoop(Session session, MessageProducer producer) throws Exception {
-
-        for (int i = 0; i < messageCount || messageCount == 0; i++) {
-
-            TextMessage message = session.createTextMessage(createMessageText(i));
-
-            if (verbose) {
-                String msg = message.getText();
-                if (msg.length() > 50) {
-                    msg = msg.substring(0, 50) + "...";
-                }
-                System.out.println("[" + this.getName() + "] Sending message: '" + msg + "'");
-            }
-
-            producer.send(message);
-
-            if (transacted && (i % batch == 0)) {
-                System.out.println("[" + this.getName() + "] Committing " + messageCount + " messages");
-                session.commit();
-            }
-            Thread.sleep(sleepTime);
-        }
-    }
-
-    private String createMessageText(int index) {
-        StringBuffer buffer = new StringBuffer(messageSize);
-        buffer.append("Message: " + index + " sent at: " + new Date());
-        if (buffer.length() > messageSize) {
-            return buffer.substring(0, messageSize);
-        }
-        for (int i = buffer.length(); i < messageSize; i++) {
-            buffer.append(' ');
-        }
-        return buffer.toString();
-    }
-
-    public void setPersistent(boolean durable) {
-        this.persistent = durable;
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    public void setMessageSize(int messageSize) {
-        this.messageSize = messageSize;
-    }
-
-    public void setPassword(String pwd) {
-        this.password = pwd;
-    }
-
-    public void setSleepTime(long sleepTime) {
-        this.sleepTime = sleepTime;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public void setTimeToLive(long timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-    public void setParallelThreads(int parallelThreads) {
-        if (parallelThreads < 1) {
-            parallelThreads = 1;
-        }
-        this.parallelThreads = parallelThreads;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public void setQueue(boolean queue) {
-        this.topic = !queue;
-    }
-
-    public void setTransacted(boolean transacted) {
-        this.transacted = transacted;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public void setBatch(long batch) {
-        this.batch = batch;
-    }
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/RequesterTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/RequesterTool.java b/assembly/src/release/example/src/RequesterTool.java
deleted file mode 100644
index cd1a650..0000000
--- a/assembly/src/release/example/src/RequesterTool.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import java.util.Arrays;
-import java.util.Date;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * A simple tool for publishing messages
- * 
- * 
- */
-public class RequesterTool {
-
-    private int messageCount = 10;
-    private long sleepTime;
-    private boolean verbose = true;
-    private int messageSize = 255;
-    private long timeToLive;
-    private String subject = "TOOL.DEFAULT";
-    private String replySubject;
-    private boolean topic;
-    private String user = ActiveMQConnection.DEFAULT_USER;
-    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
-    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
-    private boolean transacted;
-    private boolean persistent;
-    private String clientId;
-
-    private Destination destination;
-    private Destination replyDest;
-    private MessageProducer producer;
-    private MessageConsumer consumer;
-    private Session session;
-
-    public static void main(String[] args) {
-        RequesterTool requesterTool = new RequesterTool();
-        String[] unknown = CommandLineSupport.setOptions(requesterTool, args);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        requesterTool.run();
-    }
-
-    public void run() {
-
-        Connection connection = null;
-        try {
-
-            System.out.println("Connecting to URL: " + url);
-            System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
-            System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
-            System.out.println("Sleeping between publish " + sleepTime + " ms");
-
-            // Create the connection
-            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-            connection = connectionFactory.createConnection();
-            if (persistent && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
-                connection.setClientID(clientId);
-            }
-            connection.start();
-
-            // Create the Session
-            session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-
-            // And the Destinations..
-            if (topic) {
-                destination = session.createTopic(subject);
-                if (replySubject == null || replySubject.equals("")) {
-                    replyDest = session.createTemporaryTopic();
-                } else {
-                    replyDest = session.createTopic(replySubject);
-                }
-            } else {
-                destination = session.createQueue(subject);
-                if (replySubject == null || replySubject.equals("")) {
-                    replyDest = session.createTemporaryQueue();
-                } else {
-                    replyDest = session.createQueue(replySubject);
-                }
-            }
-            System.out.println("Reply Destination: " + replyDest);
-
-            // Create the producer
-            producer = session.createProducer(destination);
-            if (persistent) {
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            } else {
-                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-            }
-            if (timeToLive != 0) {
-                System.out.println("Messages time to live " + timeToLive + " ms");
-                producer.setTimeToLive(timeToLive);
-            }
-
-            // Create the reply consumer
-            consumer = session.createConsumer(replyDest);
-
-            // Start sending reqests.
-            requestLoop();
-
-            System.out.println("Done.");
-
-            // Use the ActiveMQConnection interface to dump the connection
-            // stats.
-            ActiveMQConnection c = (ActiveMQConnection)connection;
-            c.getConnectionStats().dump(new IndentPrinter());
-
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected void requestLoop() throws Exception {
-
-        for (int i = 0; i < messageCount || messageCount == 0; i++) {
-
-            TextMessage message = session.createTextMessage(createMessageText(i));
-            message.setJMSReplyTo(replyDest);
-
-            if (verbose) {
-                String msg = message.getText();
-                if (msg.length() > 50) {
-                    msg = msg.substring(0, 50) + "...";
-                }
-                System.out.println("Sending message: " + msg);
-            }
-
-            producer.send(message);
-            if (transacted) {
-                session.commit();
-            }
-
-            System.out.println("Waiting for reponse message...");
-            Message message2 = consumer.receive();
-            if (message2 instanceof TextMessage) {
-                System.out.println("Reponse message: " + ((TextMessage)message2).getText());
-            } else {
-                System.out.println("Reponse message: " + message2);
-            }
-            if (transacted) {
-                session.commit();
-            }
-
-            Thread.sleep(sleepTime);
-
-        }
-    }
-
-    /**
-     * @param i
-     * @return
-     */
-    private String createMessageText(int index) {
-        StringBuffer buffer = new StringBuffer(messageSize);
-        buffer.append("Message: " + index + " sent at: " + new Date());
-        if (buffer.length() > messageSize) {
-            return buffer.substring(0, messageSize);
-        }
-        for (int i = buffer.length(); i < messageSize; i++) {
-            buffer.append(' ');
-        }
-        return buffer.toString();
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public void setPersistent(boolean durable) {
-        this.persistent = durable;
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    public void setMessageSize(int messageSize) {
-        this.messageSize = messageSize;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public void setSleepTime(long sleepTime) {
-        this.sleepTime = sleepTime;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public void setTimeToLive(long timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public void setQueue(boolean queue) {
-        this.topic = !queue;
-    }
-
-    public void setTransacted(boolean transacted) {
-        this.transacted = transacted;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public void setReplySubject(String replySubject) {
-        this.replySubject = replySubject;
-    }
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/StompExample.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/StompExample.java b/assembly/src/release/example/src/StompExample.java
deleted file mode 100644
index 56446c4..0000000
--- a/assembly/src/release/example/src/StompExample.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import org.apache.activemq.transport.stomp.Stomp;
-import org.apache.activemq.transport.stomp.StompConnection;
-import org.apache.activemq.transport.stomp.StompFrame;
-import org.apache.activemq.transport.stomp.Stomp.Headers.Subscribe;
-
-/**
- * 
- * This example demonstrates Stomp Java API
- * 
- * 
- *
- */
-public class StompExample {
-
-	public static void main(String args[]) throws Exception {
-		StompConnection connection = new StompConnection();
-		connection.open("localhost", 61613);
-		
-		connection.connect("system", "manager");
-		
-		connection.begin("tx1");
-		connection.send("/queue/test", "message1");
-		connection.send("/queue/test", "message2");
-		connection.commit("tx1");
-		
-		connection.subscribe("/queue/test", Subscribe.AckModeValues.CLIENT);
-		
-		connection.begin("tx2");
-		
-		StompFrame message = connection.receive();
-		System.out.println(message.getBody());
-		connection.ack(message, "tx2");
-		
-		message = connection.receive();
-		System.out.println(message.getBody());
-		connection.ack(message, "tx2");
-		
-		connection.commit("tx2");
-		
-		connection.disconnect();
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/TopicListener.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/TopicListener.java b/assembly/src/release/example/src/TopicListener.java
deleted file mode 100644
index dbecafd..0000000
--- a/assembly/src/release/example/src/TopicListener.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import java.util.Arrays;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * Use in conjunction with TopicPublisher to test the performance of ActiveMQ
- * Topics.
- */
-public class TopicListener implements MessageListener {
-
-    private Connection connection;
-    private MessageProducer producer;
-    private Session session;
-    private int count;
-    private long start;
-    private Topic topic;
-    private Topic control;
-
-    private String url = "tcp://localhost:61616";
-
-    public static void main(String[] argv) throws Exception {
-        TopicListener l = new TopicListener();
-        String[] unknown = CommandLineSupport.setOptions(l, argv);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        l.run();
-    }
-
-    public void run() throws JMSException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
-        connection = factory.createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = session.createTopic("topictest.messages");
-        control = session.createTopic("topictest.control");
-
-        MessageConsumer consumer = session.createConsumer(topic);
-        consumer.setMessageListener(this);
-
-        connection.start();
-
-        producer = session.createProducer(control);
-        System.out.println("Waiting for messages...");
-    }
-
-    private static boolean checkText(Message m, String s) {
-        try {
-            return m instanceof TextMessage && ((TextMessage)m).getText().equals(s);
-        } catch (JMSException e) {
-            e.printStackTrace(System.out);
-            return false;
-        }
-    }
-
-    public void onMessage(Message message) {
-        if (checkText(message, "SHUTDOWN")) {
-
-            try {
-                connection.close();
-            } catch (Exception e) {
-                e.printStackTrace(System.out);
-            }
-
-        } else if (checkText(message, "REPORT")) {
-            // send a report:
-            try {
-                long time = System.currentTimeMillis() - start;
-                String msg = "Received " + count + " in " + time + "ms";
-                producer.send(session.createTextMessage(msg));
-            } catch (Exception e) {
-                e.printStackTrace(System.out);
-            }
-            count = 0;
-
-        } else {
-
-            if (count == 0) {
-                start = System.currentTimeMillis();
-            }
-
-            if (++count % 1000 == 0) {
-                System.out.println("Received " + count + " messages.");
-            }
-        }
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/TopicPublisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/TopicPublisher.java b/assembly/src/release/example/src/TopicPublisher.java
deleted file mode 100644
index dd99846..0000000
--- a/assembly/src/release/example/src/TopicPublisher.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import java.util.Arrays;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * Use in conjunction with TopicListener to test the performance of ActiveMQ
- * Topics.
- */
-public class TopicPublisher implements MessageListener {
-
-    private static final char[] DATA = "abcdefghijklmnopqrstuvwxyz".toCharArray();
-
-    private final Object mutex = new Object();
-    private Connection connection;
-    private Session session;
-    private MessageProducer publisher;
-    private Topic topic;
-    private Topic control;
-
-    private String url = "tcp://localhost:61616";
-    private int size = 256;
-    private int subscribers = 1;
-    private int remaining;
-    private int messages = 10000;
-    private long delay;
-    private int batch = 2000;
-
-    private byte[] payload;
-
-    public static void main(String[] argv) throws Exception {
-        TopicPublisher p = new TopicPublisher();
-        String[] unknown = CommandLineSupport.setOptions(p, argv);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        p.run();
-    }
-
-    private void run() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
-        connection = factory.createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = session.createTopic("topictest.messages");
-        control = session.createTopic("topictest.control");
-
-        publisher = session.createProducer(topic);
-        publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-        payload = new byte[size];
-        for (int i = 0; i < size; i++) {
-            payload[i] = (byte)DATA[i % DATA.length];
-        }
-
-        session.createConsumer(control).setMessageListener(this);
-        connection.start();
-
-        long[] times = new long[batch];
-        for (int i = 0; i < batch; i++) {
-            if (i > 0) {
-                Thread.sleep(delay * 1000);
-            }
-            times[i] = batch(messages);
-            System.out.println("Batch " + (i + 1) + " of " + batch + " completed in " + times[i] + " ms.");
-        }
-
-        long min = min(times);
-        long max = max(times);
-        System.out.println("min: " + min + ", max: " + max + " avg: " + avg(times, min, max));
-
-        // request shutdown
-        publisher.send(session.createTextMessage("SHUTDOWN"));
-
-        connection.stop();
-        connection.close();
-    }
-
-    private long batch(int msgCount) throws Exception {
-        long start = System.currentTimeMillis();
-        remaining = subscribers;
-        publish();
-        waitForCompletion();
-        return System.currentTimeMillis() - start;
-    }
-
-    private void publish() throws Exception {
-
-        // send events
-        BytesMessage msg = session.createBytesMessage();
-        msg.writeBytes(payload);
-        for (int i = 0; i < messages; i++) {
-            publisher.send(msg);
-            if ((i + 1) % 1000 == 0) {
-                System.out.println("Sent " + (i + 1) + " messages");
-            }
-        }
-
-        // request report
-        publisher.send(session.createTextMessage("REPORT"));
-    }
-
-    private void waitForCompletion() throws Exception {
-        System.out.println("Waiting for completion...");
-        synchronized (mutex) {
-            while (remaining > 0) {
-                mutex.wait();
-            }
-        }
-    }
-
-    public void onMessage(Message message) {
-        synchronized (mutex) {
-            System.out.println("Received report " + getReport(message) + " " + --remaining + " remaining");
-            if (remaining == 0) {
-                mutex.notify();
-            }
-        }
-    }
-
-    Object getReport(Message m) {
-        try {
-            return ((TextMessage)m).getText();
-        } catch (JMSException e) {
-            e.printStackTrace(System.out);
-            return e.toString();
-        }
-    }
-
-    static long min(long[] times) {
-        long min = times.length > 0 ? times[0] : 0;
-        for (int i = 0; i < times.length; i++) {
-            min = Math.min(min, times[i]);
-        }
-        return min;
-    }
-
-    static long max(long[] times) {
-        long max = times.length > 0 ? times[0] : 0;
-        for (int i = 0; i < times.length; i++) {
-            max = Math.max(max, times[i]);
-        }
-        return max;
-    }
-
-    static long avg(long[] times, long min, long max) {
-        long sum = 0;
-        for (int i = 0; i < times.length; i++) {
-            sum += times[i];
-        }
-        sum -= min;
-        sum -= max;
-        return sum / times.length - 2;
-    }
-
-    public void setBatch(int batch) {
-        this.batch = batch;
-    }
-
-    public void setDelay(long delay) {
-        this.delay = delay;
-    }
-
-    public void setMessages(int messages) {
-        this.messages = messages;
-    }
-
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-    public void setSubscribers(int subscribers) {
-        this.subscribers = subscribers;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/jndi.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/jndi.properties b/assembly/src/release/example/src/jndi.properties
deleted file mode 100644
index 19dad58..0000000
--- a/assembly/src/release/example/src/jndi.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-## 
-## http://www.apache.org/licenses/LICENSE-2.0
-## 
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-topic.logTopic=logTopic
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/log4j-jms.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/log4j-jms.properties b/assembly/src/release/example/src/log4j-jms.properties
deleted file mode 100644
index e28d6d6..0000000
--- a/assembly/src/release/example/src/log4j-jms.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-## 
-## http://www.apache.org/licenses/LICENSE-2.0
-## 
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-log4j.rootLogger=INFO, stdout, jms
-
-## Be sure that ActiveMQ messages are not logged to 'jms' appender
-log4j.logger.org.apache.activemq=INFO, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c - %m%n
-
-## Configure 'jms' appender. You'll also need jndi.properties file in order to make it work
-log4j.appender.jms=org.apache.log4j.net.JMSAppender
-log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-log4j.appender.jms.ProviderURL=tcp://localhost:61616
-log4j.appender.jms.TopicBindingName=logTopic
-log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/transactions/README.txt
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/transactions/README.txt b/assembly/src/release/example/transactions/README.txt
deleted file mode 100644
index 2c3238a..0000000
--- a/assembly/src/release/example/transactions/README.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-Transactions Demo
-=================
-This example is an ActiveMQ implementation of the "TransactedExample" from
-Sun's JMS Tutorial (http://java.sun.com/products/jms/tutorial/index.html).
-
-The example simulates a simplified eCommerce application with four parts:
-the retailer who places the orders, the vendor who assemples the computers,
-and two suppliers--one for hard drives and another for monitors.
-
-The retailer sends a message to the vendor's queue and awaits a reply.
-The vendor receives the message and sends a message to each of the
-supplier's queues. It does this in a single transaction, and will randomly
-throw an exception simulating a database error, triggering a rollback.
-Each supplier receives the order, checks inventory and replies to the
-message stating how many items were sent.
-The vendor collects both responses and responds to the retailer, notifying
-wheather it cna fulfill the complete order or not.
-The retailer receives the message from the vendor.
-
-Running the Example
-===================
-To run the complete demo in a single JVM, with ActiveMQ running on the local
-computer:
-  ant transactions_demo
-
-If you are running ActiveMQ on a non-standard port, or on a different host,
-you can pass a url on the commandline:
-  ant -Durl=tcp://localhost:61616 transactions_demo
-
-If your ActiveMQ instance is password-protected, you can also pass a
-username and password on the command line:
-  ant -Duser=myusername -Dpassword=supersecret transactions_demo
-
-You can also run the individual components seperately, again with optional
-url and/or authentication parameters:
-  ant retailer &
-  ant vendor &
-  ant hdsupplier &
-  ant monitorsupplier &
-

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/transactions/build.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/transactions/build.xml b/assembly/src/release/example/transactions/build.xml
deleted file mode 100644
index 839cde2..0000000
--- a/assembly/src/release/example/transactions/build.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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 name="transactions" default="help" basedir=".">
-
-    <property name="class.dir" value="target/classes" />
-    <property name="activemq.home" value="../.." />
-
-    <!-- example program defaults -->
-    <property name="url" value="tcp://localhost:61616" />
-    <target name="help">
-        <echo>
-      For the full demo:
-         ant transactions_demo -Durl=tcp://hostname:1234
-      For the indicual components:
-         ant retailer -Durl=tcp://hostname:1234
-         ant vendor -Durl=tcp://hostname:1234
-         ant hdsupplier -Durl=tcp://hostname:1234
-         ant monitorsupplier -Durl=tcp://hostname:1234
-        </echo>
-    </target>
-
-    <target name="clean">
-        <delete dir="target" quiet="true" />
-        <delete dir="${class.dir}" quiet="true" />
-    </target>
-
-    <target name="init">
-        <mkdir dir="${class.dir}" />
-
-        <path id="javac.classpath">
-            <pathelement path="${class.dir}" />
-            <pathelement path="../conf" />
-            <fileset dir="${activemq.home}/lib">
-                <include name="**/*.jar" />
-            </fileset>
-        </path>
-    </target>
-
-    <target name="compile" depends="init" description="Compile all Java">
-        <javac srcdir="src" destdir="${class.dir}" debug="true">
-            <classpath refid="javac.classpath" />
-        </javac>
-    </target>
-
-    <target name="transactions_demo" depends="compile" description="Runs the full demo">
-        <java classname="TransactionsDemo" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-
-    <target name="retailer" depends="compile" description="Runs the retailer">
-        <java classname="Retailer" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-    <target name="vendor" depends="compile" description="Runs the vendor">
-        <java classname="Vendor" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-    <target name="hdsupplier" depends="compile" description="Runs the Hard Drive Supplier">
-        <java classname="Supplier" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="HardDrive" />
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-    <target name="monitorsupplier" depends="compile" description="Runs the Monitor Supplier">
-        <java classname="Supplier" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="Monitor" />
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-</project>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/transactions/src/Retailer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/transactions/src/Retailer.java b/assembly/src/release/example/transactions/src/Retailer.java
deleted file mode 100644
index 01ecfef..0000000
--- a/assembly/src/release/example/transactions/src/Retailer.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-import org.apache.activemq.ActiveMQConnectionFactory;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-/**
- * The Retailer orders computers from the Vendor by sending a message via
- * the VendorOrderQueue. It then syncronously receives the reponse message
- * and reports if the order was successful or not.
- */
-public class Retailer implements Runnable {
-	private String url;
-	private String user;
-	private String password;
-	
-	public Retailer(String url, String user, String password) {
-		this.url = url;
-		this.user = user;
-		this.password = password;
-	}
-	
-	public void run() {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-		try {
-			Connection connection = connectionFactory.createConnection();
-			
-			// The Retailer's session is non-trasacted.
-			Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-			Destination vendorOrderQueue = session.createQueue("VendorOrderQueue");
-			TemporaryQueue retailerConfirmQueue = session.createTemporaryQueue();
-			
-			MessageProducer producer = session.createProducer(vendorOrderQueue);
-			MessageConsumer replyConsumer = session.createConsumer(retailerConfirmQueue);
-
-			connection.start();
-
-			for (int i = 0; i < 5; i++) {
-				MapMessage message = session.createMapMessage();
-				message.setString("Item", "Computer(s)");
-				int quantity = (int)(Math.random() * 4) + 1;
-				message.setInt("Quantity", quantity);
-				message.setJMSReplyTo(retailerConfirmQueue);
-				producer.send(message);
-				System.out.println("Retailer: Ordered " + quantity + " computers.");
-				
-				MapMessage reply = (MapMessage) replyConsumer.receive();
-				if (reply.getBoolean("OrderAccepted")) {
-					System.out.println("Retailer: Order Filled");
-				} else {
-					System.out.println("Retailer: Order Not Filled");
-				}
-			}
-			
-			// Send a non-MapMessage to signal the end
-			producer.send(session.createMessage());
-			
-			replyConsumer.close();
-			connection.close();
-			
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		
-		if (args.length >= 1) {
-			url = args[0];
-		}
-		
-		if (args.length >= 2) {
-			user = args[1];
-		}
-
-		if (args.length >= 3) {
-			password = args[2];
-		}
-		
-		Retailer r = new Retailer(url, user, password);
-		
-		new Thread(r, "Retailer").start();
-	}
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/transactions/src/Supplier.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/transactions/src/Supplier.java b/assembly/src/release/example/transactions/src/Supplier.java
deleted file mode 100644
index ed02cc2..0000000
--- a/assembly/src/release/example/transactions/src/Supplier.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-import java.util.Random;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * The Supplier synchronously receives the order from the Vendor and
- * randomly responds with either the number ordered, or some lower
- * quantity. 
- */
-public class Supplier implements Runnable {
-	private String url;
-	private String user;
-	private String password;
-	private final String ITEM;
-	private final String QUEUE;
-	
-	public Supplier(String item, String queue, String url, String user, String password) {
-		this.url = url;
-		this.user = user;
-		this.password = password;
-		this.ITEM = item;
-		this.QUEUE = queue;
-	}
-	
-	public void run() {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-		Session session = null;
-		Destination orderQueue;
-		try {
-			Connection connection = connectionFactory.createConnection();
-
-			session = connection.createSession(true, Session.SESSION_TRANSACTED);
-			orderQueue = session.createQueue(QUEUE);
-			MessageConsumer consumer = session.createConsumer(orderQueue);
-			
-			connection.start();
-			
-			while (true) {
-				Message message = consumer.receive();
-				MessageProducer producer = session.createProducer(message.getJMSReplyTo());
-				MapMessage orderMessage;
-				if (message instanceof MapMessage) {
-					orderMessage = (MapMessage) message;
-				} else {
-					// End of Stream
-					producer.send(session.createMessage());
-					session.commit();
-					producer.close();
-					break;
-				}
-				
-				int quantity = orderMessage.getInt("Quantity");
-				System.out.println(ITEM + " Supplier: Vendor ordered " + quantity + " " + orderMessage.getString("Item"));
-				
-				MapMessage outMessage = session.createMapMessage();
-				outMessage.setInt("VendorOrderNumber", orderMessage.getInt("VendorOrderNumber"));
-				outMessage.setString("Item", ITEM);
-				
-				quantity = Math.min(
-						orderMessage.getInt("Quantity"),
-						new Random().nextInt(orderMessage.getInt("Quantity") * 10));
-				outMessage.setInt("Quantity", quantity);
-				
-				producer.send(outMessage);
-				System.out.println(ITEM + " Supplier: Sent " + quantity + " " + ITEM + "(s)");
-				session.commit();
-				System.out.println(ITEM + " Supplier: committed transaction");
-				producer.close();
-			}
-			connection.close();
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		String item = "HardDrive";
-		
-		if (args.length >= 1) {
-			item = args[0];
-		}
-		String queue;
-		if ("HardDrive".equals(item)) {
-			queue = "StorageOrderQueue";
-		} else if ("Monitor".equals(item)) {
-			queue = "MonitorOrderQueue";
-		} else {
-			throw new IllegalArgumentException("Item must be either HardDrive or Monitor");
-		}
-		
-		if (args.length >= 2) {
-			url = args[1];
-		}
-		
-		if (args.length >= 3) {
-			user = args[2];
-		}
-
-		if (args.length >= 4) {
-			password = args[3];
-		}
-		
-		Supplier s = new Supplier(item, queue, url, user, password);
-		
-		new Thread(s, "Supplier " + item).start();
-	}
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/transactions/src/TransactionsDemo.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/transactions/src/TransactionsDemo.java b/assembly/src/release/example/transactions/src/TransactionsDemo.java
deleted file mode 100644
index 4dc1171..0000000
--- a/assembly/src/release/example/transactions/src/TransactionsDemo.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-public class TransactionsDemo {
-
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		
-		if (args.length >= 1) {
-			url = args[0];
-		}
-		
-		if (args.length >= 2) {
-			user = args[1];
-		}
-
-		if (args.length >= 3) {
-			password = args[2];
-		}
-		
-		Retailer r = new Retailer(url, user, password);
-		Vendor v = new Vendor(url, user, password);
-		Supplier s1 = new Supplier("HardDrive", "StorageOrderQueue", url, user, password);
-		Supplier s2 = new Supplier("Monitor", "MonitorOrderQueue", url, user, password);
-		
-		new Thread(r, "Retailer").start();
-		new Thread(v, "Vendor").start();
-		new Thread(s1, "Supplier 1").start();
-		new Thread(s2, "Supplier 2").start();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/transactions/src/Vendor.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/transactions/src/Vendor.java b/assembly/src/release/example/transactions/src/Vendor.java
deleted file mode 100644
index 0f2ce93..0000000
--- a/assembly/src/release/example/transactions/src/Vendor.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * The Vendor synchronously, and in a single transaction, receives the
- * order from VendorOrderQueue and sends messages to the two Suppliers via
- * MonitorOrderQueue and StorageOrderQueue.
- * The responses are received asynchronously; when both responses come
- * back, the order confirmation message is sent back to the Retailer.
- */
-public class Vendor implements Runnable, MessageListener {
-	private String url;
-	private String user;
-	private String password;
-	private	Session asyncSession;
-	private int numSuppliers = 2;
-	private Object supplierLock = new Object();
-	
-	public Vendor(String url, String user, String password) {
-		this.url = url;
-		this.user = user;
-		this.password = password;
-	}
-	
-	public void run() {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-		Session session = null;
-		Destination orderQueue;
-		Destination monitorOrderQueue;
-		Destination storageOrderQueue;
-		TemporaryQueue vendorConfirmQueue;
-		MessageConsumer orderConsumer = null;
-		MessageProducer monitorProducer = null;
-		MessageProducer storageProducer = null;
-
-		try {
-			Connection connection = connectionFactory.createConnection();
-
-			session = connection.createSession(true, Session.SESSION_TRANSACTED);
-			orderQueue = session.createQueue("VendorOrderQueue");
-			monitorOrderQueue = session.createQueue("MonitorOrderQueue");
-			storageOrderQueue = session.createQueue("StorageOrderQueue");
-			
-			orderConsumer = session.createConsumer(orderQueue);
-			monitorProducer = session.createProducer(monitorOrderQueue);
-			storageProducer = session.createProducer(storageOrderQueue);
-			
-			Connection asyncconnection = connectionFactory.createConnection();
-			asyncSession = asyncconnection.createSession(true, Session.SESSION_TRANSACTED);
-			
-			vendorConfirmQueue = asyncSession.createTemporaryQueue();
-			MessageConsumer confirmConsumer = asyncSession.createConsumer(vendorConfirmQueue);
-			confirmConsumer.setMessageListener(this);
-			
-			asyncconnection.start();
-
-			connection.start();
-
-		
-			while (true) {
-				Order order = null;
-				try {
-					Message inMessage = orderConsumer.receive();
-					MapMessage message;
-					if (inMessage instanceof MapMessage) {
-						message = (MapMessage) inMessage;
-						
-					} else {
-						// end of stream
-						Message outMessage = session.createMessage();
-						outMessage.setJMSReplyTo(vendorConfirmQueue);
-						monitorProducer.send(outMessage);
-						storageProducer.send(outMessage);
-						session.commit();
-						break;
-					}
-					
-					// Randomly throw an exception in here to simulate a Database error
-					// and trigger a rollback of the transaction
-					if (new Random().nextInt(3) == 0) {
-						throw new JMSException("Simulated Database Error.");
-					}
-					
-					order = new Order(message);
-					
-					MapMessage orderMessage = session.createMapMessage();
-					orderMessage.setJMSReplyTo(vendorConfirmQueue);
-					orderMessage.setInt("VendorOrderNumber", order.getOrderNumber());
-					int quantity = message.getInt("Quantity");
-					System.out.println("Vendor: Retailer ordered " + quantity + " " + message.getString("Item"));
-					
-					orderMessage.setInt("Quantity", quantity);
-					orderMessage.setString("Item", "Monitor");
-					monitorProducer.send(orderMessage);
-					System.out.println("Vendor: ordered " + quantity + " Monitor(s)");
-					
-					orderMessage.setString("Item", "HardDrive");
-					storageProducer.send(orderMessage);
-					System.out.println("Vendor: ordered " + quantity + " Hard Drive(s)");
-					
-					session.commit();
-					System.out.println("Vendor: Comitted Transaction 1");
-					
-				} catch (JMSException e) {
-					System.out.println("Vendor: JMSException Occured: " + e.getMessage());
-					e.printStackTrace();
-					session.rollback();
-					System.out.println("Vendor: Rolled Back Transaction.");
-				}
-			}
-			
-			synchronized (supplierLock) {
-				while (numSuppliers > 0) {
-					try {
-						supplierLock.wait();
-					} catch (InterruptedException e) {
-						e.printStackTrace();
-					}
-				}
-			}
-			
-			connection.close();
-			asyncconnection.close();
-		
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-
-	}
-
-	public void onMessage(Message message) {
-		if (!(message instanceof MapMessage)) {
-			synchronized(supplierLock) {
-				numSuppliers--;
-				supplierLock.notifyAll();
-			}
-			try {
-				asyncSession.commit();
-				return;
-			} catch (JMSException e) {
-				e.printStackTrace();
-			}
-		}
-		
-		int orderNumber = -1;
-		try {
-			MapMessage componentMessage = (MapMessage) message;
-			
-			orderNumber = componentMessage.getInt("VendorOrderNumber");
-			Order order = Order.getOrder(orderNumber);
-			order.processSubOrder(componentMessage);
-			asyncSession.commit();
-			
-			if (! "Pending".equals(order.getStatus())) {
-				System.out.println("Vendor: Completed processing for order " + orderNumber);
-				
-				MessageProducer replyProducer = asyncSession.createProducer(order.getMessage().getJMSReplyTo());
-				MapMessage replyMessage = asyncSession.createMapMessage();
-				if ("Fulfilled".equals(order.getStatus())) {
-					replyMessage.setBoolean("OrderAccepted", true);
-					System.out.println("Vendor: sent " + order.quantity + " computer(s)");
-				} else {
-					replyMessage.setBoolean("OrderAccepted", false);
-					System.out.println("Vendor: unable to send " + order.quantity + " computer(s)");
-				}
-				replyProducer.send(replyMessage);
-				asyncSession.commit();
-				System.out.println("Vender: committed transaction 2");
-			}
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-	}
-
-	public static class Order {
-		private static Map<Integer, Order> pendingOrders = new HashMap<Integer, Order>();
-		private static int nextOrderNumber = 1;
-
-		private int orderNumber;
-		private int quantity;
-		private MapMessage monitor = null;
-		private MapMessage storage = null;
-		private MapMessage message;
-		private String status;
-		
-		public Order(MapMessage message) {
-			this.orderNumber = nextOrderNumber++;
-			this.message = message;
-			try {
-				this.quantity = message.getInt("Quantity");
-			} catch (JMSException e) {
-				e.printStackTrace();
-				this.quantity = 0;
-			}
-			status = "Pending";
-			pendingOrders.put(orderNumber, this);
-		}
-		
-		public Object getStatus() {
-			return status;
-		}
-		
-		public int getOrderNumber() {
-			return orderNumber;
-		}
-		
-		public static int getOutstandingOrders() {
-			return pendingOrders.size();
-		}
-		
-		public static Order getOrder(int number) {
-			return pendingOrders.get(number);
-		}
-		
-		public MapMessage getMessage() {
-			return message;
-		}
-		
-		public void processSubOrder(MapMessage message) {
-			String itemName = null;
-			try {
-				itemName = message.getString("Item");
-			} catch (JMSException e) {
-				e.printStackTrace();
-			}
-			
-			if ("Monitor".equals(itemName)) {
-				monitor = message;
-			} else if ("HardDrive".equals(itemName)) {
-				storage = message;
-			}
-			
-			if (null != monitor && null != storage) {
-				// Received both messages
-				try {
-					if (quantity > monitor.getInt("Quantity")) {
-						status = "Cancelled";
-					} else if (quantity > storage.getInt("Quantity")) {
-						status = "Cancelled";
-					} else {
-						status = "Fulfilled";
-					}
-				} catch (JMSException e) {
-					e.printStackTrace();
-					status = "Cancelled";
-				}
-			}
-		}		
-	}
-
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		
-		if (args.length >= 1) {
-			url = args[0];
-		}
-		
-		if (args.length >= 2) {
-			user = args[1];
-		}
-
-		if (args.length >= 3) {
-			password = args[2];
-		}
-		
-		Vendor v = new Vendor(url, user, password);
-		
-		new Thread(v, "Vendor").start();
-	}	
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/amqp/java/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/amqp/java/pom.xml b/assembly/src/release/examples/amqp/java/pom.xml
new file mode 100644
index 0000000..dd1db26
--- /dev/null
+++ b/assembly/src/release/examples/amqp/java/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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>
+  
+  <groupId>example</groupId>
+  <artifactId>amqp-example</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  
+  <name>example</name>
+  <description>ActiveMQ AMQP Java Examples</description>
+
+  <repositories>
+    <repository>
+      <id>Fusesource Snapshots</id>
+      <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
+    </repository>
+  </repositories>
+  
+  <dependencies>
+    
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jms_1.1_spec</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.qpid</groupId>
+      <artifactId>qpid-amqp-1-0-client-jms</artifactId>
+      <version>${qpid-jms-version}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+
+      <!-- include all the dependencies into the jar so it's easier to execute the example -->
+      <plugin>
+        <groupId>org.fusesource.mvnplugins</groupId>
+        <artifactId>maven-uberize-plugin</artifactId>
+        <version>1.14</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals><goal>uberize</goal></goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+    </plugins>
+  </build>
+  
+</project>
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/amqp/java/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/amqp/java/readme.md b/assembly/src/release/examples/amqp/java/readme.md
new file mode 100644
index 0000000..6e68a4b
--- /dev/null
+++ b/assembly/src/release/examples/amqp/java/readme.md
@@ -0,0 +1,32 @@
+## Overview
+
+This is an example of how use the Java JMS api with ActiveMQ via the AMQP protocol.
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    java -cp target/amqp-example-0.1-SNAPSHOT.jar example.Listener
+
+In another terminal window run:
+
+    java -cp target/amqp-example-0.1-SNAPSHOT.jar example.Publisher
+
+You can control to which AMQP server the examples try to connect to by
+setting the following environment variables: 
+
+* `ACTIVEMQ_HOST`
+* `ACTIVEMQ_PORT`
+* `ACTIVEMQ_USER`
+* `ACTIVEMQ_PASSWORD`

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java b/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java
new file mode 100644
index 0000000..bd8d198
--- /dev/null
+++ b/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java
@@ -0,0 +1,90 @@
+/**
+ * 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 example;
+
+import org.apache.qpid.amqp_1_0.jms.impl.*;
+import javax.jms.*;
+
+class Listener {
+
+    public static void main(String []args) throws JMSException {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "5672"));
+        String destination = arg(args, 0, "topic://event");
+
+        ConnectionFactoryImpl factory = new ConnectionFactoryImpl(host, port, user, password);
+        Destination dest = null;
+        if( destination.startsWith("topic://") ) {
+            dest = new TopicImpl(destination);
+        } else {
+            dest = new QueueImpl(destination);
+        }
+
+        Connection connection = factory.createConnection(user, password);
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        MessageConsumer consumer = session.createConsumer(dest);
+        long start = System.currentTimeMillis();
+        long count = 1;
+        System.out.println("Waiting for messages...");
+        while(true) {
+            Message msg = consumer.receive();
+            if( msg instanceof  TextMessage ) {
+                String body = ((TextMessage) msg).getText();
+                if( "SHUTDOWN".equals(body)) {
+                    long diff = System.currentTimeMillis() - start;
+                    System.out.println(String.format("Received %d in %.2f seconds", count, (1.0*diff/1000.0)));
+                    connection.close();
+                    System.exit(1);
+                } else {
+                    try {
+                        if( count != msg.getIntProperty("id") ) {
+                            System.out.println("mismatch: "+count+"!="+msg.getIntProperty("id"));
+                        }
+                    } catch (NumberFormatException ignore) {
+                    }
+                    if( count == 1 ) {
+                        start = System.currentTimeMillis();
+                    } else if( count % 1000 == 0 ) {
+                        System.out.println(String.format("Received %d messages.", count));
+                    }
+                    count ++;
+                }
+
+            } else {
+                System.out.println("Unexpected message type: "+msg.getClass());
+            }
+        }
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java b/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java
new file mode 100644
index 0000000..70c46bd
--- /dev/null
+++ b/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java
@@ -0,0 +1,84 @@
+/**
+ * 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 example;
+
+import org.apache.qpid.amqp_1_0.jms.impl.*;
+import javax.jms.*;
+
+class Publisher {
+
+    public static void main(String []args) throws Exception {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "5672"));
+        String destination = arg(args, 0, "topic://event");
+
+        int messages = 10000;
+        int size = 256;
+
+        String DATA = "abcdefghijklmnopqrstuvwxyz";
+        String body = "";
+        for( int i=0; i < size; i ++) {
+            body += DATA.charAt(i%DATA.length());
+        }
+
+        ConnectionFactoryImpl factory = new ConnectionFactoryImpl(host, port, user, password);
+        Destination dest = null;
+        if( destination.startsWith("topic://") ) {
+            dest = new TopicImpl(destination);
+        } else {
+            dest = new QueueImpl(destination);
+        }
+
+        Connection connection = factory.createConnection(user, password);
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        MessageProducer producer = session.createProducer(dest);
+        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+        for( int i=1; i <= messages; i ++) {
+            TextMessage msg = session.createTextMessage("#:"+i);
+            msg.setIntProperty("id", i);
+            producer.send(msg);
+            if( (i % 1000) == 0) {
+                System.out.println(String.format("Sent %d messages", i));
+            }
+        }
+
+        producer.send(session.createTextMessage("SHUTDOWN"));
+        Thread.sleep(1000*3);
+        connection.close();
+        System.exit(0);
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/amqp/python/listener.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/amqp/python/listener.py b/assembly/src/release/examples/amqp/python/listener.py
new file mode 100755
index 0000000..dd647f3
--- /dev/null
+++ b/assembly/src/release/examples/amqp/python/listener.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+"""
+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.
+"""
+import os
+import sys
+import time
+
+from proton import *
+
+user = os.getenv('ACTIVEMQ_USER') or 'admin'
+password = os.getenv('ACTIVEMQ_PASSWORD') or 'password'
+host = os.getenv('ACTIVEMQ_HOST') or '127.0.0.1'
+port = int(os.getenv('ACTIVEMQ_PORT') or 5672)
+destination = sys.argv[1:2] or ['topic://event']
+destination = destination[0]
+
+msg = Message()
+mng = Messenger()
+mng.password=password
+mng.start()
+mng.subscribe("amqp://%s@%s:%d/%s"%(user, host, port, destination))
+
+count = 0
+start = time.time()
+while True:
+  mng.recv(10)
+  while mng.incoming:
+    mng.get(msg)
+    if msg.body=="SHUTDOWN":
+      diff = time.time() - start
+      print 'Received %d frames in %f seconds' % (count, diff)
+      exit(0)
+    else:
+      if count==0:
+        start = time.time()
+      count+=1
+      if count % 1000 == 0:
+        print 'Received %d messages.' % (count)
+
+mng.stop()

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/amqp/python/publisher.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/amqp/python/publisher.py b/assembly/src/release/examples/amqp/python/publisher.py
new file mode 100755
index 0000000..23372ea
--- /dev/null
+++ b/assembly/src/release/examples/amqp/python/publisher.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+"""
+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.
+"""
+import os
+import sys
+import time
+
+from proton import *
+
+user = os.getenv('ACTIVEMQ_USER') or 'admin'
+password = os.getenv('ACTIVEMQ_PASSWORD') or 'password'
+host = os.getenv('ACTIVEMQ_HOST') or '127.0.0.1'
+port = int(os.getenv('ACTIVEMQ_PORT') or 5672)
+destination = sys.argv[1:2] or ['topic://event']
+destination = destination[0]
+address = "amqp://%s@%s:%d/%s"%(user, host, port, destination)
+
+msg = Message()
+mng = Messenger()
+mng.password=password
+mng.start()
+
+messages = 10000
+
+msg.address = address
+msg.body = unicode('Hello World from Python')
+
+count = 0
+start = time.time()
+for _ in xrange(messages):
+  mng.put(msg)
+  count += 1
+  if count % 1000 == 0 :
+    print("Sent %d messages"%(count))
+
+msg.body = unicode("SHUTDOWN")
+mng.put(msg)
+mng.send
+
+diff = time.time() - start
+print 'Sent %s frames in %f seconds' % (count, diff)
+
+mng.stop()


[06/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/StompExample.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/StompExample.java b/assembly/src/release/examples/openwire/swissarmy/src/StompExample.java
new file mode 100644
index 0000000..0f18210
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/StompExample.java
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+import org.apache.activemq.transport.stomp.Stomp;
+import org.apache.activemq.transport.stomp.StompConnection;
+import org.apache.activemq.transport.stomp.StompFrame;
+import org.apache.activemq.transport.stomp.Stomp.Headers.Subscribe;
+
+/**
+ * 
+ * This example demonstrates Stomp Java API
+ * 
+ * 
+ *
+ */
+public class StompExample {
+
+	public static void main(String args[]) throws Exception {
+		StompConnection connection = new StompConnection();
+		connection.open("localhost", 61616);
+		
+		connection.connect("system", "manager");
+		
+		connection.begin("tx1");
+		connection.send("/queue/test", "message1");
+		connection.send("/queue/test", "message2");
+		connection.commit("tx1");
+		
+		connection.subscribe("/queue/test", Subscribe.AckModeValues.CLIENT);
+		
+		connection.begin("tx2");
+		
+		StompFrame message = connection.receive();
+		System.out.println(message.getBody());
+		connection.ack(message, "tx2");
+		
+		message = connection.receive();
+		System.out.println(message.getBody());
+		connection.ack(message, "tx2");
+		
+		connection.commit("tx2");
+		
+		connection.disconnect();
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/TopicListener.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/TopicListener.java b/assembly/src/release/examples/openwire/swissarmy/src/TopicListener.java
new file mode 100644
index 0000000..dbecafd
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/TopicListener.java
@@ -0,0 +1,118 @@
+/**
+ * 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.
+ */
+import java.util.Arrays;
+
+import javax.jms.Connection;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+/**
+ * Use in conjunction with TopicPublisher to test the performance of ActiveMQ
+ * Topics.
+ */
+public class TopicListener implements MessageListener {
+
+    private Connection connection;
+    private MessageProducer producer;
+    private Session session;
+    private int count;
+    private long start;
+    private Topic topic;
+    private Topic control;
+
+    private String url = "tcp://localhost:61616";
+
+    public static void main(String[] argv) throws Exception {
+        TopicListener l = new TopicListener();
+        String[] unknown = CommandLineSupport.setOptions(l, argv);
+        if (unknown.length > 0) {
+            System.out.println("Unknown options: " + Arrays.toString(unknown));
+            System.exit(-1);
+        }
+        l.run();
+    }
+
+    public void run() throws JMSException {
+        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
+        connection = factory.createConnection();
+        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        topic = session.createTopic("topictest.messages");
+        control = session.createTopic("topictest.control");
+
+        MessageConsumer consumer = session.createConsumer(topic);
+        consumer.setMessageListener(this);
+
+        connection.start();
+
+        producer = session.createProducer(control);
+        System.out.println("Waiting for messages...");
+    }
+
+    private static boolean checkText(Message m, String s) {
+        try {
+            return m instanceof TextMessage && ((TextMessage)m).getText().equals(s);
+        } catch (JMSException e) {
+            e.printStackTrace(System.out);
+            return false;
+        }
+    }
+
+    public void onMessage(Message message) {
+        if (checkText(message, "SHUTDOWN")) {
+
+            try {
+                connection.close();
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+            }
+
+        } else if (checkText(message, "REPORT")) {
+            // send a report:
+            try {
+                long time = System.currentTimeMillis() - start;
+                String msg = "Received " + count + " in " + time + "ms";
+                producer.send(session.createTextMessage(msg));
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+            }
+            count = 0;
+
+        } else {
+
+            if (count == 0) {
+                start = System.currentTimeMillis();
+            }
+
+            if (++count % 1000 == 0) {
+                System.out.println("Received " + count + " messages.");
+            }
+        }
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/TopicPublisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/TopicPublisher.java b/assembly/src/release/examples/openwire/swissarmy/src/TopicPublisher.java
new file mode 100644
index 0000000..dd99846
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/TopicPublisher.java
@@ -0,0 +1,205 @@
+/**
+ * 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.
+ */
+import java.util.Arrays;
+
+import javax.jms.BytesMessage;
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+/**
+ * Use in conjunction with TopicListener to test the performance of ActiveMQ
+ * Topics.
+ */
+public class TopicPublisher implements MessageListener {
+
+    private static final char[] DATA = "abcdefghijklmnopqrstuvwxyz".toCharArray();
+
+    private final Object mutex = new Object();
+    private Connection connection;
+    private Session session;
+    private MessageProducer publisher;
+    private Topic topic;
+    private Topic control;
+
+    private String url = "tcp://localhost:61616";
+    private int size = 256;
+    private int subscribers = 1;
+    private int remaining;
+    private int messages = 10000;
+    private long delay;
+    private int batch = 2000;
+
+    private byte[] payload;
+
+    public static void main(String[] argv) throws Exception {
+        TopicPublisher p = new TopicPublisher();
+        String[] unknown = CommandLineSupport.setOptions(p, argv);
+        if (unknown.length > 0) {
+            System.out.println("Unknown options: " + Arrays.toString(unknown));
+            System.exit(-1);
+        }
+        p.run();
+    }
+
+    private void run() throws Exception {
+        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
+        connection = factory.createConnection();
+        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        topic = session.createTopic("topictest.messages");
+        control = session.createTopic("topictest.control");
+
+        publisher = session.createProducer(topic);
+        publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+        payload = new byte[size];
+        for (int i = 0; i < size; i++) {
+            payload[i] = (byte)DATA[i % DATA.length];
+        }
+
+        session.createConsumer(control).setMessageListener(this);
+        connection.start();
+
+        long[] times = new long[batch];
+        for (int i = 0; i < batch; i++) {
+            if (i > 0) {
+                Thread.sleep(delay * 1000);
+            }
+            times[i] = batch(messages);
+            System.out.println("Batch " + (i + 1) + " of " + batch + " completed in " + times[i] + " ms.");
+        }
+
+        long min = min(times);
+        long max = max(times);
+        System.out.println("min: " + min + ", max: " + max + " avg: " + avg(times, min, max));
+
+        // request shutdown
+        publisher.send(session.createTextMessage("SHUTDOWN"));
+
+        connection.stop();
+        connection.close();
+    }
+
+    private long batch(int msgCount) throws Exception {
+        long start = System.currentTimeMillis();
+        remaining = subscribers;
+        publish();
+        waitForCompletion();
+        return System.currentTimeMillis() - start;
+    }
+
+    private void publish() throws Exception {
+
+        // send events
+        BytesMessage msg = session.createBytesMessage();
+        msg.writeBytes(payload);
+        for (int i = 0; i < messages; i++) {
+            publisher.send(msg);
+            if ((i + 1) % 1000 == 0) {
+                System.out.println("Sent " + (i + 1) + " messages");
+            }
+        }
+
+        // request report
+        publisher.send(session.createTextMessage("REPORT"));
+    }
+
+    private void waitForCompletion() throws Exception {
+        System.out.println("Waiting for completion...");
+        synchronized (mutex) {
+            while (remaining > 0) {
+                mutex.wait();
+            }
+        }
+    }
+
+    public void onMessage(Message message) {
+        synchronized (mutex) {
+            System.out.println("Received report " + getReport(message) + " " + --remaining + " remaining");
+            if (remaining == 0) {
+                mutex.notify();
+            }
+        }
+    }
+
+    Object getReport(Message m) {
+        try {
+            return ((TextMessage)m).getText();
+        } catch (JMSException e) {
+            e.printStackTrace(System.out);
+            return e.toString();
+        }
+    }
+
+    static long min(long[] times) {
+        long min = times.length > 0 ? times[0] : 0;
+        for (int i = 0; i < times.length; i++) {
+            min = Math.min(min, times[i]);
+        }
+        return min;
+    }
+
+    static long max(long[] times) {
+        long max = times.length > 0 ? times[0] : 0;
+        for (int i = 0; i < times.length; i++) {
+            max = Math.max(max, times[i]);
+        }
+        return max;
+    }
+
+    static long avg(long[] times, long min, long max) {
+        long sum = 0;
+        for (int i = 0; i < times.length; i++) {
+            sum += times[i];
+        }
+        sum -= min;
+        sum -= max;
+        return sum / times.length - 2;
+    }
+
+    public void setBatch(int batch) {
+        this.batch = batch;
+    }
+
+    public void setDelay(long delay) {
+        this.delay = delay;
+    }
+
+    public void setMessages(int messages) {
+        this.messages = messages;
+    }
+
+    public void setSize(int size) {
+        this.size = size;
+    }
+
+    public void setSubscribers(int subscribers) {
+        this.subscribers = subscribers;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/jndi.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/jndi.properties b/assembly/src/release/examples/openwire/swissarmy/src/jndi.properties
new file mode 100644
index 0000000..19dad58
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/jndi.properties
@@ -0,0 +1,17 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+topic.logTopic=logTopic
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/log4j-jms.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/log4j-jms.properties b/assembly/src/release/examples/openwire/swissarmy/src/log4j-jms.properties
new file mode 100644
index 0000000..e28d6d6
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/log4j-jms.properties
@@ -0,0 +1,31 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+log4j.rootLogger=INFO, stdout, jms
+
+## Be sure that ActiveMQ messages are not logged to 'jms' appender
+log4j.logger.org.apache.activemq=INFO, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c - %m%n
+
+## Configure 'jms' appender. You'll also need jndi.properties file in order to make it work
+log4j.appender.jms=org.apache.log4j.net.JMSAppender
+log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+log4j.appender.jms.ProviderURL=tcp://localhost:61616
+log4j.appender.jms.TopicBindingName=logTopic
+log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/other/perfharness/perfharness-activemq.sh
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/other/perfharness/perfharness-activemq.sh b/assembly/src/release/examples/other/perfharness/perfharness-activemq.sh
new file mode 100755
index 0000000..c226b4a
--- /dev/null
+++ b/assembly/src/release/examples/other/perfharness/perfharness-activemq.sh
@@ -0,0 +1,49 @@
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+
+# ==================================================================
+# Helper script to run the IBM JMS performance harness against
+# the ActiveMQ message broker.
+#
+# Sample Usage: 
+#   ./perfharness-activemq.sh -d dynamicQueues/FOO -tc jms.r11.PutGet -nt 6
+#
+# It assumes that the apache-activemq-${project.version}.jar and 
+# perfharness.jar files are in the current directory.  If they are not,
+# set the ACTIVEMQ_HOME and PERFHARNESS_HOME env variable to the correct location.
+#
+# You can download the perfharness.jar file from:
+# http://www.alphaworks.ibm.com/tech/perfharness
+#
+# By Default the test connects the the vm://localhost broker.
+# To change that, use set the BROKER_URL to the broker url you want to use.
+#
+# ==================================================================
+
+if [ -z "$PERFHARNESS_HOME" ] ; then
+   PERFHARNESS_HOME=.
+fi
+
+if [ -z "$ACTIVEMQ_HOME" ] ; then
+   ACTIVEMQ_HOME=../..
+fi
+
+if [ -z "$BROKER_URL" ] ; then
+   BROKER_URL='vm://(broker://()/localhost?useJmx=false)/localhost'
+fi
+
+java ${JAVA_OPTIONS} -cp ${ACTIVEMQ_HOME}/apache-activemq-${project.version}.jar:${PERFHARNESS_HOME}/perfharness.jar JMSPerfHarness -pc JNDI -ii org.apache.activemq.jndi.ActiveMQInitialContextFactory -iu $BROKER_URL -cf ConnectionFactory -d dynamic$DESTINATION $@

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/cpp/Listener.cpp
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/cpp/Listener.cpp b/assembly/src/release/examples/stomp/cpp/Listener.cpp
new file mode 100644
index 0000000..c38e9e2
--- /dev/null
+++ b/assembly/src/release/examples/stomp/cpp/Listener.cpp
@@ -0,0 +1,126 @@
+/*
+ * 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.
+ */
+
+#include <activemq/core/ActiveMQConnectionFactory.h>
+#include <activemq/core/ActiveMQConnection.h>
+#include <activemq/library/ActiveMQCPP.h>
+#include <decaf/lang/Integer.h>
+#include <decaf/lang/System.h>
+#include <activemq/util/Config.h>
+#include <cms/Connection.h>
+#include <cms/Session.h>
+#include <cms/Destination.h>
+#include <cms/MessageProducer.h>
+#include <cms/TextMessage.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <iostream>
+
+using namespace activemq;
+using namespace activemq::core;
+using namespace decaf::lang;
+using namespace cms;
+using namespace std;
+
+////////////////////////////////////////////////////////////////////////////////
+std::string getEnv(const std::string& key, const std::string& defaultValue) {
+
+    try{
+        return System::getenv(key);
+    } catch(...) {
+    }
+
+    return defaultValue;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string getArg(char* argv[], int argc, int index, const std::string& defaultValue) {
+
+    if( index < argc ) {
+        return argv[index];
+    }
+
+    return defaultValue;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+int main(int argc AMQCPP_UNUSED, char* argv[] AMQCPP_UNUSED) {
+
+    activemq::library::ActiveMQCPP::initializeLibrary();
+
+    std::cout << "=====================================================\n";
+    std::cout << "Starting the Listener example:" << std::endl;
+    std::cout << "-----------------------------------------------------\n";
+
+    std::string user = getEnv("ACTIVEMQ_USER", "admin");
+    std::string password = getEnv("ACTIVEMQ_PASSWORD", "password");
+    std::string host = getEnv("ACTIVEMQ_HOST", "localhost");
+    int port = Integer::parseInt(getEnv("ACTIVEMQ_PORT", "61613"));
+    std::string destination = getArg(argv, argc, 1, "event");
+
+    {
+        ActiveMQConnectionFactory factory;
+        factory.setBrokerURI(std::string("tcp://") + host + ":" + Integer::toString(port) + "?wireFormat=stomp");
+
+        std::auto_ptr<Connection> connection(factory.createConnection(user, password));
+
+        std::auto_ptr<Session> session(connection->createSession());
+        std::auto_ptr<Destination> dest(session->createTopic(destination));
+        std::auto_ptr<MessageConsumer> consumer(session->createConsumer(dest.get()));
+
+        connection->start();
+
+        long long start = System::currentTimeMillis();
+        long long count = 0;
+
+        std::cout << "Waiting for messages..." << std::endl;
+        while(true) {
+
+            std::auto_ptr<Message> message(consumer->receive());
+
+            const TextMessage* txtMsg = dynamic_cast<const TextMessage*>(message.get());
+
+            if( txtMsg != NULL ) {
+                std::string body = txtMsg->getText();
+                if( body == "SHUTDOWN" ) {
+                    long long diff = System::currentTimeMillis() - start;
+                    cout << "Received " << count << " in " << (double)diff/1000.0 << " seconds" << std::endl;
+                    break;
+                } else {
+                    if( count == 0 ) {
+                        start = System::currentTimeMillis();
+                    }
+                    count++;
+                    if( count % 1000 == 0 ) {
+                        std::cout << "Received " << count << " messages." << std::endl;
+                    }
+                }
+
+            } else {
+                std::cout << "Unexpected message type." << std::endl;
+            }
+        }
+
+        connection->close();
+    }
+
+    std::cout << "-----------------------------------------------------\n";
+    std::cout << "Finished with the example." << std::endl;
+    std::cout << "=====================================================\n";
+
+    activemq::library::ActiveMQCPP::shutdownLibrary();
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/cpp/Publisher.cpp
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/cpp/Publisher.cpp b/assembly/src/release/examples/stomp/cpp/Publisher.cpp
new file mode 100644
index 0000000..fc0ab6c
--- /dev/null
+++ b/assembly/src/release/examples/stomp/cpp/Publisher.cpp
@@ -0,0 +1,120 @@
+/*
+ * 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.
+ */
+
+#include <activemq/util/Config.h>
+
+#include <decaf/lang/System.h>
+#include <decaf/lang/Runnable.h>
+#include <decaf/lang/Integer.h>
+#include <activemq/core/ActiveMQConnectionFactory.h>
+#include <activemq/library/ActiveMQCPP.h>
+#include <cms/Connection.h>
+#include <cms/Session.h>
+#include <cms/Destination.h>
+#include <cms/MessageProducer.h>
+#include <cms/TextMessage.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <iostream>
+#include <memory>
+
+using namespace cms;
+using namespace activemq;
+using namespace activemq::core;
+using namespace decaf;
+using namespace decaf::lang;
+
+////////////////////////////////////////////////////////////////////////////////
+std::string getEnv(const std::string& key, const std::string& defaultValue) {
+
+    try{
+        return System::getenv(key);
+    } catch(...) {
+    }
+
+    return defaultValue;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string getArg(char* argv[], int argc, int index, const std::string& defaultValue) {
+
+    if( index < argc ) {
+        return argv[index];
+    }
+
+    return defaultValue;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+int main(int argc, char* argv[]) {
+
+    activemq::library::ActiveMQCPP::initializeLibrary();
+
+    std::cout << "=====================================================\n";
+    std::cout << "Starting the Publisher example:" << std::endl;
+    std::cout << "-----------------------------------------------------\n";
+
+    std::string user = getEnv("ACTIVEMQ_USER", "admin");
+    std::string password = getEnv("ACTIVEMQ_PASSWORD", "password");
+    std::string host = getEnv("ACTIVEMQ_HOST", "localhost");
+    int port = Integer::parseInt(getEnv("ACTIVEMQ_PORT", "61613"));
+    std::string destination = getArg(argv, argc, 1, "event");
+
+    int messages = 10000;
+    int size = 256;
+
+    std::string DATA = "abcdefghijklmnopqrstuvwxyz";
+    std::string body = "";
+    for( int i=0; i < size; i ++) {
+        body += DATA.at(i%DATA.length());
+    }
+
+    {
+        ActiveMQConnectionFactory factory;
+        factory.setBrokerURI(std::string("tcp://") + host + ":" + Integer::toString(port) + "?wireFormat=stomp");
+
+        std::auto_ptr<TextMessage> message;
+        std::auto_ptr<Connection> connection(factory.createConnection(user, password));
+
+        connection->start();
+
+        std::auto_ptr<Session> session(connection->createSession());
+        std::auto_ptr<Destination> dest(session->createTopic(destination));
+        std::auto_ptr<MessageProducer> producer(session->createProducer(dest.get()));
+
+        producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
+
+        for( int i=1; i <= messages; i ++) {
+            message.reset(session->createTextMessage(body));
+            producer->send(message.get());
+            if( (i % 1000) == 0) {
+                std::cout << "Sent " << i << " messages" << std::endl;;
+            }
+        }
+
+        message.reset(session->createTextMessage("SHUTDOWN"));
+        producer->send(message.get());
+
+        connection->close();
+    }
+
+    std::cout << "-----------------------------------------------------\n";
+    std::cout << "Finished with the example." << std::endl;
+    std::cout << "=====================================================\n";
+
+    activemq::library::ActiveMQCPP::shutdownLibrary();
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/cpp/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/cpp/readme.md b/assembly/src/release/examples/stomp/cpp/readme.md
new file mode 100644
index 0000000..4aa397c
--- /dev/null
+++ b/assembly/src/release/examples/stomp/cpp/readme.md
@@ -0,0 +1,44 @@
+Prereqs
+=======
+
+These examples use the [ActiveMQ-CPP](http://activemq.apache.org/cms) C++ library,
+but unfortunately they don't work with the latest 3.2.4 release, you have to either
+wait for a subsequent release of do a source build of the project trunk.  Until then,
+you will need to 
+
+1. [Checkout the ActiveMQ-CPP trunk source code](http://activemq.apache.org/cms/source.html)
+2. [Build and Install](http://activemq.apache.org/cms/building.html)
+
+Building
+========
+
+This will vary depending on where you installed your libraries and the compiler 
+you are using but on my Ubuntu system, I compiled the examples as follows:
+
+    gcc Listener.cpp -o listener -I/usr/local/include/activemq-cpp-3.2.4 -I/usr/include/apr-1.0 -lactivemq-cpp -lstdc++ 
+    gcc Publisher.cpp -o publisher -I/usr/local/include/activemq-cpp-3.2.4 -I/usr/include/apr-1.0 -lactivemq-cpp -lstdc++ 
+
+Running the Examples
+====================
+
+Note: You may need to update set an environment variable so that the 
+activemq-cpp shared libraries can be loaded.  For example on my Ubuntu 
+system I had to add the following to my profile:
+
+    export LD_LIBRARY_PATH=/usr/local/lib
+
+In one terminal window run:
+
+    ./listener
+
+In another terminal window run:
+
+    ./publisher
+
+You can control to which stomp server the examples try to connect to by
+setting the following environment variables: 
+
+* `ACTIVEMQ_HOST`
+* `ACTIVEMQ_PORT`
+* `ACTIVEMQ_USER`
+* `ACTIVEMQ_PASSWORD`

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.sln
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.sln b/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.sln
new file mode 100644
index 0000000..ade0d24
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Publisher", "Publisher\Publisher.csproj", "{0FEEC122-F3FD-4148-A461-0A724AE0C691}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Listener", "Listener\Listener.csproj", "{08413D64-4C72-4F92-9B4A-9BAECCDB6DC3}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{08413D64-4C72-4F92-9B4A-9BAECCDB6DC3}.Debug|x86.ActiveCfg = Debug|x86
+		{08413D64-4C72-4F92-9B4A-9BAECCDB6DC3}.Debug|x86.Build.0 = Debug|x86
+		{08413D64-4C72-4F92-9B4A-9BAECCDB6DC3}.Release|x86.ActiveCfg = Release|x86
+		{08413D64-4C72-4F92-9B4A-9BAECCDB6DC3}.Release|x86.Build.0 = Release|x86
+		{0FEEC122-F3FD-4148-A461-0A724AE0C691}.Debug|x86.ActiveCfg = Debug|x86
+		{0FEEC122-F3FD-4148-A461-0A724AE0C691}.Debug|x86.Build.0 = Debug|x86
+		{0FEEC122-F3FD-4148-A461-0A724AE0C691}.Release|x86.ActiveCfg = Release|x86
+		{0FEEC122-F3FD-4148-A461-0A724AE0C691}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = Listener\Listener.csproj
+	EndGlobalSection
+EndGlobal

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.userprefs
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.userprefs b/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.userprefs
new file mode 100644
index 0000000..25e20b3
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/ApolloExamples.userprefs
@@ -0,0 +1,30 @@
+<Properties>
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" ctype="Workspace" />
+  <MonoDevelop.Ide.Workbench ActiveDocument="Publisher/Publisher.cs" ctype="Workbench">
+    <Files>
+      <File FileName="Listener/Listener.cs" Line="51" Column="48" />
+      <File FileName="Publisher/Publisher.cs" Line="35" Column="30" />
+    </Files>
+    <Pads>
+      <Pad Id="ProjectPad">
+        <State expanded="True">
+          <Node name="Listener" expanded="True">
+            <Option id="ShowVersionControlOverlays" value="True" />
+            <Option id="ShowAllFiles" value="False" />
+          </Node>
+          <Node name="Publisher" expanded="True" selected="True">
+            <Option id="ShowVersionControlOverlays" value="True" />
+            <Option id="ShowAllFiles" value="False" />
+          </Node>
+        </State>
+      </Pad>
+      <Pad Id="ClassPad">
+        <State selected="True" />
+      </Pad>
+    </Pads>
+  </MonoDevelop.Ide.Workbench>
+  <MonoDevelop.Ide.DebuggingService.Breakpoints>
+    <BreakpointStore />
+  </MonoDevelop.Ide.DebuggingService.Breakpoints>
+  <MonoDevelop.Ide.DebuggingService.PinnedWatches ctype="PinnedWatchStore" />
+</Properties>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/AssemblyInfo.cs b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/AssemblyInfo.cs
new file mode 100644
index 0000000..a1f96a9
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+/**
+ * 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.
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes. 
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Listener")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly, 
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.cs
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.cs b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.cs
new file mode 100644
index 0000000..91971a5
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.cs
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+using System;
+
+using Apache.NMS;
+using Apache.NMS.Stomp;
+
+namespace ActiveMQ.Example
+{
+	class Listemer
+	{
+		public static void Main(string[] args)
+		{
+			Console.WriteLine("Starting up Listener.");			
+						
+	        String user = env("ACTIVEMQ_USER", "admin");
+	        String password = env("ACTIVEMQ_PASSWORD", "password");
+	        String host = env("ACTIVEMQ_HOST", "localhost");
+	        int port = Int32.Parse(env("ACTIVEMQ_PORT", "61613"));
+	        String destination = arg(args, 0, "event");
+	
+			String brokerUri = "stomp:tcp://" + host + ":" + port + "?transport.useLogging=true";
+	        NMSConnectionFactory factory = new NMSConnectionFactory(brokerUri);
+	
+	        IConnection connection = factory.CreateConnection(user, password);
+	        connection.Start();
+	        ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
+	        IDestination dest = session.GetTopic(destination);
+	
+	        IMessageConsumer consumer = session.CreateConsumer(dest);
+	        DateTime start = DateTime.Now;
+	        long count = 0;
+	        
+			Console.WriteLine("Waiting for messages...");
+			while (true) 
+			{
+	            IMessage msg = consumer.Receive();
+	            if (msg is ITextMessage) 
+				{
+					ITextMessage txtMsg = msg as ITextMessage;
+	                String body = txtMsg.Text;
+	                if ("SHUTDOWN".Equals(body))
+					{
+	                    TimeSpan diff = DateTime.Now - start;
+	                    Console.WriteLine(String.Format("Received {0} in {1} seconds", count, (1.0*diff.TotalMilliseconds/1000.0)));
+	                    break;
+	                } 
+					else 
+					{
+	                    if (count == 0) 
+						{
+	                        start = DateTime.Now;
+	                    }
+	                    count ++;
+	                    if (count % 1000 == 0) 
+						{
+	                        Console.WriteLine(String.Format("Received {0} messages.", count));
+	                    }
+	                }
+	
+	            }
+				else 
+				{
+	                Console.WriteLine("Unexpected message type: " + msg.GetType().Name);
+	            }
+	        }
+	        
+			Console.WriteLine("Shutting down Listener.");			
+			connection.Close();
+	    }
+	
+	    private static String env(String key, String defaultValue)
+		{
+	        String rc = System.Environment.GetEnvironmentVariable(key);
+	        if (rc == null)
+			{
+	            return defaultValue;
+			}
+	        return rc;
+	    }
+	
+	    private static String arg(String []args, int index, String defaultValue) 
+		{
+	        if (index < args.Length)
+			{
+	            return args[index];
+			}
+            return defaultValue;
+	    }
+	}
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.csproj
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.csproj b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.csproj
new file mode 100644
index 0000000..9813110
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/Listener.csproj
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{08413D64-4C72-4F92-9B4A-9BAECCDB6DC3}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>Listener</RootNamespace>
    <AssemblyName>Listener</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLeve
 l>
    <PlatformTarget>x86</PlatformTarget>
    <Externalconsole>true</Externalconsole>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <DebugType>none</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <PlatformTarget>x86</PlatformTarget>
    <Externalconsole>true</Externalconsole>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="Apache.NMS, Version=1.5.0.2196, Culture=neutral, PublicKeyToken=82756feee3957618">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\dev\activemq\NMS.Stomp\build\mono-2.0\debug\Apache.NMS.dll</HintPath>
    </Reference>
    <Reference Include="Apache.NMS.Stomp, Version=1.6.0.2211, Culture=neutral, PublicKeyToken=82756feee3957618">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\dev\activemq\NMS.Stomp\build\
 mono-2.0\debug\Apache.NMS.Stomp.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Listener.cs" />
    <Compile Include="AssemblyInfo.cs" />
    <Compile Include="NMSTracer.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/NMSTracer.cs
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/NMSTracer.cs b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/NMSTracer.cs
new file mode 100755
index 0000000..b37af66
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Listener/NMSTracer.cs
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+using System;
+
+namespace ActiveMQ.Example
+{
+    public class NmsTracer : Apache.NMS.ITrace
+    {
+        #region ITrace Members
+        public void Debug(string message)
+        {
+            Console.WriteLine("DEBUG: " + message);
+        }
+
+        public void Error(string message)
+        {
+            Console.WriteLine("ERROR: " + message);
+        }
+
+        public void Fatal(string message)
+        {
+            Console.WriteLine("FATAL: " + message);
+        }
+
+        public void Info(string message)
+        {
+            Console.WriteLine("INFO:  " + message);
+        }
+
+        public void Warn(string message)
+        {
+            Console.WriteLine("WARN:  " + message);
+        }
+
+        public bool IsDebugEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsErrorEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsFatalEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsInfoEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsWarnEnabled
+        {
+            get { return true; }
+        }
+
+        #endregion
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/AssemblyInfo.cs b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/AssemblyInfo.cs
new file mode 100644
index 0000000..2628d12
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+/**
+ * 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.
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes. 
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Publisher")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly, 
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/NMSTracer.cs
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/NMSTracer.cs b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/NMSTracer.cs
new file mode 100755
index 0000000..b37af66
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/NMSTracer.cs
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+using System;
+
+namespace ActiveMQ.Example
+{
+    public class NmsTracer : Apache.NMS.ITrace
+    {
+        #region ITrace Members
+        public void Debug(string message)
+        {
+            Console.WriteLine("DEBUG: " + message);
+        }
+
+        public void Error(string message)
+        {
+            Console.WriteLine("ERROR: " + message);
+        }
+
+        public void Fatal(string message)
+        {
+            Console.WriteLine("FATAL: " + message);
+        }
+
+        public void Info(string message)
+        {
+            Console.WriteLine("INFO:  " + message);
+        }
+
+        public void Warn(string message)
+        {
+            Console.WriteLine("WARN:  " + message);
+        }
+
+        public bool IsDebugEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsErrorEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsFatalEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsInfoEnabled
+        {
+            get { return true; }
+        }
+
+        public bool IsWarnEnabled
+        {
+            get { return true; }
+        }
+
+        #endregion
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.cs
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.cs b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.cs
new file mode 100644
index 0000000..178afa2
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.cs
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+using System;
+
+using Apache.NMS;
+using Apache.NMS.Stomp;
+
+namespace ActiveMQ.Example
+{
+	class Publisher
+	{
+		public static void Main (string[] args)
+		{
+	        String user = env("ACTIVEMQ_USER", "admin");
+	        String password = env("ACTIVEMQ_PASSWORD", "password");
+	        String host = env("ACTIVEMQ_HOST", "localhost");
+	        int port = Int32.Parse(env("ACTIVEMQ_PORT", "61613"));
+			String destination = arg(args, 0, "event");
+	
+	        int messages = 10000;
+	        int size = 256;
+	
+	        String DATA = "abcdefghijklmnopqrstuvwxyz";
+	        String body = "";
+	        for(int i=0; i < size; i ++) 
+			{
+	            body += DATA[i%DATA.Length];
+	        }
+	
+			String brokerUri = "stomp:tcp://" + host + ":" + port;
+	        NMSConnectionFactory factory = new NMSConnectionFactory(brokerUri);
+	
+	        IConnection connection = factory.CreateConnection(user, password);
+	        connection.Start();
+	        ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
+	        IDestination dest = session.GetTopic(destination);
+	        IMessageProducer producer = session.CreateProducer(dest);
+	        producer.DeliveryMode = MsgDeliveryMode.NonPersistent;
+	
+	        for (int i=1; i <= messages; i ++) 
+			{
+	            producer.Send(session.CreateTextMessage(body));
+	            if ((i % 1000) == 0) 
+				{
+	                Console.WriteLine(String.Format("Sent {0} messages", i));
+	            }
+	        }
+	
+	        producer.Send(session.CreateTextMessage("SHUTDOWN"));
+	        connection.Close();
+		}
+
+	    private static String env(String key, String defaultValue)
+		{
+	        String rc = System.Environment.GetEnvironmentVariable(key);
+	        if (rc == null)
+			{
+	            return defaultValue;
+			}
+	        return rc;
+	    }
+	
+	    private static String arg(String []args, int index, String defaultValue) 
+		{
+	        if (index < args.Length)
+			{
+	            return args[index];
+			}
+            return defaultValue;
+	    }
+	}
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.csproj
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.csproj b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.csproj
new file mode 100644
index 0000000..1f4e30e
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/ApolloExamples/Publisher/Publisher.csproj
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{0FEEC122-F3FD-4148-A461-0A724AE0C691}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>Publisher</RootNamespace>
    <AssemblyName>Publisher</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLe
 vel>
    <PlatformTarget>x86</PlatformTarget>
    <Externalconsole>true</Externalconsole>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <DebugType>none</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <PlatformTarget>x86</PlatformTarget>
    <Externalconsole>true</Externalconsole>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="Apache.NMS, Version=1.5.0.2196, Culture=neutral, PublicKeyToken=82756feee3957618">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\dev\activemq\NMS.Stomp\build\mono-2.0\debug\Apache.NMS.dll</HintPath>
    </Reference>
    <Reference Include="Apache.NMS.Stomp, Version=1.6.0.2211, Culture=neutral, PublicKeyToken=82756feee3957618">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\dev\activemq\NMS.Stomp\buil
 d\mono-2.0\debug\Apache.NMS.Stomp.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Publisher.cs" />
    <Compile Include="AssemblyInfo.cs" />
    <Compile Include="NMSTracer.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/csharp/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/csharp/readme.md b/assembly/src/release/examples/stomp/csharp/readme.md
new file mode 100644
index 0000000..34a0f8f
--- /dev/null
+++ b/assembly/src/release/examples/stomp/csharp/readme.md
@@ -0,0 +1,31 @@
+Prereqs
+=======
+
+- Install [Apache.NMS.Stomp](http://activemq.apache.org/nms/download.html) 
+
+Building
+========
+
+This will vary depending on where you installed your libraries.  Open the 
+ActiveMQExamples solution in Visual Studio and update the references for the
+Listener and Publisher project to point to where you Apache.NMS.dll and 
+Apache.NMS.Stomp.dll are located.  Build both projects in the solution.
+
+Running the Examples
+====================
+
+In one terminal window run:
+
+    ./Listener.exe
+
+In another terminal window run:
+
+    ./Publisher.exe
+
+You can control to which stomp server the examples try to connect to by
+setting the following environment variables: 
+
+* `ACTIVEMQ_HOST`
+* `ACTIVEMQ_PORT`
+* `ACTIVEMQ_USER`
+* `ACTIVEMQ_PASSWORD`

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/java/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/java/pom.xml b/assembly/src/release/examples/stomp/java/pom.xml
new file mode 100644
index 0000000..334b56f
--- /dev/null
+++ b/assembly/src/release/examples/stomp/java/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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>
+  
+  <groupId>example</groupId>
+  <artifactId>stomp-example</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  
+  <name>example</name>
+  <description>ActiveMQ STOMP Java Examples</description>
+
+  <repositories>
+    <repository>
+      <id>Fusesource Snapshots</id>
+      <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
+    </repository>
+  </repositories>
+  
+  <dependencies>
+    
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jms_1.1_spec</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.fusesource.stompjms</groupId>
+      <artifactId>stompjms-client</artifactId>
+      <version>${stompjms-version}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+
+      <!-- include all the dependencies into the jar so it's easier to execute the example -->
+      <plugin>
+        <groupId>org.fusesource.mvnplugins</groupId>
+        <artifactId>maven-uberize-plugin</artifactId>
+        <version>1.14</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals><goal>uberize</goal></goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+    </plugins>
+  </build>
+  
+</project>
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/java/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/java/readme.md b/assembly/src/release/examples/stomp/java/readme.md
new file mode 100644
index 0000000..fed1088
--- /dev/null
+++ b/assembly/src/release/examples/stomp/java/readme.md
@@ -0,0 +1,32 @@
+## Overview
+
+This is an example of how use the Java JMS api with ActiveMQ.
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    java -cp target/stomp-example-0.1-SNAPSHOT.jar example.Listener
+
+In another terminal window run:
+
+    java -cp target/stomp-example-0.1-SNAPSHOT.jar example.Publisher
+
+You can control to which stomp server the examples try to connect to by
+setting the following environment variables: 
+
+* `ACTIVEMQ_HOST`
+* `ACTIVEMQ_PORT`
+* `ACTIVEMQ_USER`
+* `ACTIVEMQ_PASSWORD`

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/java/src/main/java/example/Listener.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/java/src/main/java/example/Listener.java b/assembly/src/release/examples/stomp/java/src/main/java/example/Listener.java
new file mode 100644
index 0000000..7bb4182
--- /dev/null
+++ b/assembly/src/release/examples/stomp/java/src/main/java/example/Listener.java
@@ -0,0 +1,87 @@
+/**
+ * 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 example;
+
+import org.fusesource.stomp.jms.*;
+import javax.jms.*;
+
+class Listener {
+
+    public static void main(String []args) throws JMSException {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "61613"));
+        String destination = arg(args, 0, "/topic/event");
+
+        StompJmsConnectionFactory factory = new StompJmsConnectionFactory();
+        factory.setBrokerURI("tcp://" + host + ":" + port);
+
+        Connection connection = factory.createConnection(user, password);
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Destination dest = new StompJmsDestination(destination);
+
+        MessageConsumer consumer = session.createConsumer(dest);
+        long start = System.currentTimeMillis();
+        long count = 1;
+        System.out.println("Waiting for messages...");
+        while(true) {
+            Message msg = consumer.receive();
+            if( msg instanceof  TextMessage ) {
+                String body = ((TextMessage) msg).getText();
+                if( "SHUTDOWN".equals(body)) {
+                    long diff = System.currentTimeMillis() - start;
+                    System.out.println(String.format("Received %d in %.2f seconds", count, (1.0*diff/1000.0)));
+                    break;
+                } else {
+                    if( count != msg.getIntProperty("id") ) {
+                        System.out.println("mismatch: "+count+"!="+msg.getIntProperty("id"));
+                    }
+                    count = msg.getIntProperty("id");
+
+                    if( count == 0 ) {
+                        start = System.currentTimeMillis();
+                    }
+                    if( count % 1000 == 0 ) {
+                        System.out.println(String.format("Received %d messages.", count));
+                    }
+                    count ++;
+                }
+
+            } else {
+                System.out.println("Unexpected message type: "+msg.getClass());
+            }
+        }
+        connection.close();
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/java/src/main/java/example/Publisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/java/src/main/java/example/Publisher.java b/assembly/src/release/examples/stomp/java/src/main/java/example/Publisher.java
new file mode 100644
index 0000000..3feceb4
--- /dev/null
+++ b/assembly/src/release/examples/stomp/java/src/main/java/example/Publisher.java
@@ -0,0 +1,79 @@
+/**
+ * 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 example;
+
+import org.fusesource.stomp.jms.*;
+import javax.jms.*;
+
+class Publisher {
+
+    public static void main(String []args) throws JMSException {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "61613"));
+        String destination = arg(args, 0, "/topic/event");
+
+        int messages = 10000;
+        int size = 256;
+
+        String DATA = "abcdefghijklmnopqrstuvwxyz";
+        String body = "";
+        for( int i=0; i < size; i ++) {
+            body += DATA.charAt(i%DATA.length());
+        }
+
+        StompJmsConnectionFactory factory = new StompJmsConnectionFactory();
+        factory.setBrokerURI("tcp://" + host + ":" + port);
+
+        Connection connection = factory.createConnection(user, password);
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Destination dest = new StompJmsDestination(destination);
+        MessageProducer producer = session.createProducer(dest);
+        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+        for( int i=1; i <= messages; i ++) {
+            TextMessage msg = session.createTextMessage(body);
+            msg.setIntProperty("id", i);
+            producer.send(msg);
+            if( (i % 1000) == 0) {
+                System.out.println(String.format("Sent %d messages", i));
+            }
+        }
+
+        producer.send(session.createTextMessage("SHUTDOWN"));
+        connection.close();
+
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/perl/listener
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/perl/listener b/assembly/src/release/examples/stomp/perl/listener
new file mode 100755
index 0000000..49de9ff
--- /dev/null
+++ b/assembly/src/release/examples/stomp/perl/listener
@@ -0,0 +1,62 @@
+#!/usr/bin/perl
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+#
+# sample listener
+#
+
+use strict;
+use warnings;
+use Net::STOMP::Client;
+use Time::HiRes qw(time);
+
+our(%Option, $Conn, $Count, $Start, $Run);
+
+$Option{user} = $ENV{ACTIVEMQ_USER} || "admin";
+$Option{password} = $ENV{ACTIVEMQ_PASSWORD} || "password";
+$Option{host} = $ENV{ACTIVEMQ_HOST} || "localhost";
+$Option{port} = $ENV{ACTIVEMQ_PORT} || 61613;
+$Option{destination} = $ENV{STOMP_DESTINATION} || "/topic/event";
+
+sub callback ($$) {
+    my($self, $frame) = @_;
+
+    $Start = time() unless $Count++;
+    $Run = 0 if $frame->body() eq "SHUTDOWN";
+}
+
+$Conn = Net::STOMP::Client->new(
+    host => $Option{host},
+    port => $Option{port},
+);
+$Conn->connect(
+    login    => $Option{user},
+    passcode => $Option{password},
+);
+printf("connected to %s:%d\n", $Conn->peer()->addr(), $Conn->peer()->port());
+$Conn->message_callback(\&callback);
+$Conn->subscribe(
+    destination => $Option{destination},
+    id          => 0,
+    ack         => "auto",
+);
+printf("Waiting for messages...\n");
+$Count = 0;
+$Run = 1;
+$Conn->wait_for_frames() while $Run;
+printf("received %d messages in %.3f seconds\n", $Count, time()-$Start);
+$Conn->disconnect();

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/perl/publisher
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/perl/publisher b/assembly/src/release/examples/stomp/perl/publisher
new file mode 100755
index 0000000..27dabb7
--- /dev/null
+++ b/assembly/src/release/examples/stomp/perl/publisher
@@ -0,0 +1,59 @@
+#!/usr/bin/perl
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+#
+# sample publisher
+#
+
+use strict;
+use warnings;
+use Net::STOMP::Client;
+use Time::HiRes qw(time);
+
+our(%Option, $Conn, $Start);
+
+$Option{user} = $ENV{ACTIVEMQ_USER} || "admin";
+$Option{password} = $ENV{ACTIVEMQ_PASSWORD} || "password";
+$Option{host} = $ENV{ACTIVEMQ_HOST} || "localhost";
+$Option{port} = $ENV{ACTIVEMQ_PORT} || 61613;
+$Option{destination} = $ENV{STOMP_DESTINATION} || "/topic/event";
+$Option{count} = $ENV{STOMP_COUNT} || 10000;
+
+$Conn = Net::STOMP::Client->new(
+    host => $Option{host},
+    port => $Option{port},
+);
+$Conn->connect(
+    login    => $Option{user},
+    passcode => $Option{password},
+);
+printf("connected to %s:%d\n", $Conn->peer()->addr(), $Conn->peer()->port());
+$Start = time();
+foreach (1 .. $Option{count}) {
+    $Conn->send(
+	destination => $Option{destination},
+	persistent  => "false",
+	body        => "Hello world from Perl",
+    );
+}
+$Conn->send(
+    destination => $Option{destination},
+    persistent  => "false",
+    body        => "SHUTDOWN",
+);
+printf("sent %d messages in %.3f seconds\n", $Option{count}+1, time()-$Start);
+$Conn->disconnect();

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/perl/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/perl/readme.md b/assembly/src/release/examples/stomp/perl/readme.md
new file mode 100644
index 0000000..1d349d1
--- /dev/null
+++ b/assembly/src/release/examples/stomp/perl/readme.md
@@ -0,0 +1,12 @@
+Prereqs
+=======
+
+Install the [Net:STOMP::Client](http://search.cpan.org/dist/Net-STOMP-Client/) 
+library.
+
+CPAN users can install it by running:
+
+    cpan Net:STOMP::Client
+
+
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/php/listener.php
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/php/listener.php b/assembly/src/release/examples/stomp/php/listener.php
new file mode 100755
index 0000000..b816722
--- /dev/null
+++ b/assembly/src/release/examples/stomp/php/listener.php
@@ -0,0 +1,73 @@
+<?php
+/*
+ * 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.
+ */
+
+$user = getenv("ACTIVEMQ_USER"); 
+if( !$user ) $user = "admin";
+
+$password = getenv("ACTIVEMQ_PASSWORD");
+if( !$password ) $password = "password";
+
+$host = getenv("ACTIVEMQ_HOST");
+if( !$host ) $host = "localhost";
+
+$port = getenv("ACTIVEMQ_PORT");
+if( !$port ) $port = 61613;
+
+$destination  = '/topic/event';
+
+
+function now() { 
+  list($usec,$sec) = explode(' ', microtime());
+  return ((float)$usec + (float)$sec);
+}
+
+try {
+  $url = 'tcp://'.$host.":".$port;
+  $stomp = new Stomp($url, $user, $password);
+  $stomp->subscribe($destination);
+  
+  $start = now();
+  $count = 0;
+  echo "Waiting for messages...\n";
+  while(true) {
+    $frame = $stomp->readFrame();
+    if( $frame ) {
+      if( $frame->command == "MESSAGE" ) {
+        if($frame->body == "SHUTDOWN") {
+          $diff = round((now()-$start),2);
+          echo("Received ".$count." in ".$diff." seconds\n");
+          break;
+        } else {
+          if(  $count==0 ) {
+            $start = now();
+          }
+          if( $count%1000 == 0 ) {
+            echo "Received ".$count." messages\n";
+          }
+          $count++;
+        }
+      } else {
+        echo "Unexpected frame.\n";
+        var_dump($frame);
+      }
+    }
+  }
+
+} catch(StompException $e) {
+  echo $e->getMessage();
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/php/publisher.php
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/php/publisher.php b/assembly/src/release/examples/stomp/php/publisher.php
new file mode 100755
index 0000000..6ff0ade
--- /dev/null
+++ b/assembly/src/release/examples/stomp/php/publisher.php
@@ -0,0 +1,56 @@
+<?php
+/*
+ * 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.
+ */
+
+$user = getenv("ACTIVEMQ_USER"); 
+if( !$user ) $user = "admin";
+
+$password = getenv("ACTIVEMQ_PASSWORD");
+if( !$password ) $password = "password";
+
+$host = getenv("ACTIVEMQ_HOST");
+if( !$host ) $host = "localhost";
+
+$port = getenv("ACTIVEMQ_PORT");
+if( !$port ) $port = 61613;
+
+$destination  = '/topic/event';
+$messages = 10000;
+$size = 256;
+
+$DATA = "abcdefghijklmnopqrstuvwxyz";
+$body = "";
+for($i=0; $i< $size; $i++) {
+  $body .= $DATA[ $i % 26];
+}
+
+try {
+  $url = 'tcp://'.$host.":".$port;
+  $stomp = new Stomp($url, $user, $password);
+  
+  for($i=0; $i< $messages; $i++) {
+    $stomp->send($destination, $body);
+    if( $i%1000 == 0 ) {
+      echo "Sent ".$i." messages\n";
+    }
+  }
+  
+  $stomp->send($destination, "SHUTDOWN");
+
+} catch(StompException $e) {
+  echo $e->getMessage();
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/php/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/php/readme.md b/assembly/src/release/examples/stomp/php/readme.md
new file mode 100644
index 0000000..dcf17ca
--- /dev/null
+++ b/assembly/src/release/examples/stomp/php/readme.md
@@ -0,0 +1,12 @@
+Prereqs
+=======
+
+Install the [PHP Stomp client](http://www.php.net/manual/en/book.stomp.php) 
+library.
+
+Pear users can install it by running:
+
+    pear install pecl.php.net/stomp
+
+Then you should add "extension=stomp.so" to php.ini
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/readme.md b/assembly/src/release/examples/stomp/python/readme.md
new file mode 100644
index 0000000..12547c5
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/readme.md
@@ -0,0 +1,7 @@
+Overview
+========
+
+Python users can choose between examples for the following client libraries:
+
+* [stomppy](http://code.google.com/p/stomppy) 
+* [stompest](https://github.com/nikipore/stompest)

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stompest/async/__init__.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stompest/async/__init__.py b/assembly/src/release/examples/stomp/python/stompest/async/__init__.py
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stompest/async/listener.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stompest/async/listener.py b/assembly/src/release/examples/stomp/python/stompest/async/listener.py
new file mode 100644
index 0000000..f9c7b2b
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stompest/async/listener.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+"""
+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.
+"""
+import os
+import sys
+import time
+
+from twisted.internet import defer, reactor
+
+from stompest.config import StompConfig
+from stompest.async import Stomp
+
+user = os.getenv('ACTIVEMQ_USER') or 'admin'
+password = os.getenv('ACTIVEMQ_PASSWORD') or 'password'
+host = os.getenv('ACTIVEMQ_HOST') or 'localhost'
+port = int(os.getenv('ACTIVEMQ_PORT') or 61613)
+destination = sys.argv[1:2] or ['/topic/event']
+destination = destination[0]
+
+messages = 10000
+
+class Listener(object):
+    @defer.inlineCallbacks
+    def run(self):
+        config = StompConfig('tcp://%s:%d' % (host, port), login=user, passcode=password, version='1.1')
+        client = Stomp(config)
+        yield client.connect(host='mybroker')
+        
+        self.count = 0
+        self.start = time.time()
+        client.subscribe(destination, self.handleFrame, headers={'ack': 'auto', 'id': 'required-for-STOMP-1.1'}, ack=False)
+        
+    @defer.inlineCallbacks
+    def handleFrame(self, client, frame):
+        self.count += 1
+        if self.count == messages:
+            self.stop(client)
+    
+    @defer.inlineCallbacks
+    def stop(self, client):
+        print 'Disconnecting. Waiting for RECEIPT frame ...',
+        yield client.disconnect(receipt='bye')
+        print 'ok'
+        
+        diff = time.time() - self.start
+        print 'Received %s frames in %f seconds' % (self.count, diff)
+        reactor.stop()
+
+if __name__ == '__main__':
+    Listener().run()
+    reactor.run()

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stompest/async/publisher.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stompest/async/publisher.py b/assembly/src/release/examples/stomp/python/stompest/async/publisher.py
new file mode 100644
index 0000000..4adc820
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stompest/async/publisher.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+"""
+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.
+"""
+import os
+import sys
+import time
+
+from twisted.internet import defer, reactor
+
+from stompest.config import StompConfig
+from stompest.async import Stomp
+
+user = os.getenv('ACTIVEMQ_USER') or 'admin'
+password = os.getenv('ACTIVEMQ_PASSWORD') or 'password'
+host = os.getenv('ACTIVEMQ_HOST') or 'localhost'
+port = int(os.getenv('ACTIVEMQ_PORT') or 61613)
+destination = sys.argv[1:2] or ['/topic/event']
+destination = destination[0]
+
+messages = 10000
+data = 'Hello World from Python'
+
+@defer.inlineCallbacks
+def run():
+    config = StompConfig('tcp://%s:%d' % (host, port), login=user, passcode=password, version='1.1')
+    client = Stomp(config)
+    yield client.connect(host='mybroker')
+
+    count = 0
+    start = time.time()
+    
+    for _ in xrange(messages):
+        client.send(destination=destination, body=data, headers={'persistent': 'false'})
+        count += 1
+
+    diff = time.time() - start
+    print 'Sent %s frames in %f seconds' % (count, diff)
+  
+    yield client.disconnect(receipt='bye')
+
+if __name__ == '__main__':
+    run()
+    reactor.run()


[09/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueRoundTrip/QueueRoundTrip.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueRoundTrip/QueueRoundTrip.java b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueRoundTrip/QueueRoundTrip.java
new file mode 100644
index 0000000..9732501
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueRoundTrip/QueueRoundTrip.java
@@ -0,0 +1,242 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Queue/PTP
+Send and receive using multiple sessions and a temporary queue
+
+This sample shows the round trip time for a message being sent to the broker
+and received. A temporary queue is used to guarantee that each instance of this
+sample receives its own messages only.
+
+Usage:
+
+    java QueueRoundTrip -b <broker:port> -u <username> -p <password> -n <numTests> -h
+        Optional Parameters:
+        -b  broker:port    Broker name and port of your message server
+                            Default: tcp://localhost:61616
+        -u  username       Default: user (username required)
+        -p  password       Default: password (not checked)
+        -n  numTests       The number of messages to be sent/received
+                           Default: 100
+        -h                 Prints help screen.
+ */
+import org.apache.activemq.*;
+
+
+public class QueueRoundTrip
+{
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_PASSWORD    = "password";
+    private static final String DEFAULT_USER_NAME   = "user";
+    private static final int DEFAULT_NUM_TESTS      = 100;
+
+    private static final int msgSize = 1400;
+    private static byte[] msgBody = new byte[msgSize];
+
+    private javax.jms.ConnectionFactory factory = null;
+    private javax.jms.Connection connection     = null;
+    private javax.jms.Session sendSession       = null;
+    private javax.jms.Session receiveSession    = null;
+    private javax.jms.MessageProducer sender    = null;
+    private javax.jms.MessageConsumer receiver  = null;
+
+    private void QueueRoundTripper(String broker, String username, String password, int numTests){
+
+        try
+        {
+            //Set up two sessions, one for sending and the other for receiving
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connection = factory.createConnection(username, password);
+            sendSession = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
+            receiveSession = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println ("error: Cannot connect to broker- " + broker + ".\n");
+            jmse.printStackTrace ();
+            System.exit(1);
+        }
+
+        try
+        {
+            //Set up a temporary Queue:
+            javax.jms.TemporaryQueue tempQueue = sendSession.createTemporaryQueue();
+            receiver = receiveSession.createConsumer(tempQueue);
+            sender = sendSession.createProducer(tempQueue);
+            connection.start();
+        }
+        catch (javax.jms.JMSException jmse){
+            System.err.println("error: Connection couldn't be started.\n");
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        //Send messages using Temporary Queue:
+        try {
+            System.out.println("QueueRoundTrip application:");
+            System.out.println("===========================");
+            System.out.println("Sending Messages to Temporary Queue...");
+
+            //create a message to send
+            javax.jms.BytesMessage msg = sendSession.createBytesMessage();
+            msg.writeBytes(msgBody);
+
+            //send and receive the message the specified number of times:
+            long time = System.currentTimeMillis();
+            for (int i = 0; i < numTests; i++){
+                sender.send(msg);
+                msg = (javax.jms.BytesMessage)receiver.receive();
+            }
+            time = System.currentTimeMillis()-time;
+
+            System.out.println("\nTime for " + numTests + " sends and receives:\t\t" +
+                                time + "ms\n" +
+                                "Average Time per message:\t\t\t" + (float)time/(float)numTests + "ms\n");
+            System.out.println("\n\nPress Enter to close this window.");
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            stdin.readLine();
+            System.exit(0);
+        }
+
+        catch (javax.jms.JMSException jmse) {
+            System.err.println("error: message not sent/received.\n");
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        catch (java.io.IOException ioe) {
+            ioe.printStackTrace();
+        }
+
+
+    }
+
+        /** Cleanup resources and then exit. */
+    private void exit()
+    {
+        try
+        {
+            connection.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    public static void main (String argv[])
+    {
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = DEFAULT_USER_NAME;
+        String password  = DEFAULT_PASSWORD;
+        int numTests = DEFAULT_NUM_TESTS;
+
+        // Check parameters
+        if(argv.length > 0){
+            for (int i = 0; i < argv.length; i++) {
+                String arg = argv[i];
+
+                // Options
+                if (!arg.startsWith("-")) {
+                    System.err.println ("error: unexpected argument - "+arg);
+                    printUsage();
+                    System.exit(1);
+                }
+                else {
+                    if (arg.equals("-b")) {
+                        if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                            System.err.println("error: missing broker name:port");
+                            System.exit(1);
+                        }
+                        broker = argv[++i];
+                        continue;
+                    }
+
+                    if (arg.equals("-u")) {
+                        if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                            System.err.println("error: missing user name");
+                            System.exit(1);
+                        }
+                        username = argv[++i];
+                        continue;
+                    }
+
+                    if (arg.equals("-p")) {
+                        if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                            System.err.println("error: missing password");
+                            System.exit(1);
+                        }
+                        password = argv[++i];
+                        continue;
+                    }
+                    if (arg.equals("-n")) {
+                        if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                            System.err.println("error: missing number of test to run.");
+                            System.exit(1);
+                        }
+                        numTests = (new Integer(argv[++i])).intValue();
+                        continue;
+                    }
+
+                    if (arg.equals("-h")) {
+                        printUsage();
+                        System.exit(1);
+                    }
+                }
+            }
+        }
+
+        // create the payload
+        byte charToWrite = (0x30);
+        for (int i = 0; i < msgSize; i++)
+        {
+            msgBody[i] = charToWrite;
+            charToWrite = (byte) ((int) charToWrite + (int) 0x01);
+            if (charToWrite == (0x39))
+            {
+                charToWrite = (0x30);
+            }
+        }
+
+        // Start the JMS client for the test.
+        QueueRoundTrip queueRoundTripper = new QueueRoundTrip();
+        queueRoundTripper.QueueRoundTripper(broker, username, password, numTests);
+
+    }
+
+    private static void printUsage()
+    {
+        StringBuffer use = new StringBuffer();
+
+        use.append("Usage:\n");
+        use.append("java QueueRoundTrip (options)...\n\n");
+        use.append("options:\n");
+        use.append("-b  broker:port    Broker name and port of your message server\n");
+        use.append("                   Default: tcp://localhost:61616\n");
+        use.append("-u  username       Default: user (username required)\n");
+        use.append("-p  password       Default: password (not checked)\n");
+        use.append("-n  numTests       The number of messages to be sent/received\n");
+        use.append("                   Default: 100\n");
+        use.append("-h                 This help screen");
+        System.err.println (use);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Replier.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Replier.java b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Replier.java
new file mode 100644
index 0000000..a7f521a
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Replier.java
@@ -0,0 +1,338 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application with Point-to-Point Queues,
+using:
+    - Synchronous Request/Reply
+    - javax.jms.QueueRequestor class
+    - JMSReplyTo Header
+
+When this program runs, it waits for messages on the queue,
+"SampleQ1" (by default).
+When that message arrives, a response based on the request
+is sent back to the "Requestor" specified in the JMSReplyTo header.
+
+This sample replies with a simple text manipulation of the request;
+the text is either folded to all UPPERCASE or all lowercase.
+
+Usage:
+  java Replier -b <broker:port> -u <username> -p <password> -qr <queue> -m <code>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+                     Default: SampleReplier
+      -p password    password for user (not checked)
+                     Default: password
+      -qr queue      name of queue for receiving requests
+                     Default:  Q1
+      -m mode        replier mode (uppercase, or lowercase)
+                     Default: uppercase
+
+Suggested demonstration:
+  - In a console window with the environment set,
+    start a copy of the Replier. For example:
+       java Replier -u SampleQReplier
+  - In another console window, start a Requestor.
+    For example:
+       java Requestor -u SampleQRequestor
+  - Enter text in the Requestor window then press Enter.
+    The Replier responds with the message in all uppercase characters.
+  - Start other Requestors with different user names to see that
+    replies are not broadcast to all users. For example:
+       java Requestor -u SampleRequestorFoo
+
+  - Start other Repliers.
+  - See that only one replier is receiving messages,(as it should).
+  - See the Requestor only receives one response.
+       java Replier -u toLower -m lowercase
+
+ */
+import org.apache.activemq.*;
+
+
+public class Replier
+    implements javax.jms.MessageListener
+{
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_USER_NAME = "SampleReplier";
+    private static final String DEFAULT_PASSWORD = "password";
+    private static final String DEFAULT_QUEUE = "Q1";
+    private static final String DEFAULT_MODE = "uppercase";
+    private static final int UPPERCASE = 0;
+    private static final int LOWERCASE = 1;
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session session = null;
+    private javax.jms.MessageProducer replier = null;
+
+    private int imode = UPPERCASE;
+
+    /** Create JMS client for sending and receiving messages. */
+    private void start ( String broker, String username, String password, String rQueue, String mode)
+    {
+        // Set the operation mode
+        imode = (mode.equals("uppercase")) ? UPPERCASE : LOWERCASE;
+
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            session = connect.createSession(true, javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Receivers to application queues as well as a Sender
+        // to use for JMS replies.
+        try
+        {
+            javax.jms.Queue queue = session.createQueue (rQueue);
+            javax.jms.MessageConsumer receiver = session.createConsumer(queue);
+            receiver.setMessageListener(this);
+            replier = session.createProducer(null);  // Queue will be set for each reply
+            // Now that all setup is complete, start the Connection
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+            exit();
+        }
+
+        try
+        {
+            // Read standard input waiting for "EXIT" command.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            while ( true )
+            {
+                   System.out.println ("\nReplier application:\n"
+			            					+ "============================\n"
+			            					+ "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+											+ "The application gets requests with JMSReplyTo set on the " + DEFAULT_QUEUE + " queue."
+											+ "The message is transformed to all uppercase or all lowercase, and then returned to the requestor."
+			                                + "The Requestor application displays the result.\n\n"
+			                                + "Enter EXIT or press Ctrl+C to close the Replier.\n");
+                String s = stdin.readLine();
+                if ( s == null || s.equalsIgnoreCase("EXIT"))
+                {
+                    System.out.println ("\nStopping Replier. Please wait..\n>");
+                    exit();
+                }
+           }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+    }
+
+    /**
+     * Handle the message.
+     * (as specified in the javax.jms.MessageListener interface).
+     *
+     * IMPORTANT NOTES:
+     * (1)We must follow the design paradigm for JMS
+     *    synchronous requests.  That is, we must:
+     *     - get the message
+     *     - look for the header specifying JMSReplyTo
+     *     - send a reply to the queue specified there.
+     *    Failing to follow these steps might leave the originator
+     *    of the request waiting forever.
+     * (2)Unlike the 'Talk' sample and others using an asynchronous
+     *    message listener, it is possible here to use ONLY
+     *    ONE SESSION because the messages being sent are sent from
+     *    the same thread of control handling message delivery. For
+     *    more information see the JMS spec v1.0.2 section 4.4.6.
+     *
+     * OPTIONAL BEHAVIOR: The following actions taken by the
+     * message handler represent good programming style, but are
+     * not required by the design paradigm for JMS requests.
+     *   - set the JMSCorrelationID (tying the response back to
+     *     the original request.
+     *   - use transacted session "commit" so receipt of request
+     *     won't happen without the reply being sent.
+     *
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( "[Request] " + string );
+
+                // Check for a ReplyTo Queue
+                javax.jms.Queue replyQueue = (javax.jms.Queue) aMessage.getJMSReplyTo();
+                if (replyQueue != null)
+                {
+                    // Send the modified message back.
+                    javax.jms.TextMessage reply =  session.createTextMessage();
+                    if (imode == UPPERCASE)
+                        reply.setText("Uppercasing-" + string.toUpperCase());
+                    else
+                        reply.setText("Lowercasing-" + string.toLowerCase());
+                    reply.setJMSCorrelationID(aMessage.getJMSMessageID());
+                    replier.send (replyQueue, reply);
+                    session.commit();
+                }
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources cleanly and exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = DEFAULT_USER_NAME;
+        String password  = DEFAULT_PASSWORD;
+        String queue     = DEFAULT_QUEUE;
+        String mode      = DEFAULT_MODE;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+
+            if (arg.equals("-b")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing broker name:port");
+                    System.exit(1);
+                }
+                broker = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-u")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing user name");
+                    System.exit(1);
+                }
+                username = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-p")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing password");
+                    System.exit(1);
+                }
+                password = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-qr")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing queue");
+                    System.exit(1);
+                }
+                queue = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-m")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing mode");
+                    System.exit(1);
+                }
+                mode = argv[++i];
+                if (!(mode.equals("uppercase") || mode.equals("lowercase"))) {
+                    System.err.println("error: mode must be 'uppercase' or 'lowercase'");
+                    System.exit(1);
+                }
+                continue;
+            }
+
+            if (arg.equals("-h")) {
+                printUsage();
+                System.exit(1);
+            }
+
+            // Invalid argument
+            System.err.println ("error: unexpected argument: "+arg);
+            printUsage();
+            System.exit(1);
+        }
+
+        // Start the JMS client.
+        Replier replier = new Replier ();
+        replier.start (broker, username, password, queue, mode);
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java Replier (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name.\n");
+        use.append("               Default broker: "+DEFAULT_USER_NAME+"\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -m mode      Replier operating mode - uppercase or lowercase.\n");
+        use.append("               Default mode: "+DEFAULT_MODE+"\n");
+        use.append("  -qr queue    Specify name of queue for receiving.\n");
+        use.append("               Default queue: "+DEFAULT_QUEUE+"\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Requestor.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Requestor.java b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Requestor.java
new file mode 100644
index 0000000..73a2338
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/RequestReply/Requestor.java
@@ -0,0 +1,247 @@
+/*
+Copyright 2001-2008, Progress Software Corporation -  All Rights Reserved
+
+Sample Application
+
+Writing a Basic JMS Application with Point-to-Point Queues,
+using:
+    - Synchronous Request/Reply
+    - javax.jms.QueueRequestor class
+    - JMSReplyTo Header
+
+When this program runs, it reads input from System.in
+and then sends the text as a message to the queue, "Q1"
+(by default).
+
+A "Replier" class should be waiting for the request.
+It will reply with a message.
+
+NOTE: Unlike the Publish-Subscribe example, you need
+not run the Replier first.  However, this Requestor
+will block until the Replier is started to service the queue.
+
+Usage:
+  java Requestor -b <broker:port> -u <username> -p <password> -qs <queue>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+                     Default: SampleRequestor
+      -p password    password for user (not checked)
+                     Default: password
+      -qs queue      name of queue for sending requests
+                     Default: SampleQ1
+
+Suggested demonstration:
+  - In a console window with the environment set,
+    start a copy of the Replier. For example:
+       java Replier -u SampleQReplier
+  - In another console window, start a Requestor.
+    For example:
+       java Requestor -u SampleQRequestor
+  - Enter text in the Requestor window then press Enter.
+    The Replier responds with the message in all uppercase characters.
+  - Start other Requestors with different user names to see that
+    replies are not broadcast to all users. For example:
+       java Requestor -u SampleRequestorFoo
+  - Start other Repliers.
+  - See that only one replier is receiving messages,(as it should).
+  - See the Requestor only receives one response.
+       java Replier -u toLower -m lowercase
+
+*/
+import org.apache.activemq.*;
+
+
+public class Requestor
+{
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_USER_NAME = "SampleRequestor";
+    private static final String DEFAULT_PASSWORD = "password";
+    private static final String DEFAULT_QUEUE = "Q1";
+
+    private javax.jms.QueueConnection connect = null;
+    private javax.jms.QueueSession session = null;
+    private javax.jms.QueueRequestor requestor = null;
+
+    /** Create JMS client for sending messages. */
+    private void start ( String broker, String username, String password, String sQueue)
+    {
+        // Create a connection.
+        try
+        {
+            javax.jms.QueueConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createQueueConnection (username, password);
+            session = connect.createQueueSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create the Queue and QueueRequestor for sending requests.
+        javax.jms.Queue queue = null;
+        try
+        {
+            queue = session.createQueue (sQueue);
+            requestor = new javax.jms.QueueRequestor(session, queue);
+
+            // Now that all setup is complete, start the Connection.
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+            exit();
+        }
+
+        try
+        {
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            System.out.println ("\nRequestor application:\n"
+			            					+ "============================\n"
+			            					+ "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+											+ "The application uses a QueueRequestor to on the " + DEFAULT_QUEUE + " queue."
+											+ "The Replier application gets the message, and transforms it."
+			                                + "The Requestor application displays the result.\n\n"
+			                                + "Type some mixed case text, and then press Enter to make a request.\n");
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if ( s.length() > 0 )
+                {
+                    javax.jms.TextMessage msg = session.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    // Instead of sending, we will use the QueueRequestor.
+                    javax.jms.Message response = requestor.request(msg);
+                    // The message should be a TextMessage.  Just report it.
+                    javax.jms.TextMessage textMessage = (javax.jms.TextMessage) response;
+                    System.out.println( "[Reply] " + textMessage.getText() );
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources cleanly and exit. */
+    private void exit()
+    {
+        try
+        {
+            requestor.close();
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = DEFAULT_USER_NAME;
+        String password  = DEFAULT_PASSWORD;
+        String queue     = DEFAULT_QUEUE;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+
+            if (arg.equals("-b")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing broker name:port");
+                    System.exit(1);
+                }
+                broker = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-u")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing user name");
+                    System.exit(1);
+                }
+                username = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-p")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing password");
+                    System.exit(1);
+                }
+                password = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-qs")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing queue");
+                    System.exit(1);
+                }
+                queue = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-h")) {
+                printUsage();
+                System.exit(1);
+            }
+
+            // Invalid argument
+            System.err.println ("error: unexpected argument: "+arg);
+            printUsage();
+            System.exit(1);
+        }
+
+        // Start the JMS client for sending requests.
+        Requestor requestor = new Requestor();
+        requestor.start (broker, username, password, queue);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java Requestor (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name.\n");
+        use.append("               Default broker: "+DEFAULT_USER_NAME+"\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -qs queue    Specify name of queue for sending.\n");
+        use.append("               Default queue: "+DEFAULT_QUEUE+"\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/SelectorTalk/SelectorTalk.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/SelectorTalk/SelectorTalk.java b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/SelectorTalk/SelectorTalk.java
new file mode 100644
index 0000000..f2609e7
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/SelectorTalk/SelectorTalk.java
@@ -0,0 +1,351 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application using Point-to-Point (Queues) with
+a Message Selector
+
+This sample starts up with a username, and the queues you are
+sending on, and receiving on.
+
+When messages are sent to a queue a property is set in the message header to
+a property value supplied on the command line. A separate command line
+value is used as a message selector for messages in the receive queue. In this
+sample we choose to create a property named "Department"
+
+Writing a line and pressing enter will send the message only to the
+indicated 'Talk' partner (or QueueReceiver).
+
+Usage:
+  java SelectorTalk -b <broker:port> -u <username> -p <password> -qs <queue> -qr <queue>
+            -s <selection>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+      -p password    password for user (not checked)
+      -qr queue      name of queue to receive
+      -qs queue      name of queue to send
+      -s selector    the message selection value
+
+You must specify either a queue for sending or receiving (or both) as well as
+a value with which to select received messages.
+
+
+Suggested demonstration:
+  - In separate console windows with the environment set,
+    start instances of the application under unique user names.
+    For example:
+       java SelectorTalk -u BOB -s SALES -qr  Q1 -qs  Q2
+       java SelectorTalk -u SALLY -s SALES -qr  Q2 -qs   Q1
+  - Enter text and then press Enter to send the message.
+  - See messages appear under the user's indicated name.
+  - Try changing the message selector on one console and note that it will
+    no longer receive messages.
+  - Stop a session by pressing CTRL+C in its console window.
+
+*/
+import org.apache.activemq.*;
+
+public class SelectorTalk
+    implements javax.jms.MessageListener
+{
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String PROPERTY_NAME = "Department";
+    private static final String DEFAULT_PASSWORD = "password";
+    private static final int    MESSAGE_LIFESPAN = 1800000;  // milliseconds (30 minutes)
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session sendSession = null;
+    private javax.jms.Session receiveSession = null;
+    private javax.jms.MessageProducer sender = null;
+
+    /** Create JMS client for sending and receiving messages. */
+    private void talker( String broker, String username, String password, String rQueue, String sQueue, String selection)
+    {
+        // Create a connection.
+        try
+         {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            sendSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            receiveSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Sender and Receiver 'Talk' queues
+        try
+        {
+            if (sQueue != null)
+            {
+                javax.jms.Queue sendQueue = sendSession.createQueue (sQueue);
+                sender = sendSession.createProducer(sendQueue);
+            }
+            if (rQueue != null)
+            {
+                //NOTE: the Queue Receiver is set up with the Message Selector:
+                javax.jms.Queue receiveQueue = receiveSession.createQueue (rQueue);
+                javax.jms.MessageConsumer qReceiver = receiveSession.createConsumer(receiveQueue, PROPERTY_NAME + " = \'" + selection + "\'");
+                qReceiver.setMessageListener(this);
+                connect.start();
+            }
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+            exit();
+        }
+
+        try
+        {
+            if (rQueue != null)
+               System.out.println ("");
+            else
+               System.out.println ("\nNo receiving queue specified.\n");
+
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            if (sQueue != null)
+                System.out.println ("SelectorTalk application:\n"
+			            	      + "=========================\n"
+			            	  + "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+							  + "The application will send messages with " + PROPERTY_NAME + " set to " + selection + " to the " + sQueue + " queue.\n"
+                              + "The application creates a receiver on the " + rQueue + " queue selecting only messages where " + PROPERTY_NAME + " is " + selection + ".\n\n"
+
+							  + "Type some text, and then press Enter to publish it as a TextMesssage from " + username + ".\n");
+            else
+                System.out.println ("\nPress CTRL-C to exit.\n");
+
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if ( s.length() > 0 && sQueue != null)
+                {
+                    javax.jms.TextMessage msg = sendSession.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    // NOTE: here we set the property for each sent message.
+                    msg.setStringProperty(PROPERTY_NAME, selection);
+                    sender.send( msg,
+                                 javax.jms.DeliveryMode.PERSISTENT,
+                                 javax.jms.Message.DEFAULT_PRIORITY,
+                                 MESSAGE_LIFESPAN);
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+        // Close the connection.
+        exit();
+    }
+
+    /**
+     * Handle the message
+     * (as specified in the javax.jms.MessageListener interface).
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( string );
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources and then exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    	= DEFAULT_BROKER_NAME;
+        String username  	= null;
+        String password  	= DEFAULT_PASSWORD;
+        String qSender		= null;
+        String qReceiver	= null;
+        String selection    = null;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+            // Options
+            if (!arg.startsWith("-")) {
+                System.err.println ("error: unexpected argument - "+arg);
+                printUsage();
+                System.exit(1);
+            }
+            else {
+                if (arg.equals("-b")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing broker name:port");
+                        System.exit(1);
+                    }
+                    broker = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-u")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing user name");
+                        System.exit(1);
+                    }
+                    username = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-p")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing password");
+                        System.exit(1);
+                    }
+                    password = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-qr")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing receive queue parameter");
+                        System.exit(1);
+                    }
+                    qReceiver = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-qs")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing send queue parameter");
+                        System.exit(1);
+                    }
+                    qSender = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-s")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing selectiion");
+                        System.exit(1);
+                    }
+                    selection = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-h")) {
+                    printUsage();
+                    System.exit(1);
+                }
+            }
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        if (qReceiver == null && qSender == null) {
+            System.err.println ("error: receive queue, or send queue, must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        if (selection == null) {
+            System.err.println ("error: selection must be supplied (e.g. -s SALES)\n");
+            printUsage();
+            System.exit(1);
+        }
+
+
+        // Start the JMS client for the "Talk".
+        SelectorTalk talk = new SelectorTalk();
+        talk.talker (broker, username, password, qReceiver, qSender, selection);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java SelectorTalk (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b  name:port Specify name:port of broker.\n");
+        use.append("                Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u  name      Specify unique user name. (Required)\n");
+        use.append("  -p  password  Specify password for user.\n");
+        use.append("                Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -qr queue     Specify queue for receiving messages.\n");
+        use.append("  -qs queue     Specify queue for sending messages.\n");
+        use.append("  -s  selection required, selection used to receive messages.\n");
+        use.append("  -h            This help screen.\n");
+        System.err.println (use);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/Talk/Talk.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/Talk/Talk.java b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/Talk/Talk.java
new file mode 100644
index 0000000..e849fcc
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/Talk/Talk.java
@@ -0,0 +1,332 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application using Point-to-Point (Queues).
+This sample starts up with a username, and the queues you are
+sending on, and receiving on.
+
+Writing a line and pressing enter will send the message only to the
+indicated 'Talk' partner (or QueueReceiver).
+
+Usage:
+  java Talk -b <broker:port> -u <username> -p <password> -qs <queue> -qr <queue>
+      -b broker:port points to your message broker
+                Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+      -p password    password for user (not checked)
+      -qr queue      name of queue to receive
+      -qs queue      name of queue to send
+
+You must specify either a queue for sending or receiving (or both).
+
+
+Suggested demonstration:
+  - In separate console windows with the environment set,
+    start instances of the application under unique user names.
+    For example:
+       java Talk -b localhost:2506 -u SALES -qr  Q1 -qs  Q2
+       java Talk -b localhost:2506 -u MARKETTING -qr  Q2 -qs  Q1
+  - Enter text and then press Enter to send the message.
+  - A message is consumed by only one of the receivers on a queue.
+  - Stop a session by pressing CTRL+C in its console window.
+
+*/
+import org.apache.activemq.*;
+
+
+public class Talk
+    implements javax.jms.MessageListener
+{
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_PASSWORD = "password";
+    private static final int    MESSAGE_LIFESPAN = 1800000;  // milliseconds (30 minutes)
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session sendSession = null;
+    private javax.jms.Session receiveSession = null;
+    private javax.jms.MessageProducer sender = null;
+
+    /** Create JMS client for sending and receiving messages. */
+    private void talker( String broker, String username, String password, String rQueue, String sQueue)
+    {
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            sendSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            receiveSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Sender and Receiver 'Talk' queues
+        try
+        {
+            if (sQueue != null)
+            {
+                javax.jms.Queue sendQueue = sendSession.createQueue (sQueue);
+                sender = sendSession.createProducer(sendQueue);
+            }
+            if (rQueue != null)
+            {
+                javax.jms.Queue receiveQueue = receiveSession.createQueue (rQueue);
+                javax.jms.MessageConsumer qReceiver = receiveSession.createConsumer(receiveQueue);
+                qReceiver.setMessageListener(this);
+                // Now that 'receive' setup is complete, start the Connection
+                connect.start();
+            }
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+            exit();
+        }
+
+        try
+        {
+            if (rQueue != null)
+               System.out.println ("");
+            else
+               System.out.println ("\nNo receiving queue specified.\n");
+
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            if (sQueue != null)
+                System.out.println ("\nTalk application:\n"
+            					+ "=================\n"
+            					+ "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+								+ "The application will send messages to the " + sQueue + " queue.\n"
+                                + "The application creates a receiver on the " + rQueue + " queue to consume any messages allocated to it.\n\n"
+                                + "Type some text, and then press Enter to send it as a TextMesssage from " + username + ".\n");
+
+            else
+                System.out.println ("\nPress CTRL-C to exit.\n");
+
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if ( s.length() > 0 && sQueue != null)
+                {
+                    javax.jms.TextMessage msg = sendSession.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    // Queues usually are used for PERSISTENT messages.
+                    // Hold messages for 30 minutes (1,800,000 millisecs).
+                    sender.send( msg,
+                                 javax.jms.DeliveryMode.PERSISTENT,
+                                 javax.jms.Message.DEFAULT_PRIORITY,
+                                 MESSAGE_LIFESPAN);
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+        // Close the connection.
+        exit();
+    }
+
+    /**
+     * Handle the message
+     * (as specified in the javax.jms.MessageListener interface).
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+             // Otherwise report that invalid message arrived.
+            if (aMessage instanceof javax.jms.TextMessage)
+            {
+            	javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            	// This handler reads a single String from the
+            	// message and prints it to the standard output.
+            	try
+            	{
+                	String string = textMessage.getText();
+                	System.out.println( string );
+           		}
+            	catch (javax.jms.JMSException jmse)
+            	{
+            	    jmse.printStackTrace();
+            	}
+          	}
+			else
+			{
+			    System.out.println ("Warning: A message was discarded because it could not be processed " +
+			                                    "as a javax.jms.TextMessage.");
+			 }
+
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources and then exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    	= DEFAULT_BROKER_NAME;
+        String username  	= null;
+        String password  	= DEFAULT_PASSWORD;
+        String qSender		= null;
+        String qReceiver	= null;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+            // Options
+            if (!arg.startsWith("-")) {
+                System.err.println ("error: unexpected argument - "+arg);
+                printUsage();
+                System.exit(1);
+            }
+            else {
+                if (arg.equals("-b")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing broker name:port");
+                        System.exit(1);
+                    }
+                    broker = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-u")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing user name");
+                        System.exit(1);
+                    }
+                    username = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-p")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing password");
+                        System.exit(1);
+                    }
+                    password = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-qr")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing receive queue parameter");
+                        System.exit(1);
+                    }
+                    qReceiver = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-qs")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing send queue parameter");
+                        System.exit(1);
+                    }
+                    qSender = argv[++i];
+                    continue;
+                }
+
+
+                if (arg.equals("-h")) {
+                    printUsage();
+                    System.exit(1);
+                }
+            }
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        if (qReceiver == null && qSender == null) {
+            System.err.println ("error: receive queue, or send queue, must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        // Start the JMS client for the "Talk".
+        Talk talk = new Talk();
+        talk.talker (broker, username, password, qReceiver, qSender);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java Talk (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name. (Required)\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -qr queue    Specify queue for receiving messages.\n");
+        use.append("  -qs queue    Specify queue for sending messages.\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/TransactedTalk/TransactedTalk.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/TransactedTalk/TransactedTalk.java b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/TransactedTalk/TransactedTalk.java
new file mode 100644
index 0000000..783a7f4
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/TransactedTalk/TransactedTalk.java
@@ -0,0 +1,360 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application with Point-to-Point Queues,
+using:
+    - Send and Receive
+    - Transacted Sessions
+    - Multiple Sessions
+
+This sample starts up with a username, and the queues you are
+sending on, and receiving on.
+
+Continue writing lines and pressing enter to buffer messages until a
+specific key word is used to confirm the messages or to completely
+forget them.
+
+Messages are buffered and sent when a specific string is seen ("COMMIT").
+Messages buffered can be discarded by entering a specified string ("CANCEL").
+
+Usage:
+  java TransactedTalk -b <broker:port> -u <username> -p <password> -qs <queue> -qr <queue>
+      -b broker:port points to your message broker
+                Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+      -p password    password for user (not checked)
+      -qr queue      name of queue to receive
+      -qs queue      name of queue to send
+
+You must specify either a queue for sending or receiving (or both).
+
+Suggested demonstration:
+  - In separate console windows with the environment set,
+    start instances of the application under unique user names.
+    For example:
+       java TransactedTalk -u OPERATIONS -qr  Q1 -qs  Q2
+       java TransactedTalk -u FACILITIES -qr  Q2 -qs  Q1
+  - Type some text and then press Enter.
+  - Repeat to create a batch of messages.
+  - Send the batched messages by entering the text "COMMIT"
+  - Discard the batched messages by entering the text "CANCEL"
+  - Stop a session by pressing CTRL+C in its console window.
+
+*/
+
+import org.apache.activemq.*;
+
+public class TransactedTalk
+    implements javax.jms.MessageListener
+{
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_PASSWORD = "password";
+    private static final int    MESSAGE_LIFESPAN = 1800000;  // milliseconds (30 minutes)
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session sendSession = null;
+    private javax.jms.Session receiveSession = null;
+    private javax.jms.MessageProducer sender = null;
+
+
+
+
+    /** Create JMS client for sending and receiving messages. */
+    private void talker( String broker, String username, String password, String rQueue, String sQueue)
+    {
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            // We want to be able up commit/rollback messages sent,
+            // but not affect messages received.  Therefore, we need two sessions.
+            sendSession = connect.createSession(true,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            receiveSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Sender and Receiver 'Talk' queues
+        try
+        {
+            if (sQueue != null)
+            {
+                javax.jms.Queue sendQueue = sendSession.createQueue (sQueue);
+                sender = sendSession.createProducer(sendQueue);
+            }
+            if (rQueue != null)
+            {
+                javax.jms.Queue receiveQueue = receiveSession.createQueue (rQueue);
+                javax.jms.MessageConsumer qReceiver = receiveSession.createConsumer(receiveQueue);
+                qReceiver.setMessageListener(this);
+                // Now that 'receive' setup is complete, start the Connection
+                connect.start();
+            }
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+            exit();
+        }
+
+        try
+        {
+            if (rQueue != null)
+               System.out.println ("");
+            else
+               System.out.println ("\nNo receiving queue specified.\n");
+
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+
+            if (sQueue != null){
+                    System.out.println ("TransactedTalk application:");
+	                System.out.println ("===========================" );
+                    System.out.println ("The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".");
+					System.out.println ("The application will stage messages to " + sQueue + " until you either commit them or roll them back.");
+				    System.out.println ("The application receives messages on " + rQueue + " to consume any committed messages sent there.\n");
+                    System.out.println ("1. Enter text to send and then press Enter to stage the message.");
+                    System.out.println ("2. Add a few messages to the transaction batch.");
+                    System.out.println ("3. Then, either:");
+                    System.out.println ("     o Enter the text 'COMMIT', and press Enter to send all the staged messages.");
+                    System.out.println ("     o Enter the text 'CANCEL', and press Enter to drop the staged messages waiting to be sent.");
+            }
+            else
+                System.out.println ("\nPress CTRL-C to exit.\n");
+
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if (s.trim().equals("CANCEL"))
+                {
+                    // Rollback the messages. A new transaction is implicitly
+                    // started for following messages.
+                    System.out.print ("Cancelling messages...");
+                    sendSession.rollback();
+                    System.out.println ("Staged messages have been cleared.");
+                }
+                else if ( s.length() > 0 && sQueue != null)
+                {
+                    javax.jms.TextMessage msg = sendSession.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    // Queues usually are used for PERSISTENT messages.
+                    // Hold messages for 30 minutes (1,800,000 millisecs).
+                    sender.send( msg,
+                                 javax.jms.DeliveryMode.PERSISTENT,
+                                 javax.jms.Message.DEFAULT_PRIORITY,
+                                 MESSAGE_LIFESPAN);
+                    // See if we should send the messages
+                    if (s.trim().equals("COMMIT"))
+                    {
+                        // Commit (send) the messages. A new transaction is
+                        // implicitly  started for following messages.
+                        System.out.print ("Committing messages...");
+                        sendSession.commit();
+                        System.out.println ("Staged messages have all been sent.");
+                    }
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+        // Close the connection.
+        exit();
+    }
+
+    /**
+     * Handle the message
+     * (as specified in the javax.jms.MessageListener interface).
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( string );
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources and then exit. */
+    private void exit()
+    {
+        try
+        {
+            sendSession.rollback(); // Rollback any uncommitted messages.
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    	= DEFAULT_BROKER_NAME;
+        String username  	= null;
+        String password  	= DEFAULT_PASSWORD;
+        String qSender		= null;
+        String qReceiver	= null;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+            // Options
+            if (!arg.startsWith("-")) {
+                System.err.println ("error: unexpected argument - "+arg);
+                printUsage();
+                System.exit(1);
+            }
+            else {
+                if (arg.equals("-b")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing broker name:port");
+                        System.exit(1);
+                    }
+                    broker = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-u")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing user name");
+                        System.exit(1);
+                    }
+                    username = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-p")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing password");
+                        System.exit(1);
+                    }
+                    password = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-qr")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing receive queue parameter");
+                        System.exit(1);
+                    }
+                    qReceiver = argv[++i];
+                    continue;
+                }
+
+                if (arg.equals("-qs")) {
+                    if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                        System.err.println("error: missing send queue parameter");
+                        System.exit(1);
+                    }
+                    qSender = argv[++i];
+                    continue;
+                }
+
+
+                if (arg.equals("-h")) {
+                    printUsage();
+                    System.exit(1);
+                }
+            }
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        if (qReceiver == null && qSender == null) {
+            System.err.println ("error: receive queue, or send queue, must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        // Start the JMS client for the "Talk".
+        TransactedTalk tranTalk = new TransactedTalk();
+        tranTalk.talker (broker, username, password, qReceiver, qSender);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java TransactedTalk (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name. (Required)\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -qr queue    Specify queue for receiving messages.\n");
+        use.append("  -qs queue    Specify queue for sending messages.\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/Chat/Chat.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/Chat/Chat.java b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/Chat/Chat.java
new file mode 100644
index 0000000..1ede2bc
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/TopicPubSubSamples/Chat/Chat.java
@@ -0,0 +1,262 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application using Publish and Subscribe
+
+This sample publishes and subscribes to a specified topic.
+Text you enter is published and then received by all subscribers.
+
+Usage:
+  java Chat -b <broker:port> -u <username> -p <password>
+      -b broker:port points to your message broker
+                     Default: tcp://localhost:61616
+      -u username    must be unique (but is not checked)
+      -p password    password for user (not checked)
+
+Suggested demonstration:
+  - In separate console windows with the environment set,
+    start instances of the application
+    under unique user names.
+    For example:
+       java Chat -b tcp://localhost:61616 -u SALES
+       java Chat -b tcp://localhost:61616 -u MARKETING
+  - Enter text and then press Enter to publish the message.
+  - See messages appear under the various user names as you
+    enter messages in each console window.
+  - Stop a session by pressing CTRL+C in its console window.
+
+*/
+import org.apache.activemq.*;
+
+public class Chat
+    implements javax.jms.MessageListener
+{
+    private static final String APP_TOPIC = "jms.samples.chat";
+    private static final String DEFAULT_USER = "Chatter";
+    private static final String DEFAULT_BROKER_NAME = "tcp://localhost:61616";
+    private static final String DEFAULT_PASSWORD = "password";
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session pubSession = null;
+    private javax.jms.Session subSession = null;
+    private javax.jms.MessageProducer publisher = null;
+
+    /** Create JMS client for publishing and subscribing to messages. */
+    private void chatter( String broker, String username, String password)
+    {
+        // Create a connection.
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+            connect = factory.createConnection (username, password);
+            pubSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+            subSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("error: Cannot connect to Broker - " + broker);
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Create Publisher and Subscriber to 'chat' topics
+        try
+        {
+            javax.jms.Topic topic = pubSession.createTopic (APP_TOPIC);
+            javax.jms.MessageConsumer subscriber = subSession.createConsumer(topic);
+            subscriber.setMessageListener(this);
+            publisher = pubSession.createProducer(topic);
+            // Now that setup is complete, start the Connection
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        try
+        {
+            // Read all standard input and send it as a message.
+            java.io.BufferedReader stdin =
+                new java.io.BufferedReader( new java.io.InputStreamReader( System.in ) );
+            System.out.println ("\nChat application:\n"
+            					+ "=================\n"
+            					+ "The application user " + username + " connects to the broker at " + DEFAULT_BROKER_NAME + ".\n"
+								+ "The application will publish messages to the " + APP_TOPIC + " topic.\n"
+                                + "The application also subscribes to that topic to consume any messages published there.\n\n"
+                                + "Type some text, and then press Enter to publish it as a TextMesssage from " + username + ".\n");
+            while ( true )
+            {
+                String s = stdin.readLine();
+
+                if ( s == null )
+                    exit();
+                else if ( s.length() > 0 )
+                {
+                    javax.jms.TextMessage msg = pubSession.createTextMessage();
+                    msg.setText( username + ": " + s );
+                    publisher.send( msg );
+                }
+            }
+        }
+        catch ( java.io.IOException ioe )
+        {
+            ioe.printStackTrace();
+        }
+        catch ( javax.jms.JMSException jmse )
+        {
+            jmse.printStackTrace();
+        }
+    }
+
+    /**
+     * Handle the message
+     * (as specified in the javax.jms.MessageListener interface).
+     */
+    public void onMessage( javax.jms.Message aMessage)
+    {
+        try
+        {
+            // Cast the message as a text message.
+            javax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;
+
+            // This handler reads a single String from the
+            // message and prints it to the standard output.
+            try
+            {
+                String string = textMessage.getText();
+                System.out.println( string );
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+        catch (java.lang.RuntimeException rte)
+        {
+            rte.printStackTrace();
+        }
+    }
+
+    /** Cleanup resources and then exit. */
+    private void exit()
+    {
+        try
+        {
+            connect.close();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            jmse.printStackTrace();
+        }
+
+        System.exit(0);
+    }
+
+    //
+    // NOTE: the remainder of this sample deals with reading arguments
+    // and does not utilize any JMS classes or code.
+    //
+
+    /** Main program entry point. */
+    public static void main(String argv[]) {
+
+        // Is there anything to do?
+        if (argv.length == 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        // Values to be read from parameters
+        String broker    = DEFAULT_BROKER_NAME;
+        String username  = null;
+        String password  = DEFAULT_PASSWORD;
+
+        // Check parameters
+        for (int i = 0; i < argv.length; i++) {
+            String arg = argv[i];
+
+
+            if (arg.equals("-b")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing broker name:port");
+                    System.exit(1);
+                }
+                broker = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-u")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing user name");
+                    System.exit(1);
+                }
+                username = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-p")) {
+                if (i == argv.length - 1 || argv[i+1].startsWith("-")) {
+                    System.err.println("error: missing password");
+                    System.exit(1);
+                }
+                password = argv[++i];
+                continue;
+            }
+
+            if (arg.equals("-h")) {
+                printUsage();
+                System.exit(1);
+            }
+
+            // Invalid argument
+            System.err.println ("error: unexpected argument: "+arg);
+            printUsage();
+            System.exit(1);
+        }
+
+        // Check values read in.
+        if (username == null) {
+            System.err.println ("error: user name must be supplied");
+            printUsage();
+            System.exit(1);
+        }
+
+        // Start the JMS client for the "chat".
+        Chat chat = new Chat();
+        chat.chatter (broker, username, password);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage() {
+
+        StringBuffer use = new StringBuffer();
+        use.append("usage: java Chat (options) ...\n\n");
+        use.append("options:\n");
+        use.append("  -b name:port Specify name:port of broker.\n");
+        use.append("               Default broker: "+DEFAULT_BROKER_NAME+"\n");
+        use.append("  -u name      Specify unique user name. (Required)\n");
+        use.append("  -p password  Specify password for user.\n");
+        use.append("               Default password: "+DEFAULT_PASSWORD+"\n");
+        use.append("  -h           This help screen.\n");
+        System.err.println (use);
+    }
+
+}
+


[02/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/js/stomp.js
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/js/stomp.js b/assembly/src/release/examples/stomp/websocket/js/stomp.js
new file mode 100644
index 0000000..3e237f1
--- /dev/null
+++ b/assembly/src/release/examples/stomp/websocket/js/stomp.js
@@ -0,0 +1,379 @@
+// Generated by CoffeeScript 1.3.3
+(function() {
+  var Byte, Client, Frame, Stomp,
+    __hasProp = {}.hasOwnProperty;
+  
+  var MAX_FRAME_SIZE=16*1024;;
+  
+  Byte = {
+    LF: '\x0A',
+    NULL: '\x00'
+  };
+
+  Frame = (function() {
+
+    function Frame(command, headers, body) {
+      this.command = command;
+      this.headers = headers != null ? headers : {};
+      this.body = body != null ? body : '';
+    }
+
+    Frame.prototype.toString = function() {
+      var lines, name, value, _ref;
+      lines = [this.command];
+      _ref = this.headers;
+      for (name in _ref) {
+        if (!__hasProp.call(_ref, name)) continue;
+        value = _ref[name];
+        lines.push("" + name + ":" + value);
+      }
+      if (this.body) {
+        lines.push("content-length:" + ('' + this.body).length);
+      }
+      lines.push(Byte.LF + this.body);
+      return lines.join(Byte.LF);
+    };
+
+    Frame._unmarshallSingle = function(data) {
+      var body, chr, command, divider, headerLines, headers, i, idx, len, line, start, trim, _i, _j, _ref, _ref1;
+      divider = data.search(RegExp("" + Byte.LF + Byte.LF));
+      headerLines = data.substring(0, divider).split(Byte.LF);
+      command = headerLines.shift();
+      headers = {};
+      trim = function(str) {
+        return str.replace(/^\s+|\s+$/g, '');
+      };
+      line = idx = null;
+      for (i = _i = 0, _ref = headerLines.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+        line = headerLines[i];
+        idx = line.indexOf(':');
+        headers[trim(line.substring(0, idx))] = trim(line.substring(idx + 1));
+      }
+      body = '';
+      start = divider + 2;
+      if (headers['content-length']) {
+        len = parseInt(headers['content-length']);
+        body = ('' + data).substring(start, start + len);
+      } else {
+        chr = null;
+        for (i = _j = start, _ref1 = data.length; start <= _ref1 ? _j < _ref1 : _j > _ref1; i = start <= _ref1 ? ++_j : --_j) {
+          chr = data.charAt(i);
+          if (chr === Byte.NULL) {
+            break;
+          }
+          body += chr;
+        }
+      }
+      return new Frame(command, headers, body);
+    };
+
+    Frame.unmarshall = function(datas) {
+      var data;
+      return (function() {
+        var _i, _len, _ref, _results;
+        _ref = datas.split(RegExp("" + Byte.NULL + Byte.LF + "*"));
+        _results = [];
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          data = _ref[_i];
+          if ((data != null ? data.length : void 0) > 0) {
+            _results.push(Frame._unmarshallSingle(data));
+          }
+        }
+        return _results;
+      })();
+    };
+
+    Frame.marshall = function(command, headers, body) {
+      var frame;
+      frame = new Frame(command, headers, body);
+      return frame.toString() + Byte.NULL;
+    };
+
+    return Frame;
+
+  })();
+
+  Client = (function() {
+
+    function Client(ws) {
+      this.ws = ws;
+      this.ws.binaryType = "arraybuffer";
+      this.counter = 0;
+      this.connected = false;
+      this.heartbeat = {
+        outgoing: 10000,
+        incoming: 10000
+      };
+      this.subscriptions = {};
+    }
+
+    Client.prototype._transmit = function(command, headers, body) {
+      var out;
+      out = Frame.marshall(command, headers, body);
+      if (typeof this.debug === "function") {
+        this.debug(">>> " + out);
+      }
+      while( true) {
+        if( out.length > MAX_FRAME_SIZE ) {
+          this.ws.send(out.substring(0, MAX_FRAME_SIZE));
+          out = out.substring(MAX_FRAME_SIZE);
+        } else {
+          return this.ws.send(out);
+        }
+      }
+    };
+
+    Client.prototype._setupHeartbeat = function(headers) {
+      var serverIncoming, serverOutgoing, ttl, v, _ref, _ref1,
+        _this = this;
+      if ((_ref = headers.version) !== Stomp.VERSIONS.V1_1 && _ref !== Stomp.VERSIONS.V1_2) {
+        return;
+      }
+      _ref1 = (function() {
+        var _i, _len, _ref1, _results;
+        _ref1 = headers['heart-beat'].split(",");
+        _results = [];
+        for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+          v = _ref1[_i];
+          _results.push(parseInt(v));
+        }
+        return _results;
+      })(), serverOutgoing = _ref1[0], serverIncoming = _ref1[1];
+      if (!(this.heartbeat.outgoing === 0 || serverIncoming === 0)) {
+        ttl = Math.max(this.heartbeat.outgoing, serverIncoming);
+        if (typeof this.debug === "function") {
+          this.debug("send PING every " + ttl + "ms");
+        }
+        this.pinger = typeof window !== "undefined" && window !== null ? window.setInterval(function() {
+          _this.ws.send(Byte.LF);
+          return typeof _this.debug === "function" ? _this.debug(">>> PING") : void 0;
+        }, ttl) : void 0;
+      }
+      if (!(this.heartbeat.incoming === 0 || serverOutgoing === 0)) {
+        ttl = Math.max(this.heartbeat.incoming, serverOutgoing);
+        if (typeof this.debug === "function") {
+          this.debug("check PONG every " + ttl + "ms");
+        }
+        return this.ponger = typeof window !== "undefined" && window !== null ? window.setInterval(function() {
+          var delta;
+          delta = Date.now() - _this.serverActivity;
+          if (delta > ttl * 2) {
+            if (typeof _this.debug === "function") {
+              _this.debug("did not receive server activity for the last " + delta + "ms");
+            }
+            return _this._cleanUp();
+          }
+        }, ttl) : void 0;
+      }
+    };
+
+    Client.prototype.connect = function(login, passcode, connectCallback, errorCallback, vhost) {
+      var _this = this;
+      this.connectCallback = connectCallback;
+      if (typeof this.debug === "function") {
+        this.debug("Opening Web Socket...");
+      }
+      this.ws.onmessage = function(evt) {
+        var arr, c, data, frame, onreceive, _i, _len, _ref, _results;
+        data = typeof ArrayBuffer !== 'undefined' && evt.data instanceof ArrayBuffer ? (arr = new Uint8Array(evt.data), typeof _this.debug === "function" ? _this.debug("--- got data length: " + arr.length) : void 0, ((function() {
+          var _i, _len, _results;
+          _results = [];
+          for (_i = 0, _len = arr.length; _i < _len; _i++) {
+            c = arr[_i];
+            _results.push(String.fromCharCode(c));
+          }
+          return _results;
+        })()).join('')) : evt.data;
+        _this.serverActivity = Date.now();
+        if (data === Byte.LF) {
+          if (typeof _this.debug === "function") {
+            _this.debug("<<< PONG");
+          }
+          return;
+        }
+        if (typeof _this.debug === "function") {
+          _this.debug("<<< " + data);
+        }
+        _ref = Frame.unmarshall(data);
+        _results = [];
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          frame = _ref[_i];
+          switch (frame.command) {
+            case "CONNECTED":
+              if (typeof _this.debug === "function") {
+                _this.debug("connected to server " + frame.headers.server);
+              }
+              _this.connected = true;
+              _this._setupHeartbeat(frame.headers);
+              _results.push(typeof _this.connectCallback === "function" ? _this.connectCallback(frame) : void 0);
+              break;
+            case "MESSAGE":
+              onreceive = _this.subscriptions[frame.headers.subscription];
+              _results.push(typeof onreceive === "function" ? onreceive(frame) : void 0);
+              break;
+            case "RECEIPT":
+              _results.push(typeof _this.onreceipt === "function" ? _this.onreceipt(frame) : void 0);
+              break;
+            case "ERROR":
+              _results.push(typeof errorCallback === "function" ? errorCallback(frame) : void 0);
+              break;
+            default:
+              _results.push(typeof _this.debug === "function" ? _this.debug("Unhandled frame: " + frame) : void 0);
+          }
+        }
+        return _results;
+      };
+      this.ws.onclose = function() {
+        var msg;
+        msg = "Whoops! Lost connection to " + _this.ws.url;
+        if (typeof _this.debug === "function") {
+          _this.debug(msg);
+        }
+        return typeof errorCallback === "function" ? errorCallback(msg) : void 0;
+      };
+      return this.ws.onopen = function() {
+        var headers;
+        if (typeof _this.debug === "function") {
+          _this.debug('Web Socket Opened...');
+        }
+        headers = {
+          "accept-version": Stomp.VERSIONS.supportedVersions(),
+          "heart-beat": [_this.heartbeat.outgoing, _this.heartbeat.incoming].join(',')
+        };
+        if (vhost) {
+          headers.host = vhost;
+        }
+        if (login) {
+          headers.login = login;
+        }
+        if (passcode) {
+          headers.passcode = passcode;
+        }
+        return _this._transmit("CONNECT", headers);
+      };
+    };
+
+    Client.prototype.disconnect = function(disconnectCallback) {
+      this._transmit("DISCONNECT");
+      this.ws.onclose = null;
+      this._cleanUp();
+      return typeof disconnectCallback === "function" ? disconnectCallback() : void 0;
+    };
+
+    Client.prototype._cleanUp = function() {
+      this.ws.close();
+      this.connected = false;
+      if (this.pinger) {
+        if (typeof window !== "undefined" && window !== null) {
+          window.clearInterval(this.pinger);
+        }
+      }
+      if (this.ponger) {
+        return typeof window !== "undefined" && window !== null ? window.clearInterval(this.ponger) : void 0;
+      }
+    };
+
+    Client.prototype.send = function(destination, headers, body) {
+      if (headers == null) {
+        headers = {};
+      }
+      if (body == null) {
+        body = '';
+      }
+      headers.destination = destination;
+      return this._transmit("SEND", headers, body);
+    };
+
+    Client.prototype.subscribe = function(destination, callback, headers) {
+      if (headers == null) {
+        headers = {};
+      }
+      if (!headers.id) {
+        headers.id = "sub-" + this.counter++;
+      }
+      headers.destination = destination;
+      this.subscriptions[headers.id] = callback;
+      this._transmit("SUBSCRIBE", headers);
+      return headers.id;
+    };
+
+    Client.prototype.unsubscribe = function(id) {
+      delete this.subscriptions[id];
+      return this._transmit("UNSUBSCRIBE", {
+        id: id
+      });
+    };
+
+    Client.prototype.begin = function(transaction) {
+      return this._transmit("BEGIN", {
+        transaction: transaction
+      });
+    };
+
+    Client.prototype.commit = function(transaction) {
+      return this._transmit("COMMIT", {
+        transaction: transaction
+      });
+    };
+
+    Client.prototype.abort = function(transaction) {
+      return this._transmit("ABORT", {
+        transaction: transaction
+      });
+    };
+
+    Client.prototype.ack = function(messageID, subscription, headers) {
+      if (headers == null) {
+        headers = {};
+      }
+      headers["message-id"] = messageID;
+      headers.subscription = subscription;
+      return this._transmit("ACK", headers);
+    };
+
+    Client.prototype.nack = function(messageID, subscription, headers) {
+      if (headers == null) {
+        headers = {};
+      }
+      headers["message-id"] = messageID;
+      headers.subscription = subscription;
+      return this._transmit("NACK", headers);
+    };
+
+    return Client;
+
+  })();
+
+  Stomp = {
+    libVersion: "2.0.0-next",
+    VERSIONS: {
+      V1_0: '1.0',
+      V1_1: '1.1',
+      V1_2: '1.2',
+      supportedVersions: function() {
+        return '1.1,1.0';
+      }
+    },
+    client: function(url, protocols) {
+      var klass, ws;
+      if (protocols == null) {
+        protocols = ['v10.stomp', 'v11.stomp'];
+      }
+      klass = Stomp.WebSocketClass || WebSocket;
+      ws = new klass(url, protocols);
+      return new Client(ws);
+    },
+    over: function(ws) {
+      return new Client(ws);
+    },
+    Frame: Frame
+  };
+
+  if (typeof window !== "undefined" && window !== null) {
+    window.Stomp = Stomp;
+  } else {
+    exports.Stomp = Stomp;
+    Stomp.WebSocketClass = require('./test/server.mock.js').StompServerMock;
+  }
+
+}).call(this);

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/readme.md b/assembly/src/release/examples/stomp/websocket/readme.md
new file mode 100644
index 0000000..daf516a
--- /dev/null
+++ b/assembly/src/release/examples/stomp/websocket/readme.md
@@ -0,0 +1,18 @@
+## Overview
+
+This is an example of how use the 
+['stomp-websocket'](https://github.com/jmesnil/stomp-websocket) 
+JavaScript APIs with the ActiveMQ message broker.
+
+## Prereqs
+
+- Use a modern browser with WebSocket support like Chrome or WebKit
+
+## Running
+
+Run the ActiveMQ sever locally and then open the `index.html`
+in the current directory using a web browser.
+
+## Credits
+
+This example is a modified version of Jeff Mesnil's chat example.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/user-guide.html
----------------------------------------------------------------------
diff --git a/assembly/src/release/user-guide.html b/assembly/src/release/user-guide.html
deleted file mode 100755
index b8d31c2..0000000
--- a/assembly/src/release/user-guide.html
+++ /dev/null
@@ -1,189 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-    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>
-  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
-  <title>Getting Started</title>
-
-</head>
-<body>
-<h1>Getting Started<br>
-</h1>
-
-<p>
-Welcome to Apache ActiveMQ. This document gives you a quick overview of how to get started trying out Apache ActiveMQ.
-</p>
-
-<h2>Running the broker</h2>
-
-<p>
-From the binary distribution you can run the Apache ActiveMQ server via the bin/activemq command.
-If you're using Windows, just type
-</p>
-<pre>
-    cd bin
-    activemq.bat
-</pre>
-<p>
-On Unix-like systems, type
-</p>
-<pre>
-    ./bin/activemq console
-</pre>
-<p>to start the broker in foreground.</p>
-<p>
-The Apache ActiveMQ broker should now have started
-</p>
-<p>
-Tip: If you run the bin/activemq command without any arguments it will output usage.
-</p>
-
-To stop the broker you can press ctrl + c to stop the process.
-
-<h2>Running the broker in the background</h2>
-
-<p>
-The broker can be started as a background process via the bin/activemq command
-on Unix-like systems, type
-</p>
-<pre>
-    ./bin/activemq start
-</pre>
-<p>to start the broker in background. The broker will write to its log in the data/activemq.log file.</p>
-
-<h2>Stopping the broker</h2>
-
-<p>
-The broker can be stopped via the bin/activemq command
-If you're using Windows, just type
-</p>
-<pre>
-    cd bin
-    activemq.bat stop
-</pre>
-<p>
-On Unix-like systems, type
-</p>
-<pre>
-    ./bin/activemq stop
-</pre>
-<p>to stop the broker.
-
-
-<h2>Access the web console</h2>
-
-In a web browser you can access the url <a href="http://0.0.0.0:8161/admin">http://0.0.0.0:8161/admin</a> to access the ActiveMQ web console.
-<br/>
-The broker may ask for credentials to login the web console the first time.
-The default username and password is admin/admin. You can configure this in the conf/jetty-real.properties file.
-
-<h2>Access the web demos</h2>
-
-You would need to start the broker with the demos included, which you do as follows:
-If you're using Windows, just type
-</p>
-<pre>
-    cd bin
-    activemq.bat console xbean:conf/activemq-demo.xml
-</pre>
-<p>
-On Unix-like systems, type
-</p>
-<pre>
-    ./bin/activemq console xbean:conf/activemq-demo.xml
-</pre>
-
-In a web browser you can access the url <a href="http://0.0.0.0:8161/demo">http://0.0.0.0:8161/demo</a> to access the ActiveMQ web demos.
-<br/>
-The broker may ask for credentials to login the web console the first time.
-The default username and password is admin/admin. You can configure this in the conf/jetty-real.properties file.
-
-
-<h2>Running the example programs</h2>
-
-<p>
-To run the demo producer/consumer tools, you need Java and Ant installed.
-</p>
-
-<h3>Installing Ant</h3>
-
-
-<p>
-The example programs depend on <a href="http://ant.apache.org/">Ant</a> being installed. There are more detailed
-instructions on the Ant website - but essentially you need to follow these steps.
-</p>
-<ul>
-<li>
-JAVA_HOME must point to your JDK installation, such that $JAVA_HOME/bin contains the java executable and $JAVA_HOME/lib contains some jar files.
-</li>
-<li>
-ANT_HOME must point to where you installed Apache Ant (http://ant.apache.org)
-</li>
-<li>
-then you need to add $JAVA_HOME/bin and $ANT_HOME/bin to your PATH variable.
-</li>
-</ul>
-
-<p>
-To test this is all working, try typing
-</p>
-
-<pre>
-    java -version
-    cd example
-    ant -version
-</pre>
-
-<h3>Running the example producer and consumer</h3>
-
-<p>
-Once you've got Java and Ant installed correctly you should be able to run
-</p>
-
-<pre>
-    cd example
-    ant consumer
-</pre>
-
-<p>
-and in another shell
-</p>
-
-<pre>
-    cd example
-    ant producer
-</pre>
-
-<p>
-you can specify exact URLs to connect to via command like arguments. e.g.
-</p>
-
-<pre>
-    ant producer -Durl=tcp://somehost:port
-</pre>
-
-
-
-<h2>Further Readings</h2>
-
-You can find more details about Apache ActiveMQ at its website <a href="http://activemq.apache.org">http://activemq.apache.org</a>,
-as well the guide <a href="http://activemq.apache.org/version-5-getting-started.html">getting started</a> guide.
-
-</body>
-</html>
-
-

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-demo.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-demo.xml b/assembly/src/sample-conf/activemq-demo.xml
deleted file mode 100644
index 05a5380..0000000
--- a/assembly/src/sample-conf/activemq-demo.xml
+++ /dev/null
@@ -1,294 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Demonstrates various ActiveMQ configuration options
-
-    To run ActiveMQ with this configuration add xbean:conf/activemq-demo.xml to your command
-
-    e.g. $ bin/activemq console xbean:conf/activemq-demo.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-    <!--
-        Allows us to use system properties as variables in this configuration
-        file. For more information, see the Javadoc:
-
-        http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html
-    -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:${activemq.conf}/credentials.properties</value>
-        </property>
-    </bean>
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-
-        Tips:
-          - Change the brokerName attribute to something unique
-    -->
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="amq-broker" useJmx="true">
-
-        <!--
-            Examples of destination-specific policies using destination
-            names or wildcards. For more information, see:
-
-            http://activemq.apache.org/per-destination-policies.html
-            http://activemq.apache.org/destination-features.html
-            http://activemq.apache.org/slow-consumer-handling.html
-            http://activemq.apache.org/subscription-recovery-policy.html
-        -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <!--
-                        Limit ALL queues and topics to using 5mb of memory and turn on producer flow control
-                    -->
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="5mb"/>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="5mb">
-                        <dispatchPolicy>
-                            <!--
-                              Use total ordering, see:
-                                 http://activemq.apache.org/total-ordering.html
-                            -->
-                            <strictOrderDispatchPolicy/>
-                        </dispatchPolicy>
-                        <subscriptionRecoveryPolicy>
-                            <!--
-                                Upon subscription, receive the last image sent
-                                on the destination.
-                            -->
-                            <lastImageSubscriptionRecoveryPolicy/>
-                        </subscriptionRecoveryPolicy>
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!--
-            The managementContext is used to configure how ActiveMQ is exposed in
-            JMX. By default, ActiveMQ uses the MBean server that is started by
-            the JVM. For more information, see:
-
-            http://activemq.apache.org/jmx.html
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!--
-            The network connectors are used to create a network of brokers. For
-            more information, see:
-
-            http://activemq.apache.org/networks-of-brokers.html
-        -->
-        <!-- networkConnectors-->
-            <!--
-                This connector automatically discovers the other brokers using
-                IP multicast. Such discovery is possible only because the
-                openwire transport connector is advertised via the default IP
-                multicast group. For more information on multicast, see:
-
-                http://activemq.apache.org/multicast-transport-reference.html
-
-            <networkConnector name="default-nc" uri="multicast://default"/>
-            -->
-
-            <!--
-                Example of a static configuration. For more information, see:
-
-                http://activemq.apache.org/static-transport-reference.html
-
-            <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-            -->
-        <!-- /networkConnectors-->
-
-        <!--
-            Configure message persistence for the broker. The default persistence
-            mechanism is the AMQ store (identified by the amqPersistenceAdapter).
-            For more information, see:
-
-            http://activemq.apache.org/persistence.html
-        -->
-        <persistenceAdapter>
-             <kahaDB directory="${activemq.data}/dynamic-broker1/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" />
-        </persistenceAdapter>
-
-        <!--
-            Configure the following if you wish to use journaled JDBC for message
-            persistence.
-
-        <persistenceFactory>
-            <journalPersistenceAdapterFactory dataDirectory="${activemq.data}" dataSource="#postgres-ds"/>
-        </persistenceFactory>
-        -->
-
-        <!--
-            Configure the following if you wish to use non-journaled JDBC for message
-            persistence.
-
-        <persistenceAdapter>
-            <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
-        </persistenceAdapter>
-        -->
-
-        <!--
-            The sslContext can be used to configure broker-specific SSL properties.
-            For more information, see:
-
-            http://activemq.apache.org/how-do-i-use-ssl.html
-        -->
-        <sslContext>
-            <sslContext keyStore="file:${activemq.conf}/broker.ks"
-              keyStorePassword="password" trustStore="file:${activemq.conf}/broker.ts"
-              trustStorePassword="password"/>
-        </sslContext>
-
-
-        <!--
-            The systemUsage controls the maximum amount of space the broker will
-            use before slowing down producers. For more information, see:
-
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-        <systemUsage>
-          <systemUsage>
-            <memoryUsage>
-              <memoryUsage limit="20 mb" />
-            </memoryUsage>
-            <storeUsage>
-              <storeUsage limit="1 gb" />
-            </storeUsage>
-            <tempUsage>
-              <tempUsage limit="100 mb" />
-            </tempUsage>
-          </systemUsage>
-        </systemUsage>
-
-
-        <!--
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see:
-
-            http://activemq.apache.org/configuring-transports.html
-        -->
-        <transportConnectors>
-            <!-- Create a TCP transport that is advertised on via an IP multicast
-              group named default. -->
-            <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
-            <!-- Create a SSL transport. Make sure to configure the SSL options
-              via the system properties or the sslContext element. -->
-            <transportConnector name="ssl" uri="ssl://localhost:61617"/>
-            <!-- Create a STOMP transport for STOMP clients. -->
-            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
-            <!-- Create a Websocket transport for the websocket dmeo -->
-            <transportConnector name="ws" uri="ws://localhost:61614/" />
-        </transportConnectors>
-
-        <!-- destroy the spring context on shutdown to stop jetty -->
-        <shutdownHooks>
-            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
-        </shutdownHooks>
-
-    </broker>
-
-    <!--
-       Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
-       For more details see
-
-       http://activemq.apache.org/enterprise-integration-patterns.html
-    -->
-    <import resource="camel.xml"/>
-
-
-    <!--
-        An embedded servlet engine for serving up the Admin console and other demos.
-        For more information, see:
-
-          http://activemq.apache.org/web-console.html
-    -->
-    <import resource="jetty-demo.xml"/>
-
-
-    <!--
-        Uncomment to create a command agent to respond to message based admin
-        commands on the ActiveMQ.Agent topic. For more information, see:
-
-        http://activemq.apache.org/command-agent.html
-
-    <commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/>
-    -->
-
-
-    <!--
-        This xbean configuration file supports all the standard Spring XML
-        configuration options such as the following bean definitions.
-    -->
-
-    <!-- Postgres DataSource Sample Setup -->
-    <!--
-    <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
-      <property name="serverName" value="localhost"/>
-      <property name="databaseName" value="activemq"/>
-      <property name="portNumber" value="0"/>
-      <property name="user" value="activemq"/>
-      <property name="password" value="activemq"/>
-      <property name="dataSourceName" value="postgres"/>
-      <property name="initialConnections" value="1"/>
-      <property name="maxConnections" value="10"/>
-    </bean>
-    -->
-
-    <!-- MySql DataSource Sample Setup -->
-    <!--
-    <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-      <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-      <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
-      <property name="username" value="activemq"/>
-      <property name="password" value="activemq"/>
-      <property name="maxActive" value="200"/>
-      <property name="poolPreparedStatements" value="true"/>
-    </bean>
-    -->
-
-    <!-- Oracle DataSource Sample Setup -->
-    <!--
-    <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-      <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
-      <property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB"/>
-      <property name="username" value="scott"/>
-      <property name="password" value="tiger"/>
-      <property name="maxActive" value="200"/>
-      <property name="poolPreparedStatements" value="true"/>
-    </bean>
-    -->
-
-    <!-- Embedded Derby DataSource Sample Setup -->
-    <!--
-    <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-      <property name="databaseName" value="derbydb"/>
-      <property name="createDatabase" value="create"/>
-    </bean>
-    -->
-
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml b/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml
deleted file mode 100644
index 6666df7..0000000
--- a/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Create a dynamic network of brokers
-    For more information, see:
-
-    http://activemq.apache.org/networks-of-brokers.html
-
-    To run this example network of ActiveMQ brokers run
-
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
-
-    and
-
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
-
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker1" dataDirectory="${activemq.data}">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true"/>
-        </managementContext>
-
-        <!--
-            Configure network connector to use multicast protocol
-            For more information, see
-
-            http://activemq.apache.org/multicast-transport-reference.html
-        -->
-        <networkConnectors>
-          <networkConnector uri="multicast://default"
-            dynamicOnly="true"
-            networkTTL="3"
-            prefetchSize="1"
-            decreaseNetworkConsumerPriority="true" />
-        </networkConnectors>
-
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.data}/dynamic-broker1/kahadb"/>
-        </persistenceAdapter>
-
-        <!--  The maximum amount of space the broker will use before slowing down producers -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!--
-            The transport connectors ActiveMQ will listen to
-            Configure discovery URI to use multicast protocol
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default" />
-        </transportConnectors>
-
-
-    </broker>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml b/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml
deleted file mode 100644
index 3f8c951..0000000
--- a/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Create a dynamic network of brokers
-    For more information, see:
-
-    http://activemq.apache.org/networks-of-brokers.html
-
-    To run this example network of ActiveMQ brokers run
-
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
-
-    and
-
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
-
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker2" dataDirectory="${activemq.data}">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true" connectorPort="1100"/>
-        </managementContext>
-
-        <!--
-            Configure network connector to use multicast protocol
-            For more information, see
-
-            http://activemq.apache.org/multicast-transport-reference.html
-        -->
-        <networkConnectors>
-          <networkConnector uri="multicast://default"
-            dynamicOnly="true"
-            networkTTL="3"
-            prefetchSize="1"
-            decreaseNetworkConsumerPriority="true" />
-        </networkConnectors>
-
-
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.data}/dynamic-broker2/kahadb" />
-        </persistenceAdapter>
-
-        <!--  The maximum amount of space the broker will use before slowing down producers -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!--
-            The transport connectors ActiveMQ will listen to
-            Configure discovery URI to use multicast protocol
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618" discoveryUri="multicast://default" />
-        </transportConnectors>
-
-    </broker>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-jdbc-performance.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-jdbc-performance.xml b/assembly/src/sample-conf/activemq-jdbc-performance.xml
deleted file mode 100644
index da87933..0000000
--- a/assembly/src/sample-conf/activemq-jdbc-performance.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Use JDBC for message persistence
-    For more information, see:
-
-    http://activemq.apache.org/persistence.html
-
-    You need to add Derby database to your classpath in order to make this example work.
-    Download it from http://db.apache.org/derby/ and put it in the ${ACTIVEMQ_HOME}/lib/optional/ folder
-    Optionally you can configure any other RDBM as shown below
-
-    To run ActiveMQ with this configuration add xbean:conf/activemq-jdbc.xml to your command
-
-    e.g. $ bin/activemq console xbean:conf/activemq-jdbc.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <!-- Allows us to use system properties as variables in this configuration file -->
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-      <property name="locations">
-          <value>file:${activemq.conf}/credentials.properties</value>
-      </property>
-  </bean>
-
-  <broker useJmx="true" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core">
-
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" expireMessagesPeriod="0" prioritizedMessages="false">
-                </policyEntry>
-                <policyEntry queue=">" expireMessagesPeriod="0" prioritizedMessages="false">
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-    <!--
-        See more database locker options at http://activemq.apache.org/pluggable-storage-lockers.html
-    -->
-    <persistenceAdapter>
-       <!--  for mysql-ds below, add attribute: dataSource="#mysql-ds" -->
-       <jdbcPersistenceAdapter dataDirectory="${activemq.data}" cleanupPeriod="0" />
-    </persistenceAdapter>
-
-    <transportConnectors>
-       <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-    </transportConnectors>
-  </broker>
-
-
-
-  <!-- MySql DataSource Sample Setup -->
-  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
-    <property name="username" value="root"/>
-    <property name="password" value="root"/>
-    <property name="maxActive" value="200"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-jdbc.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-jdbc.xml b/assembly/src/sample-conf/activemq-jdbc.xml
deleted file mode 100644
index 0e49aa7..0000000
--- a/assembly/src/sample-conf/activemq-jdbc.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Use JDBC for message persistence
-    For more information, see:
-
-    http://activemq.apache.org/persistence.html
-
-    You need to add Derby database to your classpath in order to make this example work.
-    Download it from http://db.apache.org/derby/ and put it in the ${ACTIVEMQ_HOME}/lib/optional/ folder
-    Optionally you can configure any other RDBM as shown below
-
-    To run ActiveMQ with this configuration add xbean:conf/activemq-jdbc.xml to your command
-
-    e.g. $ bin/activemq console xbean:conf/activemq-jdbc.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <!-- Allows us to use system properties as variables in this configuration file -->
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-      <property name="locations">
-          <value>file:${activemq.conf}/credentials.properties</value>
-      </property>
-  </bean>
-
-  <broker useJmx="false" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core">
-
-    <!--
-        See more database locker options at http://activemq.apache.org/pluggable-storage-lockers.html
-    -->
-    <persistenceAdapter>
-       <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#derby-ds"/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-       <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-    </transportConnectors>
-  </broker>
-
-  <!-- Embedded Derby DataSource Sample Setup -->
-  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-    <property name="databaseName" value="derbydb"/>
-    <property name="createDatabase" value="create"/>
-  </bean>
-
-  <!-- Postgres DataSource Sample Setup -->
-  <!--
-  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
-    <property name="serverName" value="localhost"/>
-    <property name="databaseName" value="activemq"/>
-    <property name="portNumber" value="0"/>
-    <property name="user" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="dataSourceName" value="postgres"/>
-    <property name="initialConnections" value="1"/>
-    <property name="maxConnections" value="10"/>
-  </bean>
-  -->
-
-  <!-- MySql DataSource Sample Setup -->
-  <!--
-  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
-    <property name="username" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="maxActive" value="200"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-  -->
-
-  <!-- Oracle DataSource Sample Setup -->
-  <!--
-  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
-    <property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB"/>
-    <property name="username" value="scott"/>
-    <property name="password" value="tiger"/>
-    <property name="maxActive" value="200"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-  -->
-
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-leveldb-replicating.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-leveldb-replicating.xml b/assembly/src/sample-conf/activemq-leveldb-replicating.xml
deleted file mode 100644
index c8a6560..0000000
--- a/assembly/src/sample-conf/activemq-leveldb-replicating.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!-- START SNIPPET: example -->
-<beans
-        xmlns="http://www.springframework.org/schema/beans"
-        xmlns:amq="http://activemq.apache.org/schema/core"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:${activemq.conf}/credentials.properties</value>
-        </property>
-    </bean>
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="replicating-broker" dataDirectory="${activemq.data}" start="false" >
-
-        <!--
-            For better performances use VM cursor and small memory limit.
-            For more information, see:
-
-            http://activemq.apache.org/message-cursors.html
-
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry topic=">" producerFlowControl="true">
-                        <!-- The constantPendingMessageLimitStrategy is used to prevent
-                             slow topic consumers to block producers and affect other consumers
-                             by limiting the number of messages that are retained
-                             For more information, see:
-
-                             http://activemq.apache.org/slow-consumer-handling.html
-
-                        -->
-                        <pendingMessageLimitStrategy>
-                            <constantPendingMessageLimitStrategy limit="1000"/>
-                        </pendingMessageLimitStrategy>
-                    </policyEntry>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                        <!-- Use VM cursor for better latency
-                             For more information, see:
-
-                             http://activemq.apache.org/message-cursors.html
-
-                        <pendingQueuePolicy>
-                          <vmQueueCursor/>
-                        </pendingQueuePolicy>
-                        -->
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-
-        <!--
-            The managementContext is used to configure how ActiveMQ is exposed in
-            JMX. By default, ActiveMQ uses the MBean server that is started by
-            the JVM. For more information, see:
-
-            http://activemq.apache.org/jmx.html
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!--
-            Configure message persistence for the broker. The default persistence
-            mechanism is the KahaDB store. In this sample, we use level db with
-            replication. Zookeeper is used as the distributed coordinator, so you
-            must have a zookeeper ensemble (minimum 1) to run the broker with
-            this configuration.
-
-            http://activemq.apache.org/replicated-leveldb-store.html
-        -->
-        <persistenceAdapter>
-            <replicatedLevelDB
-                    directory="${activemq.data}"
-                    replicas="2"
-                    bind="tcp://0.0.0.0:61619"
-                    zkAddress="127.0.0.1:2181"
-                    zkPassword="password"
-                    zkPath="/activemq/leveldb-stores"
-                    />
-        </persistenceAdapter>
-
-
-        <!--
-          The systemUsage controls the maximum amount of space the broker will
-          use before slowing down producers. For more information, see:
-          http://activemq.apache.org/producer-flow-control.html
-          If using ActiveMQ embedded - the following limits could safely be used:
-
-      <systemUsage>
-          <systemUsage>
-              <memoryUsage>
-                  <memoryUsage limit="20 mb"/>
-              </memoryUsage>
-              <storeUsage>
-                  <storeUsage limit="1 gb"/>
-              </storeUsage>
-              <tempUsage>
-                  <tempUsage limit="100 mb"/>
-              </tempUsage>
-          </systemUsage>
-      </systemUsage>
-      -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="64 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="100 gb"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="50 gb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!--
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see:
-
-            http://activemq.apache.org/configuring-transports.html
-        -->
-        <transportConnectors>
-            <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
-            <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
-        </transportConnectors>
-
-        <!-- destroy the spring context on shutdown to stop jetty -->
-        <shutdownHooks>
-            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
-        </shutdownHooks>
-
-    </broker>
-
-    <!--
-        Enable web consoles, REST and Ajax APIs and demos
-
-        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
-    -->
-    <import resource="jetty.xml"/>
-
-</beans>
-        <!-- END SNIPPET: example -->

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-scalability.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-scalability.xml b/assembly/src/sample-conf/activemq-scalability.xml
deleted file mode 100644
index 89d41ef..0000000
--- a/assembly/src/sample-conf/activemq-scalability.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Tune ActiveMQ broker so it can handle large number of queues (tens of thousands)
-    For more information, see:
-    http://activemq.apache.org/how-do-i-configure-10s-of-1000s-of-queues-in-a-single-broker-.html
-
-    Be sure to make necessary changes in your startup script, to
-
-    1. Give broker enough memory
-    2. Disable dedicated task runner
-
-    e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
-
-    To run ActiveMQ with this configuration add xbean:conf/activemq-scalability.xml to your command
-    e.g. $ bin/activemq console xbean:conf/activemq-scalability.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="false" advisorySupport="false">
-
-        <!--
-            Turn on optimizedDispatch
-            For more information, see:
-            http://activemq.apache.org/per-destination-policies.html
-        -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" optimizedDispatch="true" />
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!--
-            Use KahaDB for persistence
-            For more information, see:
-            http://activemq.apache.org/kahadb.html
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.data}/kahadb" enableIndexWriteAsync="true"/>
-        </persistenceAdapter>
-
-        <!--
-            Use NIO transport
-            For more information, see:
-            http://activemq.apache.org/configuring-transports.html#ConfiguringTransports-TheNIOTransport
-        -->
-        <transportConnectors>
-            <transportConnector name="nio" uri="nio://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-security.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-security.xml b/assembly/src/sample-conf/activemq-security.xml
deleted file mode 100644
index 7b116ff..0000000
--- a/assembly/src/sample-conf/activemq-security.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<!--  
-    Secure ActiveMQ broker
-    For more information, see:
-    
-    http://activemq.apache.org/security.html
-    
-    Before you can run this configuration, you need to set ACTIVEMQ_ENCRYPTION_PASSWORD environment variable, like
-    
-    $ export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq
-    
-    For more information see: http://activemq.apache.org/encrypted-passwords.html
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-security.xml to your command
-    
-    e.g. $ bin/activemq console xbean:conf/activemq-security.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <!-- Allows us to use encrypted system properties as variables in this configuration file -->
-  <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
-    <property name="algorithm" value="PBEWithMD5AndDES" />
-    <property name="passwordEnvName" value="ACTIVEMQ_ENCRYPTION_PASSWORD" />
-  </bean>
-                                                                     
-  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
-    <property name="config" ref="environmentVariablesConfiguration" />
-  </bean>  
-    
-  <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer"> 
-      <constructor-arg ref="configurationEncryptor" /> 
-      <property name="location" value="file:${activemq.conf}/credentials-enc.properties"/> 
-  </bean> 
-  
-  <!--     
-    Use this configuration if you don't want to set encryptor password using environment variable
-    Note however, that with this solution your passwords can be easily decrypted once the encrypter password is known
-    
-  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
-     <property name="algorithm" value="PBEWithMD5AndDES"/>
-     <property name="password" value="activemq"/>
-  </bean> 
-  -->
-
-  <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" >
-
-    <managementContext>
-        <managementContext createConnector="true">
-            <property xmlns="http://www.springframework.org/schema/beans" name="environment">
-                <map xmlns="http://www.springframework.org/schema/beans">
-                    <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.password.file"
-                           value="${activemq.conf}/jmx.password"/>
-                    <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.access.file"
-                           value="${activemq.conf}/jmx.access"/>
-                </map>
-            </property>
-        </managementContext>
-    </managementContext>
-
-    <plugins>
-        <!-- Configure authentication; Username, passwords and groups -->
-        <simpleAuthenticationPlugin>
-            <users>
-                <authenticationUser username="system" password="${activemq.password}"
-                    groups="users,admins"/>
-                <authenticationUser username="user" password="${guest.password}"
-                    groups="users"/>
-                <authenticationUser username="guest" password="${guest.password}" groups="guests"/>
-            </users>
-        </simpleAuthenticationPlugin>
-
-
-      <!--  Lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry queue="TEST.Q" read="guests" write="guests" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-    
-    <transportConnectors>
-       <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-    </transportConnectors>
-
-    <!-- destroy the spring context on shutdown to stop jetty -->
-    <shutdownHooks>
-        <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
-    </shutdownHooks>
-
-  </broker>
-
-  <!-- Use Web applications and Camel in secured broker environment -->
-  <import resource="jetty.xml"/>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-specjms.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-specjms.xml b/assembly/src/sample-conf/activemq-specjms.xml
deleted file mode 100644
index 2c8349c..0000000
--- a/assembly/src/sample-conf/activemq-specjms.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-
-        advisories incurr a hit with every add connection|destination|producer|consumer
-          - client side:  providerUrl = tcp://localhost:61616?jms.watchTopicAdvisories=false
-        statistics have a small impact on concurrency so disable
-        schedualer has a small impact as it checks for the presence three properties on each message
-        jmx adds a bunch of wrapper classes
-
-        ACTIVEMQ_OPTS_MEMORY="-Xmx11g -Xms6g -Dorg.apache.activemq.UseDedicatedTaskRunner=false -Djava.util.logging.config.file=logging.properties -XX:+UseLargePages"
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost"
-        dataDirectory="${activemq.data}" deleteAllMessagesOnStartup="true"
-        advisorySupport="false"
-        enableStatistics="false"
-        schedulerSupport="false"
-        useJmx="false">
-
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <!--
-                    producerFlowControll thread unnecessary with no memory limits
-                    with no failover, no need to suppress duplicates so audit can be disabled
-                    message expiry thread unnecessary as normal dispatch will handle expiry
-                -->
-                <policyEntry topic=">" producerFlowControl="false" enableAudit="false" expireMessagesPeriod="0">
-                  <pendingSubscriberPolicy>
-                    <!-- keep all references in memory -->
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="false" enableAudit="false" expireMessagesPeriod="0">
-                  <pendingQueuePolicy>
-                    <!-- keep all references in memory -->
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-
-        <!--
-            The managementContext is used to configure how ActiveMQ is exposed in
-            JMX. By default, ActiveMQ uses the MBean server that is started by
-            the JVM. For more information, see:
-
-            http://activemq.apache.org/jmx.html
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <persistenceAdapter>
-            <!-- defer cleanup/checkpoint -->
-            <!-- write in max 62k chunks to max disk io bandwith -->
-            <!-- use small number of data files (seldom switch) -->
-            <!-- keep index off the disk (in cache) -->
-
-            <kahaDB directory="${activemq.data}/kahadb"
-                cleanupInterval="300000" checkpointInterval="50000"
-                journalMaxWriteBatchSize="62k"
-                journalMaxFileLength="1g"
-                indexCacheSize="100000" indexWriteBatchSize="100000"
-            />
-        </persistenceAdapter>
-
-        <!-- ensure there is loads or memory for destinations -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="2 g"/>
-                </memoryUsage>
-            </systemUsage>
-        </systemUsage>
-
-
-        <!--
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see:
-
-            http://activemq.apache.org/configuring-transports.html
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-static-network-broker1.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-static-network-broker1.xml b/assembly/src/sample-conf/activemq-static-network-broker1.xml
deleted file mode 100644
index 6503648..0000000
--- a/assembly/src/sample-conf/activemq-static-network-broker1.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Create a static network of brokers
-    For more information, see:
-
-    http://activemq.apache.org/networks-of-brokers.html
-
-    To run this example network of ActiveMQ brokers run
-
-    $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
-
-    and
-
-    $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
-
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.data}">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true"/>
-        </managementContext>
-
-        <!--
-            The store and forward broker networks ActiveMQ will listen to.
-            We'll leave it empty as duplex network will be configured by another broker
-            Take a look at activemq-static_network-broker2.xml for example
-        -->
-        <networkConnectors>
-        </networkConnectors>
-
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.data}/static-broker1/kahadb" />
-        </persistenceAdapter>
-
-        <!--  The maximum amount of space the broker will use before slowing down producers -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!-- The transport connectors ActiveMQ will listen to -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-static-network-broker2.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-static-network-broker2.xml b/assembly/src/sample-conf/activemq-static-network-broker2.xml
deleted file mode 100644
index 5f0d2da..0000000
--- a/assembly/src/sample-conf/activemq-static-network-broker2.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Create a static network of brokers
-    For more information, see:
-
-    http://activemq.apache.org/networks-of-brokers.html
-
-    To run this example network of ActiveMQ brokers run
-
-    $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
-
-    and
-
-    $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
-
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker2" dataDirectory="${activemq.data}">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true" connectorPort="1100"/>
-        </managementContext>
-
-        <!--
-            The store and forward broker networks ActiveMQ will listen to
-            Create a duplex connector to the first broker
-        -->
-        <networkConnectors>
-            <networkConnector uri="static:(tcp://localhost:61616)" duplex="true"/>
-        </networkConnectors>
-
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.data}/static-broker2/kahadb" />
-        </persistenceAdapter>
-
-        <!--  The maximum amount of space the broker will use before slowing down producers -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!-- The transport connectors ActiveMQ will listen to -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618"/>
-        </transportConnectors>
-
-    </broker>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/sample-conf/activemq-stomp.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-stomp.xml b/assembly/src/sample-conf/activemq-stomp.xml
deleted file mode 100644
index fccdf10..0000000
--- a/assembly/src/sample-conf/activemq-stomp.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!--
-    Use Stomp protocol
-
-    For better behavior under heavy usage, be sure to:
-
-    1. Give broker enough memory
-    2. Disable dedicated task runner
-
-    e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
-
-    To run ActiveMQ with this configuration add xbean:conf/activemq-stomp.xml to your command
-    e.g. $ bin/activemq console xbean:conf/activemq-stomp.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:${activemq.conf}/credentials.properties</value>
-        </property>
-    </bean>
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
-
-        <!--
-            For better performances use VM cursor and small memory limit.
-            For more information, see:
-
-            http://activemq.apache.org/message-cursors.html
-
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="false">
-                  <pendingSubscriberPolicy>
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="false">
-                  <!-- Use VM cursor for better latency
-                       For more information, see:
-
-                       http://activemq.apache.org/message-cursors.html
-
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  -->
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-
-        <!--
-            The managementContext is used to configure how ActiveMQ is exposed in
-            JMX. By default, ActiveMQ uses the MBean server that is started by
-            the JVM. For more information, see:
-
-            http://activemq.apache.org/jmx.html
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!--
-            Configure message persistence for the broker. The default persistence
-            mechanism is the KahaDB store (identified by the kahaDB tag).
-            For more information, see:
-
-            http://activemq.apache.org/persistence.html
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.data}/kahadb"/>
-        </persistenceAdapter>
-
-
-        <!--
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see:
-
-            http://activemq.apache.org/configuring-transports.html
-        -->
-        <transportConnectors>
-            <transportConnector name="stomp" uri="stomp://0.0.0.0:61612?transport.closeAsync=false"/>
-            <transportConnector name="stomp+nio" uri="stomp+nio://0.0.0.0:61613?transport.closeAsync=false"/>
-        </transportConnectors>
-
-        <!-- destroy the spring context on shutdown to stop jetty -->
-        <shutdownHooks>
-            <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
-        </shutdownHooks>
-
-    </broker>
-
-    <!--
-        Uncomment to enable Camel
-        Take a look at activemq-camel.xml for more details
-
-    <import resource="camel.xml"/>
-    -->
-
-    <!--
-        Enable web consoles, REST and Ajax APIs 
-        Take a look at activemq-jetty.xml for more details
-    -->
-    <import resource="jetty.xml"/>
-
-</beans>
\ No newline at end of file


[15/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/conf/web.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/conf/web.xml b/assembly/src/release/examples/conf/web.xml
new file mode 100644
index 0000000..e6452fb
--- /dev/null
+++ b/assembly/src/release/examples/conf/web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    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.
+-->
+
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+  <display-name>ActiveMQ Message Broker Web Application</display-name>
+
+  <description>
+        ActiveMQ web application to deploy the Broker in a servlet engine.
+  </description>
+
+  <context-param>
+    <param-name>brokerURI</param-name>
+    <param-value>/WEB-INF/activemq.xml</param-value>
+  </context-param>
+
+  <listener>
+    <listener-class>org.apache.activemq.web.SpringBrokerContextListener</listener-class>
+  </listener>
+</web-app>
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/java/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/java/pom.xml b/assembly/src/release/examples/mqtt/java/pom.xml
new file mode 100644
index 0000000..abb06ec
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/java/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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>
+  
+  <groupId>example</groupId>
+  <artifactId>mqtt-example</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  
+  <name>example</name>
+  <description>ActiveMQ MQTT Java Examples</description>
+
+  <repositories>
+    <repository>
+      <id>Fusesource Snapshots</id>
+      <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
+    </repository>
+  </repositories>
+  
+  <dependencies>
+    
+    <dependency>
+      <groupId>org.fusesource.mqtt-client</groupId>
+      <artifactId>mqtt-client</artifactId>
+      <version>${mqtt-client-version}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+
+      <!-- include all the dependencies into the jar so it's easier to execute the example -->
+      <plugin>
+        <groupId>org.fusesource.mvnplugins</groupId>
+        <artifactId>maven-uberize-plugin</artifactId>
+        <version>1.14</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals><goal>uberize</goal></goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+    </plugins>
+  </build>
+  
+</project>
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/java/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/java/readme.md b/assembly/src/release/examples/mqtt/java/readme.md
new file mode 100644
index 0000000..0210f1f
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/java/readme.md
@@ -0,0 +1,32 @@
+## Overview
+
+This is an example of how use the MQTT protocol with ActiveMQ.  
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    java -cp target/mqtt-example-0.1-SNAPSHOT.jar example.Listener
+
+In another terminal window run:
+
+    java -cp target/mqtt-example-0.1-SNAPSHOT.jar example.Publisher
+
+You can control to which stomp server the examples try to connect to by
+setting the following environment variables: 
+
+* `MQTT_HOST`
+* `MQTT_PORT`
+* `MQTT_USER`
+* `MQTT_PASSWORD`

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/java/src/main/java/example/Listener.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/java/src/main/java/example/Listener.java b/assembly/src/release/examples/mqtt/java/src/main/java/example/Listener.java
new file mode 100644
index 0000000..cd6b9c8
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/java/src/main/java/example/Listener.java
@@ -0,0 +1,123 @@
+/**
+ * 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 example;
+
+import org.fusesource.hawtbuf.*;
+import org.fusesource.mqtt.client.*;
+
+/**
+ * Uses an callback based interface to MQTT.  Callback based interfaces
+ * are harder to use but are slightly more efficient.
+ */
+class Listener {
+
+    public static void main(String []args) throws Exception {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "1883"));
+        final String destination = arg(args, 0, "/topic/event");
+
+
+        MQTT mqtt = new MQTT();
+        mqtt.setHost(host, port);
+        mqtt.setUserName(user);
+        mqtt.setPassword(password);
+
+
+        final CallbackConnection connection = mqtt.callbackConnection();
+        connection.listener(new org.fusesource.mqtt.client.Listener() {
+            long count = 0;
+            long start = System.currentTimeMillis();
+
+            public void onConnected() {
+            }
+            public void onDisconnected() {
+            }
+            public void onFailure(Throwable value) {
+                value.printStackTrace();
+                System.exit(-2);
+            }
+            public void onPublish(UTF8Buffer topic, Buffer msg, Runnable ack) {
+                String body = msg.utf8().toString();
+                if( "SHUTDOWN".equals(body)) {
+                    long diff = System.currentTimeMillis() - start;
+                    System.out.println(String.format("Received %d in %.2f seconds", count, (1.0*diff/1000.0)));
+                    connection.disconnect(new Callback<Void>() {
+                        @Override
+                        public void onSuccess(Void value) {
+                            System.exit(0);
+                        }
+                        @Override
+                        public void onFailure(Throwable value) {
+                            value.printStackTrace();
+                            System.exit(-2);
+                        }
+                    });
+                } else {
+                    if( count == 0 ) {
+                        start = System.currentTimeMillis();
+                    }
+                    if( count % 1000 == 0 ) {
+                        System.out.println(String.format("Received %d messages.", count));
+                    }
+                    count ++;
+                }
+            }
+        });
+        connection.connect(new Callback<Void>() {
+            @Override
+            public void onSuccess(Void value) {
+                Topic[] topics = {new Topic(destination, QoS.AT_LEAST_ONCE)};
+                connection.subscribe(topics, new Callback<byte[]>() {
+                    public void onSuccess(byte[] qoses) {
+                    }
+                    public void onFailure(Throwable value) {
+                        value.printStackTrace();
+                        System.exit(-2);
+                    }
+                });
+            }
+            @Override
+            public void onFailure(Throwable value) {
+                value.printStackTrace();
+                System.exit(-2);
+            }
+        });
+
+        // Wait forever..
+        synchronized (Listener.class) {
+            while(true)
+                Listener.class.wait();
+        }
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/java/src/main/java/example/Publisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/java/src/main/java/example/Publisher.java b/assembly/src/release/examples/mqtt/java/src/main/java/example/Publisher.java
new file mode 100644
index 0000000..c58866f
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/java/src/main/java/example/Publisher.java
@@ -0,0 +1,100 @@
+/**
+ * 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 example;
+
+import org.fusesource.hawtbuf.AsciiBuffer;
+import org.fusesource.hawtbuf.Buffer;
+import org.fusesource.hawtbuf.UTF8Buffer;
+import org.fusesource.mqtt.client.Future;
+import org.fusesource.mqtt.client.FutureConnection;
+import org.fusesource.mqtt.client.MQTT;
+import org.fusesource.mqtt.client.QoS;
+
+import java.util.LinkedList;
+
+/**
+ * Uses a Future based API to MQTT.
+ */
+class Publisher {
+
+    public static void main(String []args) throws Exception {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "1883"));
+        final String destination = arg(args, 0, "/topic/event");
+
+        int messages = 10000;
+        int size = 256;
+
+        String DATA = "abcdefghijklmnopqrstuvwxyz";
+        String body = "";
+        for( int i=0; i < size; i ++) {
+            body += DATA.charAt(i%DATA.length());
+        }
+       Buffer msg = new AsciiBuffer(body);
+
+        MQTT mqtt = new MQTT();
+        mqtt.setHost(host, port);
+        mqtt.setUserName(user);
+        mqtt.setPassword(password);
+
+        FutureConnection connection = mqtt.futureConnection();
+        connection.connect().await();
+
+        final LinkedList<Future<Void>> queue = new LinkedList<Future<Void>>();
+        UTF8Buffer topic = new UTF8Buffer(destination);
+        for( int i=1; i <= messages; i ++) {
+
+            // Send the publish without waiting for it to complete. This allows us
+            // to send multiple message without blocking..
+            queue.add(connection.publish(topic, msg, QoS.AT_LEAST_ONCE, false));
+
+            // Eventually we start waiting for old publish futures to complete
+            // so that we don't create a large in memory buffer of outgoing message.s
+            if( queue.size() >= 1000 ) {
+                queue.removeFirst().await();
+            }
+
+        }
+
+        queue.add(connection.publish(topic, new AsciiBuffer("SHUTDOWN"), QoS.AT_LEAST_ONCE, false));
+        while( !queue.isEmpty() ) {
+            queue.removeFirst().await();
+        }
+
+        connection.disconnect().await();
+
+        System.exit(0);
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.css b/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.css
new file mode 100644
index 0000000..5e1aee0
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.css
@@ -0,0 +1,610 @@
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover{color:#005580;text-decoration:underline;}
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
+.row:after{clear:both;}
+[class*="span"]{float:left;margin-left:20px;}
+.span1{width:60px;}
+.span2{width:140px;}
+.span3{width:220px;}
+.span4{width:300px;}
+.span5{width:380px;}
+.span6{width:460px;}
+.span7{width:540px;}
+.span8{width:620px;}
+.span9{width:700px;}
+.span10{width:780px;}
+.span11{width:860px;}
+.span12,.container{width:940px;}
+.offset1{margin-left:100px;}
+.offset2{margin-left:180px;}
+.offset3{margin-left:260px;}
+.offset4{margin-left:340px;}
+.offset5{margin-left:420px;}
+.offset6{margin-left:500px;}
+.offset7{margin-left:580px;}
+.offset8{margin-left:660px;}
+.offset9{margin-left:740px;}
+.offset10{margin-left:820px;}
+.offset11{margin-left:900px;}
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
+.row-fluid:after{clear:both;}
+.row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;}
+.row-fluid>[class*="span"]:first-child{margin-left:0;}
+.row-fluid .span1{width:6.382978723%;}
+.row-fluid .span2{width:14.89361702%;}
+.row-fluid .span3{width:23.404255317%;}
+.row-fluid .span4{width:31.914893614%;}
+.row-fluid .span5{width:40.425531911%;}
+.row-fluid .span6{width:48.93617020799999%;}
+.row-fluid .span7{width:57.446808505%;}
+.row-fluid .span8{width:65.95744680199999%;}
+.row-fluid .span9{width:74.468085099%;}
+.row-fluid .span10{width:82.97872339599999%;}
+.row-fluid .span11{width:91.489361693%;}
+.row-fluid .span12{width:99.99999998999999%;}
+.container{width:940px;margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
+.container:after{clear:both;}
+.container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
+.container-fluid:after{clear:both;}
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
+h1,h2,h3,h4,h5,h6{margin:0;font-weight:bold;color:#333333;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
+h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;}
+h4,h5,h6{line-height:18px;}
+h4{font-size:14px;}h4 small{font-size:12px;}
+h5{font-size:12px;}
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
+.page-header h1{line-height:1;}
+ul,ol{padding:0;margin:0 0 9px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;}
+ul.unstyled{margin-left:0;list-style:none;}
+dl{margin-bottom:18px;}
+dt,dd{line-height:18px;}
+dt{font-weight:bold;}
+dd{margin-left:9px;}
+hr{margin:18px 0;border:0;border-top:1px solid #e5e5e5;border-bottom:1px solid #ffffff;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+.muted{color:#999999;}
+abbr{font-size:90%;text-transform:uppercase;border-bottom:1px dotted #ddd;cursor:help;}
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;}
+small{font-size:100%;}
+cite{font-style:normal;}
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:3px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;}pre.prettyprint{margin-bottom:18px;}
+pre code{padding:0;background-color:transparent;}
+form{margin:0 0 18px;}
+fieldset{padding:0;margin:0;border:0;}
+legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}
+label,input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;}
+label{display:block;margin-bottom:5px;color:#333333;}
+input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.uneditable-textarea{width:auto;height:auto;}
+label input,label textarea,label select{display:block;}
+input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:0;cursor:pointer;border-radius:0 \0/;}
+input[type="file"]{padding:initial;line-height:initial;border:initial;background-color:#ffffff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;}
+select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;}
+select{width:220px;background-color:#ffffff;}
+select[multiple],select[size]{height:auto;}
+input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+textarea{height:auto;}
+input[type="hidden"]{display:none;}
+.radio,.checkbox{padding-left:18px;}
+.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;}
+.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
+.radio.inline,.checkbox.inline{display:inline-block;margin-bottom:0;vertical-align:middle;}
+.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
+.controls>.radio.inline:first-child,.controls>.checkbox.inline:first-child{padding-top:0;}
+input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}
+input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;}
+input[type="file"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.input-mini{width:60px;}
+.input-small{width:90px;}
+.input-medium{width:150px;}
+.input-large{width:210px;}
+.input-xlarge{width:270px;}
+.input-xxlarge{width:530px;}
+input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0;}
+input.span1,textarea.span1,.uneditable-input.span1{width:50px;}
+input.span2,textarea.span2,.uneditable-input.span2{width:130px;}
+input.span3,textarea.span3,.uneditable-input.span3{width:210px;}
+input.span4,textarea.span4,.uneditable-input.span4{width:290px;}
+input.span5,textarea.span5,.uneditable-input.span5{width:370px;}
+input.span6,textarea.span6,.uneditable-input.span6{width:450px;}
+input.span7,textarea.span7,.uneditable-input.span7{width:530px;}
+input.span8,textarea.span8,.uneditable-input.span8{width:610px;}
+input.span9,textarea.span9,.uneditable-input.span9{width:690px;}
+input.span10,textarea.span10,.uneditable-input.span10{width:770px;}
+input.span11,textarea.span11,.uneditable-input.span11{width:850px;}
+input.span12,textarea.span12,.uneditable-input.span12{width:930px;}
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
+.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
+.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;}
+.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
+.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
+.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;}
+.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
+.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
+.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;}
+.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
+input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
+.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;}
+.uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
+:-moz-placeholder{color:#999999;}
+::-webkit-input-placeholder{color:#999999;}
+.help-block{margin-top:5px;margin-bottom:0;color:#999999;}
+.help-inline{display:inline-block;*display:inline;*zoom:1;margin-bottom:9px;vertical-align:middle;padding-left:5px;}
+.input-prepend,.input-append{margin-bottom:5px;*zoom:1;}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;content:"";}
+.input-prepend:after,.input-append:after{clear:both;}
+.input-prepend input,.input-append input,.input-prepend .uneditable-input,.input-append .uneditable-input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2;}
+.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;}
+.input-prepend .add-on,.input-append .add-on{float:left;display:block;width:auto;min-width:16px;height:18px;margin-right:-1px;padding:4px 5px;font-weight:normal;line-height:18px;color:#999999;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
+.input-prepend .add-on{*margin-top:1px;}
+.input-append input,.input-append .uneditable-input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-append .uneditable-input{border-right-color:#ccc;}
+.input-append .add-on{margin-right:0;margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.input-append input:first-child{*margin-left:-160px;}.input-append input:first-child+.add-on{*margin-left:-21px;}
+.search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;}
+.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input{display:inline-block;margin-bottom:0;}
+.form-search label,.form-inline label,.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{display:inline-block;}
+.form-search .input-append .add-on,.form-inline .input-prepend .add-on,.form-search .input-append .add-on,.form-inline .input-prepend .add-on{vertical-align:middle;}
+.control-group{margin-bottom:9px;}
+.form-horizontal legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;}
+.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}
+.form-horizontal .control-group:after{clear:both;}
+.form-horizontal .control-group>label{float:left;width:140px;padding-top:5px;text-align:right;}
+.form-horizontal .controls{margin-left:160px;}
+.form-horizontal .form-actions{padding-left:160px;}
+table{max-width:100%;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;border-top:1px solid #ddd;}
+.table th{font-weight:bold;vertical-align:bottom;}
+.table td{vertical-align:top;}
+.table thead:first-child tr th,.table thead:first-child tr td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #ddd;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th+th,.table-bordered td+td,.table-bordered th+td,.table-bordered td+th{border-left:1px solid #ddd;}
+.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+table .span1{float:none;width:44px;margin-left:0;}
+table .span2{float:none;width:124px;margin-left:0;}
+table .span3{float:none;width:204px;margin-left:0;}
+table .span4{float:none;width:284px;margin-left:0;}
+table .span5{float:none;width:364px;margin-left:0;}
+table .span6{float:none;width:444px;margin-left:0;}
+table .span7{float:none;width:524px;margin-left:0;}
+table .span8{float:none;width:604px;margin-left:0;}
+table .span9{float:none;width:684px;margin-left:0;}
+table .span10{float:none;width:764px;margin-left:0;}
+table .span11{float:none;width:844px;margin-left:0;}
+table .span12{float:none;width:924px;margin-left:0;}
+[class^="icon-"]{display:inline-block;width:14px;height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child{*margin-left:0;}
+.icon-white{background-image:url(../img/glyphicons-halflings-white.png);}
+.icon-glass{background-position:0 0;}
+.icon-music{background-position:-24px 0;}
+.icon-search{background-position:-48px 0;}
+.icon-envelope{background-position:-72px 0;}
+.icon-heart{background-position:-96px 0;}
+.icon-star{background-position:-120px 0;}
+.icon-star-empty{background-position:-144px 0;}
+.icon-user{background-position:-168px 0;}
+.icon-film{background-position:-192px 0;}
+.icon-th-large{background-position:-216px 0;}
+.icon-th{background-position:-240px 0;}
+.icon-th-list{background-position:-264px 0;}
+.icon-ok{background-position:-288px 0;}
+.icon-remove{background-position:-312px 0;}
+.icon-zoom-in{background-position:-336px 0;}
+.icon-zoom-out{background-position:-360px 0;}
+.icon-off{background-position:-384px 0;}
+.icon-signal{background-position:-408px 0;}
+.icon-cog{background-position:-432px 0;}
+.icon-trash{background-position:-456px 0;}
+.icon-home{background-position:0 -24px;}
+.icon-file{background-position:-24px -24px;}
+.icon-time{background-position:-48px -24px;}
+.icon-road{background-position:-72px -24px;}
+.icon-download-alt{background-position:-96px -24px;}
+.icon-download{background-position:-120px -24px;}
+.icon-upload{background-position:-144px -24px;}
+.icon-inbox{background-position:-168px -24px;}
+.icon-play-circle{background-position:-192px -24px;}
+.icon-repeat{background-position:-216px -24px;}
+.icon-refresh{background-position:-240px -24px;}
+.icon-list-alt{background-position:-264px -24px;}
+.icon-lock{background-position:-287px -24px;}
+.icon-flag{background-position:-312px -24px;}
+.icon-headphones{background-position:-336px -24px;}
+.icon-volume-off{background-position:-360px -24px;}
+.icon-volume-down{background-position:-384px -24px;}
+.icon-volume-up{background-position:-408px -24px;}
+.icon-qrcode{background-position:-432px -24px;}
+.icon-barcode{background-position:-456px -24px;}
+.icon-tag{background-position:0 -48px;}
+.icon-tags{background-position:-25px -48px;}
+.icon-book{background-position:-48px -48px;}
+.icon-bookmark{background-position:-72px -48px;}
+.icon-print{background-position:-96px -48px;}
+.icon-camera{background-position:-120px -48px;}
+.icon-font{background-position:-144px -48px;}
+.icon-bold{background-position:-167px -48px;}
+.icon-italic{background-position:-192px -48px;}
+.icon-text-height{background-position:-216px -48px;}
+.icon-text-width{background-position:-240px -48px;}
+.icon-align-left{background-position:-264px -48px;}
+.icon-align-center{background-position:-288px -48px;}
+.icon-align-right{background-position:-312px -48px;}
+.icon-align-justify{background-position:-336px -48px;}
+.icon-list{background-position:-360px -48px;}
+.icon-indent-left{background-position:-384px -48px;}
+.icon-indent-right{background-position:-408px -48px;}
+.icon-facetime-video{background-position:-432px -48px;}
+.icon-picture{background-position:-456px -48px;}
+.icon-pencil{background-position:0 -72px;}
+.icon-map-marker{background-position:-24px -72px;}
+.icon-adjust{background-position:-48px -72px;}
+.icon-tint{background-position:-72px -72px;}
+.icon-edit{background-position:-96px -72px;}
+.icon-share{background-position:-120px -72px;}
+.icon-check{background-position:-144px -72px;}
+.icon-move{background-position:-168px -72px;}
+.icon-step-backward{background-position:-192px -72px;}
+.icon-fast-backward{background-position:-216px -72px;}
+.icon-backward{background-position:-240px -72px;}
+.icon-play{background-position:-264px -72px;}
+.icon-pause{background-position:-288px -72px;}
+.icon-stop{background-position:-312px -72px;}
+.icon-forward{background-position:-336px -72px;}
+.icon-fast-forward{background-position:-360px -72px;}
+.icon-step-forward{background-position:-384px -72px;}
+.icon-eject{background-position:-408px -72px;}
+.icon-chevron-left{background-position:-432px -72px;}
+.icon-chevron-right{background-position:-456px -72px;}
+.icon-plus-sign{background-position:0 -96px;}
+.icon-minus-sign{background-position:-24px -96px;}
+.icon-remove-sign{background-position:-48px -96px;}
+.icon-ok-sign{background-position:-72px -96px;}
+.icon-question-sign{background-position:-96px -96px;}
+.icon-info-sign{background-position:-120px -96px;}
+.icon-screenshot{background-position:-144px -96px;}
+.icon-remove-circle{background-position:-168px -96px;}
+.icon-ok-circle{background-position:-192px -96px;}
+.icon-ban-circle{background-position:-216px -96px;}
+.icon-arrow-left{background-position:-240px -96px;}
+.icon-arrow-right{background-position:-264px -96px;}
+.icon-arrow-up{background-position:-289px -96px;}
+.icon-arrow-down{background-position:-312px -96px;}
+.icon-share-alt{background-position:-336px -96px;}
+.icon-resize-full{background-position:-360px -96px;}
+.icon-resize-small{background-position:-384px -96px;}
+.icon-plus{background-position:-408px -96px;}
+.icon-minus{background-position:-433px -96px;}
+.icon-asterisk{background-position:-456px -96px;}
+.icon-exclamation-sign{background-position:0 -120px;}
+.icon-gift{background-position:-24px -120px;}
+.icon-leaf{background-position:-48px -120px;}
+.icon-fire{background-position:-72px -120px;}
+.icon-eye-open{background-position:-96px -120px;}
+.icon-eye-close{background-position:-120px -120px;}
+.icon-warning-sign{background-position:-144px -120px;}
+.icon-plane{background-position:-168px -120px;}
+.icon-calendar{background-position:-192px -120px;}
+.icon-random{background-position:-216px -120px;}
+.icon-comment{background-position:-240px -120px;}
+.icon-magnet{background-position:-264px -120px;}
+.icon-chevron-up{background-position:-288px -120px;}
+.icon-chevron-down{background-position:-313px -119px;}
+.icon-retweet{background-position:-336px -120px;}
+.icon-shopping-cart{background-position:-360px -120px;}
+.icon-folder-close{background-position:-384px -120px;}
+.icon-folder-open{background-position:-408px -120px;}
+.icon-resize-vertical{background-position:-432px -119px;}
+.icon-resize-horizontal{background-position:-456px -118px;}
+.dropdown{position:relative;}
+.dropdown-toggle{*margin-bottom:-3px;}
+.dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
+.caret{display:inline-block;width:0;height:0;text-indent:-99999px;*text-indent:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000000;opacity:0.3;filter:alpha(opacity=30);content:"\2193";}
+.dropdown .caret{margin-top:8px;margin-left:2px;}
+.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100);}
+.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;max-width:220px;_width:160px;padding:4px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#ccc;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px;}
+.dropdown-menu .divider{height:1px;margin:5px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;}
+.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#555555;white-space:nowrap;}
+.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;}
+.dropdown.open{*z-index:1000;}.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
+.dropdown.open .dropdown-menu{display:block;}
+.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
+.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
+.collapse{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;position:relative;overflow:hidden;height:0;}.collapse.in{height:auto;}
+.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;opacity:0.4;filter:alpha(opacity=40);cursor:pointer;}
+.btn{display:inline-block;padding:4px 10px 4px;font-size:13px;line-height:18px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#fafafa;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow
 :inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);cursor:pointer;*margin-left:.3em;}.btn:first-child{*margin-left:0;}
+.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
+.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;color:rgba(0, 0, 0, 0.5);outline:0;}
+.btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.btn-large .icon{margin-top:1px;}
+.btn-small{padding:5px 9px;font-size:11px;line-height:16px;}
+.btn-small .icon{margin-top:-1px;}
+.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);color:#ffffff;}
+.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active{color:rgba(255, 255, 255, 0.75);}
+.btn-primary{background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-ms-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(top, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0044cc;}
+.btn-primary:active,.btn-primary.active{background-color:#003399 \9;}
+.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;}
+.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
+.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;}
+.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
+.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;}
+.btn-success:active,.btn-success.active{background-color:#408140 \9;}
+.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;}
+.btn-info:active,.btn-info.active{background-color:#24748c \9;}
+button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
+button.btn.large,input[type="submit"].btn.large{*padding-top:7px;*padding-bottom:7px;}
+button.btn.small,input[type="submit"].btn.small{*padding-top:3px;*padding-bottom:3px;}
+.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";}
+.btn-group:after{clear:both;}
+.btn-group:first-child{*margin-left:0;}
+.btn-group+.btn-group{margin-left:5px;}
+.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;}
+.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
+.btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
+.btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
+.btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
+.btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2;}
+.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
+.btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);*padding-top:5px;*padding-bottom:5px;}
+.btn-group.open{*z-index:1000;}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);}
+.btn .caret{margin-top:7px;margin-left:0;}
+.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);}
+.btn-primary .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret{border-top-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);}
+.btn-small .caret{margin-top:4px;}
+.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.alert,.alert-heading{color:#c09853;}
+.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;}
+.alert-success{background-color:#dff0d8;border-color:#d6e9c6;}
+.alert-success,.alert-success .alert-heading{color:#468847;}
+.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;}
+.alert-danger,.alert-error,.alert-danger .alert-heading,.alert-error .alert-heading{color:#b94a48;}
+.alert-info{background-color:#d9edf7;border-color:#bce8f1;}
+.alert-info,.alert-info .alert-heading{color:#3a87ad;}
+.alert-block{padding-top:14px;padding-bottom:14px;}
+.alert-block>p,.alert-block>ul{margin-bottom:0;}
+.alert-block p+p{margin-top:5px;}
+.nav{margin-left:0;margin-bottom:18px;list-style:none;}
+.nav>li>a{display:block;}
+.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
+.nav-list{padding-left:14px;padding-right:14px;margin-bottom:0;}
+.nav-list>li>a,.nav-list .nav-header{display:block;padding:3px 15px;margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
+.nav-list .nav-header{font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-transform:uppercase;}
+.nav-list>li+.nav-header{margin-top:9px;}
+.nav-list .active>a{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
+.nav-list .icon{margin-right:2px;}
+.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";}
+.nav-tabs:after,.nav-pills:after{clear:both;}
+.nav-tabs>li,.nav-pills>li{float:left;}
+.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
+.nav-tabs{border-bottom:1px solid #ddd;}
+.nav-tabs>li{margin-bottom:-1px;}
+.nav-tabs>li>a{padding-top:9px;padding-bottom:9px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;}
+.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
+.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.nav-pills .active>a,.nav-pills .active>a:hover{color:#ffffff;background-color:#0088cc;}
+.nav-stacked>li{float:none;}
+.nav-stacked>li>a{margin-right:0;}
+.nav-tabs.nav-stacked{border-bottom:0;}
+.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
+.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
+.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;}
+.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
+.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
+.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;}
+.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;margin-top:6px;}
+.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;}
+.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;}
+.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;}
+.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;}
+.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
+.tabs-stacked .open>a:hover{border-color:#999999;}
+.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";}
+.tabbable:after{clear:both;}
+.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;}
+.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
+.tab-content>.active,.pill-content>.active{display:block;}
+.tabs-below .nav-tabs{border-top:1px solid #ddd;}
+.tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;}
+.tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;}
+.tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;}
+.tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;}
+.tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
+.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
+.tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
+.tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
+.tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
+.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
+.tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
+.tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
+.navbar{overflow:visible;margin-bottom:18px;}
+.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
+.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box
 -shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;}
+.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;}
+.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
+.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
+.nav-collapse.collapse{height:auto;}
+.navbar .brand:hover{text-decoration:none;}
+.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;}
+.navbar .navbar-text{margin-bottom:0;line-height:40px;color:#999999;}.navbar .navbar-text a:hover{color:#ffffff;background-color:transparent;}
+.navbar .btn,.navbar .btn-group{margin-top:5px;}
+.navbar .btn-group .btn{margin-top:0;}
+.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";}
+.navbar-form:after{clear:both;}
+.navbar-form input,.navbar-form select{display:inline-block;margin-top:5px;margin-bottom:0;}
+.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
+.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
+.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;color:rgba(255, 255, 255, 0.75);background:#666;background:rgba(255, 255, 255, 0.3);border:1px solid #111;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query :-moz-placeholder{color:#eeeeee;}
+.navbar-search .search-query::-webkit-input-placeholder{color:#eeeeee;}
+.navbar-search .search-query:hover{color:#ffffff;background-color:#999999;background-color:rgba(255, 255, 255, 0.5);}
+.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
+.navbar-fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030;}
+.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
+.navbar .nav.pull-right{float:right;}
+.navbar .nav>li{display:block;float:left;}
+.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
+.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;}
+.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;background-color:rgba(0, 0, 0, 0.5);}
+.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;}
+.navbar .nav.pull-right{margin-left:10px;margin-right:0;}
+.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
+.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
+.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;}
+.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);}
+.navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;}
+.navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;}
+.navbar .nav.pull-right .dropdown-menu{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before{left:auto;right:12px;}
+.navbar .nav.pull-right .dropdown-menu:after{left:auto;right:13px;}
+.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
+.breadcrumb .divider{padding:0 5px;color:#999999;}
+.breadcrumb .active a{color:#333333;}
+.pagination{height:36px;margin:18px 0;}
+.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
+.pagination li{display:inline;}
+.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;}
+.pagination a:hover,.pagination .active a{background-color:#f5f5f5;}
+.pagination .active a{color:#999999;cursor:default;}
+.pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;}
+.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.pagination-centered{text-align:center;}
+.pagination-right{text-align:right;}
+.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";}
+.pager:after{clear:both;}
+.pager li{display:inline;}
+.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.pager a:hover{text-decoration:none;background-color:#f5f5f5;}
+.pager .next a{float:right;}
+.pager .previous a{float:left;}
+.modal-open .dropdown-menu{z-index:2050;}
+.modal-open .dropdown.open{*z-index:2050;}
+.modal-open .popover{z-index:2060;}
+.modal-open .tooltip{z-index:2070;}
+.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
+.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
+.modal{position:fixed;top:50%;left:50%;z-index:1050;max-height:500px;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
+.modal.fade.in{top:50%;}
+.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
+.modal-body{padding:15px;}
+.modal-footer{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";}
+.modal-footer:after{clear:both;}
+.modal-footer .btn{float:right;margin-left:5px;margin-bottom:0;}
+.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
+.tooltip.top{margin-top:-2px;}
+.tooltip.right{margin-left:2px;}
+.tooltip.bottom{margin-top:2px;}
+.tooltip.left{margin-left:-2px;}
+.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
+.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
+.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
+.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
+.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.tooltip-arrow{position:absolute;width:0;height:0;}
+.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;}
+.popover.right{margin-left:5px;}
+.popover.bottom{margin-top:5px;}
+.popover.left{margin-left:-5px;}
+.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
+.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
+.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
+.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
+.popover .arrow{position:absolute;width:0;height:0;}
+.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
+.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}
+.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;}
+.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";}
+.thumbnails:after{clear:both;}
+.thumbnails>li{float:left;margin:0 0 18px 20px;}
+.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}
+a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
+.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
+.thumbnail .caption{padding:9px;}
+.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;background-color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.label-important{background-color:#b94a48;}
+.label-warning{background-color:#f89406;}
+.label-success{background-color:#468847;}
+.label-info{background-color:#3a87ad;}
+@-webkit-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,
  0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s e
 ase;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
+.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-
 45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
+.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
+.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);}
+.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-l
 inear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);}
+.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-
 linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);}
+.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-lin
 ear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.accordion{margin-bottom:18px;}
+.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.accordion-heading{border-bottom:0;}
+.accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
+.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
+.carousel{position:relative;margin-bottom:18px;line-height:1;}
+.carousel-inner{overflow:hidden;width:100%;position:relative;}
+.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}
+.carousel .item>img{display:block;line-height:1;}
+.carousel .active,.carousel .next,.carousel .prev{display:block;}
+.carousel .active{left:0;}
+.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;}
+.carousel .next{left:100%;}
+.carousel .prev{left:-100%;}
+.carousel .next.left,.carousel .prev.right{left:0;}
+.carousel .active.left{left:-100%;}
+.carousel .active.right{left:100%;}
+.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
+.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
+.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);}
+.carousel-caption h4,.carousel-caption p{color:#ffffff;}
+.hero-unit{padding:60px;margin-bottom:30px;background-color:#f5f5f5;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;}
+.hero-unit p{font-size:18px;font-weight:200;line-height:27px;}
+.pull-right{float:right;}
+.pull-left{float:left;}
+.hide{display:none;}
+.show{display:block;}
+.invisible{visibility:hidden;}


[13/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/js/jquery-1.7.2.min.js
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/js/jquery-1.7.2.min.js b/assembly/src/release/examples/mqtt/websocket/js/jquery-1.7.2.min.js
new file mode 100644
index 0000000..16ad06c
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/websocket/js/jquery-1.7.2.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7.2 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;
 g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);e
 lse d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d
 =parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaul
 tSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typ
 eof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c
 =a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;r
 eturn this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==nu
 ll?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),t
 ypeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready
 );var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:functio
 n(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[
 ];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f
 .concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date 
 RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],
 e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);re
 turn this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f
 .isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.va
 lue==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecke
 d=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="no
 ne",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position=
 "relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[
 n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(
 j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f
 ._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=th
 is,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof
  a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeCla
 ss"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a
 .attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);r
 eturn}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowsp
 an:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b}
 ,set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["r
 adio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
+a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.gui
 d,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remov
 e.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=
 f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.na
 mespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attr
 Name relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.prop
 s?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.
 type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.
 type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("ch
 ange",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e=
 =null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:funct
 ion(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.tes
 t(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,
 l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[
 t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFi
 lter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]
 |\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode=
 ==b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG
 :function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.
 parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a)
 {var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nod
 eType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p
 =o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,
 e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElemen
 t("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]
 );if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}
 }(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.select
 ors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.c
 ontext).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({p
 arent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P
 .call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^
 \s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChi
 ld;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
+.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;
 if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(functi
 on(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h))
 ,e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.
 createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;
 i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",vi
 sibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f
 .cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f
 ===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.su
 pport.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:f
 unction(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.e
 ach("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},
 ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if
 (!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.
 toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d
 .async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.json
 p!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||
 /loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{i
 f(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.
 css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark
 (this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"
 ),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{
 opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=nul
 l&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custo

<TRUNCATED>

[10/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/pom.xml
new file mode 100644
index 0000000..6818210
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-topic</artifactId>
+    <profiles>
+        <profile>
+            <id>subscriber</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.topic.Subscriber</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>publisher</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.topic.Publisher</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/readme.md
new file mode 100644
index 0000000..716ef36
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/readme.md
@@ -0,0 +1,26 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example does basic publish-subscribe messaging using Topics
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    mvn -Psubscriber
+
+In another terminal window run:
+
+    mvn -Ppublisher

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Publisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Publisher.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Publisher.java
new file mode 100644
index 0000000..2d2e095
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Publisher.java
@@ -0,0 +1,75 @@
+/**
+ * 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 example.topic;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Publisher {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createTopic("test-topic");
+            MessageProducer producer = session.createProducer(destination);
+
+            for (int i = 0; i < NUM_MESSAGES_TO_SEND; i++) {
+                TextMessage message = session.createTextMessage("Message #" + i);
+                System.out.println("Sending message #" + i);
+                producer.send(message);
+                Thread.sleep(DELAY);
+            }
+
+            // tell the subscribers we're done
+            producer.send(session.createTextMessage("END"));
+
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Subscriber.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Subscriber.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Subscriber.java
new file mode 100644
index 0000000..89b2e2a
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/java/example/topic/Subscriber.java
@@ -0,0 +1,94 @@
+/**
+ * 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 example.topic;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Subscriber implements MessageListener {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+
+    private static final Boolean NON_TRANSACTED = false;
+
+
+    private final CountDownLatch countDownLatch;
+    public Subscriber(CountDownLatch latch) {
+        countDownLatch = latch;
+    }
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        System.out.println("\nWaiting to receive messages... Either waiting for END message or press Ctrl+C to exit");
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createTopic("test-topic");
+
+            MessageConsumer consumer = session.createConsumer(destination);
+            consumer.setMessageListener(new Subscriber(latch));
+
+            latch.await();
+            consumer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onMessage(Message message) {
+        try {
+            if (message instanceof TextMessage) {
+                String text = ((TextMessage) message).getText();
+                if ("END".equalsIgnoreCase(text)) {
+                    System.out.println("Received END message!");
+                    countDownLatch.countDown();
+                }
+                else {
+                    System.out.println("Received message:" +text);
+                }
+            }
+        } catch (JMSException e) {
+            System.out.println("Got a JMS Exception!");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/resources/log4j.properties b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/resources/log4j.properties
new file mode 100644
index 0000000..c901eac
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-topic/src/main/resources/log4j.properties
@@ -0,0 +1,32 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#
+# Setup the default logging levels
+#
+log4j.rootLogger=INFO, console
+
+#
+# Uncomment one of the following to enable debug logging
+#
+#log4j.logger.org.apache.activemq=TRACE
+
+# Console Settings
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%C %-5p | %m%n
+log4j.appender.console.threshold=TRACE

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/pom.xml
new file mode 100644
index 0000000..fee11c5
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-transaction</artifactId>
+
+    <profiles>
+        <profile>
+            <id>client</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.transaction.Client</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/readme.md
new file mode 100644
index 0000000..ff0b873
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/readme.md
@@ -0,0 +1,25 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example demos using JMS transactions
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+    mvn -Pclient
+
+    You will be greeted with a prompt. You can type a message and press enter. Nothing will actually be sent to
+    a consumer until you type `COMMIT` and press enter. After doing so, you should see the built-in consumer
+    consume the message and output it. If you type `ROLLBACK`, your message will be rolledback and the consumer
+    will not have an opportunity to see it. Hit ^C to exit

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/src/main/java/example/transaction/Client.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/src/main/java/example/transaction/Client.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/src/main/java/example/transaction/Client.java
new file mode 100644
index 0000000..77c56ea
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-transaction/src/main/java/example/transaction/Client.java
@@ -0,0 +1,114 @@
+/**
+ * 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 example.transaction;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQTopic;
+
+import javax.jms.*;
+import java.util.Scanner;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Client {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+
+    // this is set to true
+    private static final Boolean TRANSACTED = true;
+    private static final Boolean NON_TRANSACTED = false;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+            connection = connectionFactory.createConnection();
+            connection.start();
+            Topic destination = new ActiveMQTopic("transacted.client.example");
+
+            Session senderSession = connection.createSession(TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Session receiverSession = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            MessageConsumer receiver = receiverSession.createConsumer(destination);
+            receiver.setMessageListener(new MessageListener() {
+                @Override
+                public void onMessage(Message message) {
+                    if (message instanceof TextMessage) {
+                        try {
+                            String value = ((TextMessage) message).getText();
+                            System.out.println("We received a new message: " + value);
+                        } catch (JMSException e) {
+                            System.out.println("Could not read the receiver's topic because of a JMSException");
+                        }
+                    }
+                }
+            });
+
+            MessageProducer sender = senderSession.createProducer(destination);
+
+
+            connection.start();
+            acceptInputFromUser(senderSession, sender);
+            senderSession.close();
+            receiverSession.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+    private static void acceptInputFromUser(Session senderSession, MessageProducer sender) throws JMSException {
+        System.out.println("Type a message. Type COMMIT to send to receiver, type ROLLBACK to cancel");
+        Scanner inputReader = new Scanner(System.in);
+
+        while (true) {
+            String line = inputReader.nextLine();
+            if (line == null) {
+                System.out.println("Done!");
+                break;
+            } else if (line.length() > 0) {
+                if (line.trim().equals("ROLLBACK")) {
+                    System.out.println("Rolling back...");
+                    senderSession.rollback();
+                    System.out.println("Messages have been rolledback");
+                } else if (line.trim().equals("COMMIT")) {
+                    System.out.println("Committing... ");
+                    senderSession.commit();
+                    System.out.println("Messages should have been sent");
+                } else {
+                    TextMessage message = senderSession.createTextMessage();
+                    message.setText(line);
+                    System.out.println("Batching up:'" + message.getText() + "'");
+                    sender.send(message);
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/pom.xml
new file mode 100644
index 0000000..da047d9
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/pom.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-wildcard-consumer</artifactId>
+
+    <profiles>
+        <profile>
+            <id>consumer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.wildcard.Client</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/readme.md
new file mode 100644
index 0000000..83241ac
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/readme.md
@@ -0,0 +1,31 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example demos using wildcards for consuming messages from hierarchies of destinations
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+    Run one consumer specifying which topicName to produce to (topicName) and what sort of wildcard
+    you'd like to use to listen to that same topic hierarchy (wildcard)
+
+    For example, to publish to "hello.world" topic and listen to "hello.world.*":
+
+    mvn -Pconsumer -DtopicName="hello.world" -Dwildcard=".*"
+
+    You start another consumer that listens to:
+
+    mvn -Pconsumer -DtopicName="hello.world.hungray" -Dwildcard=".*"
+
+    And when you type a message on this prompt, you should see it in the first consumer you started

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/java/example/wildcard/Client.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/java/example/wildcard/Client.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/java/example/wildcard/Client.java
new file mode 100644
index 0000000..3d2b0b0
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/java/example/wildcard/Client.java
@@ -0,0 +1,109 @@
+/**
+ * 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 example.wildcard;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQTopic;
+
+import javax.jms.*;
+import java.util.Scanner;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Client {
+    private static final Boolean NON_TRANSACTED = false;
+    private static final String BROKER_URL = "tcp://localhost:61616";
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+            Topic senderTopic = new ActiveMQTopic(System.getProperty("topicName"));
+
+            connection = connectionFactory.createConnection("admin", "password");
+
+            Session senderSession = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            MessageProducer sender = senderSession.createProducer(senderTopic);
+
+            Session receiverSession = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+
+            String policyType = System.getProperty("wildcard", ".*");
+            String receiverTopicName = senderTopic.getTopicName() + policyType;
+            Topic receiverTopic = receiverSession.createTopic(receiverTopicName);
+
+            MessageConsumer receiver = receiverSession.createConsumer(receiverTopic);
+            receiver.setMessageListener(new MessageListener() {
+                public void onMessage(Message message) {
+                    try {
+                        if (message instanceof TextMessage) {
+                            String text = ((TextMessage) message).getText();
+                            System.out.println("We received a new message: " + text);
+                        }
+                    } catch (JMSException e) {
+                        System.out.println("Could not read the receiver's topic because of a JMSException");
+                    }
+                }
+            });
+
+            connection.start();
+            System.out.println("Listening on '" + receiverTopicName + "'");
+            System.out.println("Enter a message to send: ");
+
+            Scanner inputReader = new Scanner(System.in);
+
+            while (true) {
+                String line = inputReader.nextLine();
+                if (line == null) {
+                    System.out.println("Done!");
+                    break;
+                } else if (line.length() > 0) {
+                    try {
+                        TextMessage message = senderSession.createTextMessage();
+                        message.setText(line);
+                        System.out.println("Sending a message: " + message.getText());
+                        sender.send(message);
+                    } catch (JMSException e) {
+                        System.out.println("Exception during publishing a message: ");
+                    }
+                }
+            }
+
+            receiver.close();
+            receiverSession.close();
+            sender.close();
+            senderSession.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        } finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("When trying to close connection: ");
+                }
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/pom.xml
new file mode 100755
index 0000000..3fb0a03
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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>
+
+    <groupId>example</groupId>
+    <artifactId>advanced-openwire-example</artifactId>
+    <packaging>pom</packaging>
+    <version>0.1-SNAPSHOT</version>
+    <modules>
+        <module>jms-example-queue</module>
+        <module>jms-example-topic</module>
+        <module>jms-example-exclusive-consumer</module>
+        <module>jms-example-transaction</module>
+        <module>jms-example-durable-sub</module>
+        <module>jms-example-wildcard-consumer</module>
+        <module>jms-example-temp-destinations</module>
+        <module>jms-example-message-browser</module>
+        <module>jms-example-queue-selector</module>
+        <module>jms-example-composite-destinations</module>
+    </modules>
+
+    <name>JMS / OpeWire Examples for ActiveMQ</name>
+    <description>ActiveMQ OpenWire Java Examples</description>
+
+    <repositories>
+        <repository>
+            <id>Fusesource Snapshots</id>
+            <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
+        </repository>
+    </repositories>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jms_1.1_spec</artifactId>
+            <version>1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-nop</artifactId>
+            <version>${slf4j-version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.1</version>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/readme.md
new file mode 100644
index 0000000..7acff0b
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/readme.md
@@ -0,0 +1,3 @@
+## Overview
+
+This directory contains more advanced examples of how to use AcitveMQ's OpenWire based JMS API.

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/ecommerce/README.txt
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/ecommerce/README.txt b/assembly/src/release/examples/openwire/ecommerce/README.txt
new file mode 100644
index 0000000..2c3238a
--- /dev/null
+++ b/assembly/src/release/examples/openwire/ecommerce/README.txt
@@ -0,0 +1,40 @@
+Transactions Demo
+=================
+This example is an ActiveMQ implementation of the "TransactedExample" from
+Sun's JMS Tutorial (http://java.sun.com/products/jms/tutorial/index.html).
+
+The example simulates a simplified eCommerce application with four parts:
+the retailer who places the orders, the vendor who assemples the computers,
+and two suppliers--one for hard drives and another for monitors.
+
+The retailer sends a message to the vendor's queue and awaits a reply.
+The vendor receives the message and sends a message to each of the
+supplier's queues. It does this in a single transaction, and will randomly
+throw an exception simulating a database error, triggering a rollback.
+Each supplier receives the order, checks inventory and replies to the
+message stating how many items were sent.
+The vendor collects both responses and responds to the retailer, notifying
+wheather it cna fulfill the complete order or not.
+The retailer receives the message from the vendor.
+
+Running the Example
+===================
+To run the complete demo in a single JVM, with ActiveMQ running on the local
+computer:
+  ant transactions_demo
+
+If you are running ActiveMQ on a non-standard port, or on a different host,
+you can pass a url on the commandline:
+  ant -Durl=tcp://localhost:61616 transactions_demo
+
+If your ActiveMQ instance is password-protected, you can also pass a
+username and password on the command line:
+  ant -Duser=myusername -Dpassword=supersecret transactions_demo
+
+You can also run the individual components seperately, again with optional
+url and/or authentication parameters:
+  ant retailer &
+  ant vendor &
+  ant hdsupplier &
+  ant monitorsupplier &
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/ecommerce/build.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/ecommerce/build.xml b/assembly/src/release/examples/openwire/ecommerce/build.xml
new file mode 100644
index 0000000..83ae093
--- /dev/null
+++ b/assembly/src/release/examples/openwire/ecommerce/build.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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 name="transactions" default="help" basedir=".">
+
+    <property name="class.dir" value="target/classes" />
+    <property name="activemq.home" value="../../.." />
+
+    <!-- example program defaults -->
+    <property name="url" value="tcp://localhost:61616" />
+    <target name="help">
+        <echo>
+      For the full demo:
+         ant transactions_demo -Durl=tcp://hostname:1234
+      For the indicual components:
+         ant retailer -Durl=tcp://hostname:1234
+         ant vendor -Durl=tcp://hostname:1234
+         ant hdsupplier -Durl=tcp://hostname:1234
+         ant monitorsupplier -Durl=tcp://hostname:1234
+        </echo>
+    </target>
+
+    <target name="clean">
+        <delete dir="target" quiet="true" />
+        <delete dir="${class.dir}" quiet="true" />
+    </target>
+
+    <target name="init">
+        <mkdir dir="${class.dir}" />
+
+        <path id="javac.classpath">
+            <pathelement path="${class.dir}" />
+            <pathelement path="../conf" />
+            <fileset dir="${activemq.home}/lib">
+                <include name="**/*.jar" />
+            </fileset>
+        </path>
+    </target>
+
+    <target name="compile" depends="init" description="Compile all Java">
+        <javac srcdir="src" destdir="${class.dir}" debug="true">
+            <classpath refid="javac.classpath" />
+        </javac>
+    </target>
+
+    <target name="transactions_demo" depends="compile" description="Runs the full demo">
+        <java classname="TransactionsDemo" fork="yes">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="${url}" />
+            <arg value="${user}" />
+            <arg value="${password}" />
+        </java>
+    </target>
+
+    <target name="retailer" depends="compile" description="Runs the retailer">
+        <java classname="Retailer" fork="yes">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="${url}" />
+            <arg value="${user}" />
+            <arg value="${password}" />
+        </java>
+    </target>
+    <target name="vendor" depends="compile" description="Runs the vendor">
+        <java classname="Vendor" fork="yes">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="${url}" />
+            <arg value="${user}" />
+            <arg value="${password}" />
+        </java>
+    </target>
+    <target name="hdsupplier" depends="compile" description="Runs the Hard Drive Supplier">
+        <java classname="Supplier" fork="yes">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="HardDrive" />
+            <arg value="${url}" />
+            <arg value="${user}" />
+            <arg value="${password}" />
+        </java>
+    </target>
+    <target name="monitorsupplier" depends="compile" description="Runs the Monitor Supplier">
+        <java classname="Supplier" fork="yes">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="Monitor" />
+            <arg value="${url}" />
+            <arg value="${user}" />
+            <arg value="${password}" />
+        </java>
+    </target>
+</project>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/ecommerce/src/Retailer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/ecommerce/src/Retailer.java b/assembly/src/release/examples/openwire/ecommerce/src/Retailer.java
new file mode 100644
index 0000000..01ecfef
--- /dev/null
+++ b/assembly/src/release/examples/openwire/ecommerce/src/Retailer.java
@@ -0,0 +1,107 @@
+/*
+ *  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.
+ */
+import org.apache.activemq.ActiveMQConnectionFactory;
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TemporaryQueue;
+
+/**
+ * The Retailer orders computers from the Vendor by sending a message via
+ * the VendorOrderQueue. It then syncronously receives the reponse message
+ * and reports if the order was successful or not.
+ */
+public class Retailer implements Runnable {
+	private String url;
+	private String user;
+	private String password;
+	
+	public Retailer(String url, String user, String password) {
+		this.url = url;
+		this.user = user;
+		this.password = password;
+	}
+	
+	public void run() {
+		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
+		try {
+			Connection connection = connectionFactory.createConnection();
+			
+			// The Retailer's session is non-trasacted.
+			Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+			Destination vendorOrderQueue = session.createQueue("VendorOrderQueue");
+			TemporaryQueue retailerConfirmQueue = session.createTemporaryQueue();
+			
+			MessageProducer producer = session.createProducer(vendorOrderQueue);
+			MessageConsumer replyConsumer = session.createConsumer(retailerConfirmQueue);
+
+			connection.start();
+
+			for (int i = 0; i < 5; i++) {
+				MapMessage message = session.createMapMessage();
+				message.setString("Item", "Computer(s)");
+				int quantity = (int)(Math.random() * 4) + 1;
+				message.setInt("Quantity", quantity);
+				message.setJMSReplyTo(retailerConfirmQueue);
+				producer.send(message);
+				System.out.println("Retailer: Ordered " + quantity + " computers.");
+				
+				MapMessage reply = (MapMessage) replyConsumer.receive();
+				if (reply.getBoolean("OrderAccepted")) {
+					System.out.println("Retailer: Order Filled");
+				} else {
+					System.out.println("Retailer: Order Not Filled");
+				}
+			}
+			
+			// Send a non-MapMessage to signal the end
+			producer.send(session.createMessage());
+			
+			replyConsumer.close();
+			connection.close();
+			
+		} catch (JMSException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public static void main(String[] args) {
+		String url = "tcp://localhost:61616";
+		String user = null;
+		String password = null;
+		
+		if (args.length >= 1) {
+			url = args[0];
+		}
+		
+		if (args.length >= 2) {
+			user = args[1];
+		}
+
+		if (args.length >= 3) {
+			password = args[2];
+		}
+		
+		Retailer r = new Retailer(url, user, password);
+		
+		new Thread(r, "Retailer").start();
+	}
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/ecommerce/src/Supplier.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/ecommerce/src/Supplier.java b/assembly/src/release/examples/openwire/ecommerce/src/Supplier.java
new file mode 100644
index 0000000..ed02cc2
--- /dev/null
+++ b/assembly/src/release/examples/openwire/ecommerce/src/Supplier.java
@@ -0,0 +1,135 @@
+/*
+ *  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.
+ */
+import java.util.Random;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+/**
+ * The Supplier synchronously receives the order from the Vendor and
+ * randomly responds with either the number ordered, or some lower
+ * quantity. 
+ */
+public class Supplier implements Runnable {
+	private String url;
+	private String user;
+	private String password;
+	private final String ITEM;
+	private final String QUEUE;
+	
+	public Supplier(String item, String queue, String url, String user, String password) {
+		this.url = url;
+		this.user = user;
+		this.password = password;
+		this.ITEM = item;
+		this.QUEUE = queue;
+	}
+	
+	public void run() {
+		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
+		Session session = null;
+		Destination orderQueue;
+		try {
+			Connection connection = connectionFactory.createConnection();
+
+			session = connection.createSession(true, Session.SESSION_TRANSACTED);
+			orderQueue = session.createQueue(QUEUE);
+			MessageConsumer consumer = session.createConsumer(orderQueue);
+			
+			connection.start();
+			
+			while (true) {
+				Message message = consumer.receive();
+				MessageProducer producer = session.createProducer(message.getJMSReplyTo());
+				MapMessage orderMessage;
+				if (message instanceof MapMessage) {
+					orderMessage = (MapMessage) message;
+				} else {
+					// End of Stream
+					producer.send(session.createMessage());
+					session.commit();
+					producer.close();
+					break;
+				}
+				
+				int quantity = orderMessage.getInt("Quantity");
+				System.out.println(ITEM + " Supplier: Vendor ordered " + quantity + " " + orderMessage.getString("Item"));
+				
+				MapMessage outMessage = session.createMapMessage();
+				outMessage.setInt("VendorOrderNumber", orderMessage.getInt("VendorOrderNumber"));
+				outMessage.setString("Item", ITEM);
+				
+				quantity = Math.min(
+						orderMessage.getInt("Quantity"),
+						new Random().nextInt(orderMessage.getInt("Quantity") * 10));
+				outMessage.setInt("Quantity", quantity);
+				
+				producer.send(outMessage);
+				System.out.println(ITEM + " Supplier: Sent " + quantity + " " + ITEM + "(s)");
+				session.commit();
+				System.out.println(ITEM + " Supplier: committed transaction");
+				producer.close();
+			}
+			connection.close();
+		} catch (JMSException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public static void main(String[] args) {
+		String url = "tcp://localhost:61616";
+		String user = null;
+		String password = null;
+		String item = "HardDrive";
+		
+		if (args.length >= 1) {
+			item = args[0];
+		}
+		String queue;
+		if ("HardDrive".equals(item)) {
+			queue = "StorageOrderQueue";
+		} else if ("Monitor".equals(item)) {
+			queue = "MonitorOrderQueue";
+		} else {
+			throw new IllegalArgumentException("Item must be either HardDrive or Monitor");
+		}
+		
+		if (args.length >= 2) {
+			url = args[1];
+		}
+		
+		if (args.length >= 3) {
+			user = args[2];
+		}
+
+		if (args.length >= 4) {
+			password = args[3];
+		}
+		
+		Supplier s = new Supplier(item, queue, url, user, password);
+		
+		new Thread(s, "Supplier " + item).start();
+	}
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/ecommerce/src/TransactionsDemo.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/ecommerce/src/TransactionsDemo.java b/assembly/src/release/examples/openwire/ecommerce/src/TransactionsDemo.java
new file mode 100644
index 0000000..4dc1171
--- /dev/null
+++ b/assembly/src/release/examples/openwire/ecommerce/src/TransactionsDemo.java
@@ -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.
+ */
+public class TransactionsDemo {
+
+	public static void main(String[] args) {
+		String url = "tcp://localhost:61616";
+		String user = null;
+		String password = null;
+		
+		if (args.length >= 1) {
+			url = args[0];
+		}
+		
+		if (args.length >= 2) {
+			user = args[1];
+		}
+
+		if (args.length >= 3) {
+			password = args[2];
+		}
+		
+		Retailer r = new Retailer(url, user, password);
+		Vendor v = new Vendor(url, user, password);
+		Supplier s1 = new Supplier("HardDrive", "StorageOrderQueue", url, user, password);
+		Supplier s2 = new Supplier("Monitor", "MonitorOrderQueue", url, user, password);
+		
+		new Thread(r, "Retailer").start();
+		new Thread(v, "Vendor").start();
+		new Thread(s1, "Supplier 1").start();
+		new Thread(s2, "Supplier 2").start();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/ecommerce/src/Vendor.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/ecommerce/src/Vendor.java b/assembly/src/release/examples/openwire/ecommerce/src/Vendor.java
new file mode 100644
index 0000000..0f2ce93
--- /dev/null
+++ b/assembly/src/release/examples/openwire/ecommerce/src/Vendor.java
@@ -0,0 +1,302 @@
+/*
+ *  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.
+ */
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TemporaryQueue;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+/**
+ * The Vendor synchronously, and in a single transaction, receives the
+ * order from VendorOrderQueue and sends messages to the two Suppliers via
+ * MonitorOrderQueue and StorageOrderQueue.
+ * The responses are received asynchronously; when both responses come
+ * back, the order confirmation message is sent back to the Retailer.
+ */
+public class Vendor implements Runnable, MessageListener {
+	private String url;
+	private String user;
+	private String password;
+	private	Session asyncSession;
+	private int numSuppliers = 2;
+	private Object supplierLock = new Object();
+	
+	public Vendor(String url, String user, String password) {
+		this.url = url;
+		this.user = user;
+		this.password = password;
+	}
+	
+	public void run() {
+		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
+		Session session = null;
+		Destination orderQueue;
+		Destination monitorOrderQueue;
+		Destination storageOrderQueue;
+		TemporaryQueue vendorConfirmQueue;
+		MessageConsumer orderConsumer = null;
+		MessageProducer monitorProducer = null;
+		MessageProducer storageProducer = null;
+
+		try {
+			Connection connection = connectionFactory.createConnection();
+
+			session = connection.createSession(true, Session.SESSION_TRANSACTED);
+			orderQueue = session.createQueue("VendorOrderQueue");
+			monitorOrderQueue = session.createQueue("MonitorOrderQueue");
+			storageOrderQueue = session.createQueue("StorageOrderQueue");
+			
+			orderConsumer = session.createConsumer(orderQueue);
+			monitorProducer = session.createProducer(monitorOrderQueue);
+			storageProducer = session.createProducer(storageOrderQueue);
+			
+			Connection asyncconnection = connectionFactory.createConnection();
+			asyncSession = asyncconnection.createSession(true, Session.SESSION_TRANSACTED);
+			
+			vendorConfirmQueue = asyncSession.createTemporaryQueue();
+			MessageConsumer confirmConsumer = asyncSession.createConsumer(vendorConfirmQueue);
+			confirmConsumer.setMessageListener(this);
+			
+			asyncconnection.start();
+
+			connection.start();
+
+		
+			while (true) {
+				Order order = null;
+				try {
+					Message inMessage = orderConsumer.receive();
+					MapMessage message;
+					if (inMessage instanceof MapMessage) {
+						message = (MapMessage) inMessage;
+						
+					} else {
+						// end of stream
+						Message outMessage = session.createMessage();
+						outMessage.setJMSReplyTo(vendorConfirmQueue);
+						monitorProducer.send(outMessage);
+						storageProducer.send(outMessage);
+						session.commit();
+						break;
+					}
+					
+					// Randomly throw an exception in here to simulate a Database error
+					// and trigger a rollback of the transaction
+					if (new Random().nextInt(3) == 0) {
+						throw new JMSException("Simulated Database Error.");
+					}
+					
+					order = new Order(message);
+					
+					MapMessage orderMessage = session.createMapMessage();
+					orderMessage.setJMSReplyTo(vendorConfirmQueue);
+					orderMessage.setInt("VendorOrderNumber", order.getOrderNumber());
+					int quantity = message.getInt("Quantity");
+					System.out.println("Vendor: Retailer ordered " + quantity + " " + message.getString("Item"));
+					
+					orderMessage.setInt("Quantity", quantity);
+					orderMessage.setString("Item", "Monitor");
+					monitorProducer.send(orderMessage);
+					System.out.println("Vendor: ordered " + quantity + " Monitor(s)");
+					
+					orderMessage.setString("Item", "HardDrive");
+					storageProducer.send(orderMessage);
+					System.out.println("Vendor: ordered " + quantity + " Hard Drive(s)");
+					
+					session.commit();
+					System.out.println("Vendor: Comitted Transaction 1");
+					
+				} catch (JMSException e) {
+					System.out.println("Vendor: JMSException Occured: " + e.getMessage());
+					e.printStackTrace();
+					session.rollback();
+					System.out.println("Vendor: Rolled Back Transaction.");
+				}
+			}
+			
+			synchronized (supplierLock) {
+				while (numSuppliers > 0) {
+					try {
+						supplierLock.wait();
+					} catch (InterruptedException e) {
+						e.printStackTrace();
+					}
+				}
+			}
+			
+			connection.close();
+			asyncconnection.close();
+		
+		} catch (JMSException e) {
+			e.printStackTrace();
+		}
+
+	}
+
+	public void onMessage(Message message) {
+		if (!(message instanceof MapMessage)) {
+			synchronized(supplierLock) {
+				numSuppliers--;
+				supplierLock.notifyAll();
+			}
+			try {
+				asyncSession.commit();
+				return;
+			} catch (JMSException e) {
+				e.printStackTrace();
+			}
+		}
+		
+		int orderNumber = -1;
+		try {
+			MapMessage componentMessage = (MapMessage) message;
+			
+			orderNumber = componentMessage.getInt("VendorOrderNumber");
+			Order order = Order.getOrder(orderNumber);
+			order.processSubOrder(componentMessage);
+			asyncSession.commit();
+			
+			if (! "Pending".equals(order.getStatus())) {
+				System.out.println("Vendor: Completed processing for order " + orderNumber);
+				
+				MessageProducer replyProducer = asyncSession.createProducer(order.getMessage().getJMSReplyTo());
+				MapMessage replyMessage = asyncSession.createMapMessage();
+				if ("Fulfilled".equals(order.getStatus())) {
+					replyMessage.setBoolean("OrderAccepted", true);
+					System.out.println("Vendor: sent " + order.quantity + " computer(s)");
+				} else {
+					replyMessage.setBoolean("OrderAccepted", false);
+					System.out.println("Vendor: unable to send " + order.quantity + " computer(s)");
+				}
+				replyProducer.send(replyMessage);
+				asyncSession.commit();
+				System.out.println("Vender: committed transaction 2");
+			}
+		} catch (JMSException e) {
+			e.printStackTrace();
+		}
+	}
+
+	public static class Order {
+		private static Map<Integer, Order> pendingOrders = new HashMap<Integer, Order>();
+		private static int nextOrderNumber = 1;
+
+		private int orderNumber;
+		private int quantity;
+		private MapMessage monitor = null;
+		private MapMessage storage = null;
+		private MapMessage message;
+		private String status;
+		
+		public Order(MapMessage message) {
+			this.orderNumber = nextOrderNumber++;
+			this.message = message;
+			try {
+				this.quantity = message.getInt("Quantity");
+			} catch (JMSException e) {
+				e.printStackTrace();
+				this.quantity = 0;
+			}
+			status = "Pending";
+			pendingOrders.put(orderNumber, this);
+		}
+		
+		public Object getStatus() {
+			return status;
+		}
+		
+		public int getOrderNumber() {
+			return orderNumber;
+		}
+		
+		public static int getOutstandingOrders() {
+			return pendingOrders.size();
+		}
+		
+		public static Order getOrder(int number) {
+			return pendingOrders.get(number);
+		}
+		
+		public MapMessage getMessage() {
+			return message;
+		}
+		
+		public void processSubOrder(MapMessage message) {
+			String itemName = null;
+			try {
+				itemName = message.getString("Item");
+			} catch (JMSException e) {
+				e.printStackTrace();
+			}
+			
+			if ("Monitor".equals(itemName)) {
+				monitor = message;
+			} else if ("HardDrive".equals(itemName)) {
+				storage = message;
+			}
+			
+			if (null != monitor && null != storage) {
+				// Received both messages
+				try {
+					if (quantity > monitor.getInt("Quantity")) {
+						status = "Cancelled";
+					} else if (quantity > storage.getInt("Quantity")) {
+						status = "Cancelled";
+					} else {
+						status = "Fulfilled";
+					}
+				} catch (JMSException e) {
+					e.printStackTrace();
+					status = "Cancelled";
+				}
+			}
+		}		
+	}
+
+	public static void main(String[] args) {
+		String url = "tcp://localhost:61616";
+		String user = null;
+		String password = null;
+		
+		if (args.length >= 1) {
+			url = args[0];
+		}
+		
+		if (args.length >= 2) {
+			user = args[1];
+		}
+
+		if (args.length >= 3) {
+			password = args[2];
+		}
+		
+		Vendor v = new Vendor(url, user, password);
+		
+		new Thread(v, "Vendor").start();
+	}	
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.java b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.java
new file mode 100644
index 0000000..b780771
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.java
@@ -0,0 +1,352 @@
+/*
+ * � 2001-2009, Progress Software Corporation and/or its subsidiaries or affiliates.  All rights reserved.
+ *
+ * Licensed 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.
+ 
+Sample Application
+
+Writing a Basic JMS Application using:
+    - QueueBrowser
+    - JMS with a Graphical Interface
+    - behavior based on message type
+
+When you run this program, it will read all the parameters out
+of the QueueMonitor.properties file. In this file you can specify
+which queues you want to monitor. Then a Java window will open and
+every time you click the Browse button, The current contents of the queues
+will be displayed in the text window.
+
+Usage:
+  java QueueMonitor
+
+Suggested demonstration:
+  - Start one instance of this application:
+        java QueueMonitor
+  - Run on or more Talk applications (without the receiving queue).
+  - Enter messages on various Talk windows.
+  - Watch the QueueMonitor display the messages.
+
+*/
+import org.apache.activemq.*;
+
+import javax.swing.JTextArea;
+import javax.swing.JFrame;
+import javax.swing.JScrollPane;
+import javax.swing.JButton;
+
+import javax.swing.text.Highlighter;
+import javax.swing.text.DefaultHighlighter;
+import javax.swing.text.BadLocationException;
+
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.BevelBorder;
+import javax.swing.border.SoftBevelBorder;
+
+import java.awt.Toolkit;
+import java.awt.Dimension;
+import java.awt.BorderLayout;
+import java.awt.Rectangle;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+
+import java.io.FileInputStream;
+
+import java.util.Vector;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+public class QueueMonitor
+extends JFrame
+{
+    private static final String DEFAULT_PROPERTIES_FILE = "QueueMonitor.properties";
+
+    String propertiesFile = DEFAULT_PROPERTIES_FILE;
+    String broker = "tcp://localhost:61616";
+    String connectID = "QueueMonitor";
+    String username = "QueueMonitor";
+    String password = "QueueMonitor";
+    String browseQueues  = "Q1,Q2,Q3";
+    String textFontName = "Dialog";
+    String textFontStyle = "PLAIN";
+    String textFontSize = "12";
+    String title = "QueueMonitor";
+
+    JTextArea textArea = new JTextArea();
+    JScrollPane scrollPane = new JScrollPane(textArea);
+    JButton browseButton = new JButton("Browse Queues");
+
+    Vector theQueues = new Vector();
+
+    private javax.jms.Connection connect = null;
+    private javax.jms.Session session = null;
+
+/** Constructor for MessageMonitor window. */
+    public QueueMonitor()
+    {
+        loadProperties();
+
+        setTitle(title);
+
+        // Connect to Message Broker
+        try
+        {
+            javax.jms.ConnectionFactory factory;
+            factory = new ActiveMQConnectionFactory(username, password, broker);
+
+            connect = factory.createConnection (username, password);
+            session = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("Cannot connect to Broker");
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        // Set up Queues:
+        StringTokenizer queues = new StringTokenizer(browseQueues, ",");
+        while (queues.hasMoreTokens())
+        {
+            try{
+                String queueName = queues.nextToken();
+                System.out.println ("Monitoring  " + queueName);
+                theQueues.addElement(session.createQueue(queueName));
+            }
+            catch (javax.jms.JMSException jmse)
+            {
+                jmse.printStackTrace();
+            }
+        }
+
+
+        // After init it is time to start the connection
+        try
+        {
+            connect.start();
+        }
+        catch (javax.jms.JMSException jmse)
+        {
+            System.err.println("Cannot start connection");
+            jmse.printStackTrace();
+            System.exit(1);
+        }
+
+        //Elements visible on the screen
+        textArea.setEditable(false);
+        scrollPane.setBorder(new CompoundBorder(new EmptyBorder(6,6,6,6),
+                                                new SoftBevelBorder(BevelBorder.LOWERED)));
+        getContentPane().add(scrollPane,BorderLayout.CENTER);
+        getContentPane().add(browseButton,BorderLayout.SOUTH);
+
+        browseButton.addActionListener(new OnBrowse());
+
+    }
+
+
+
+    /** Main program entry point. */
+    public static void main(String[] args)
+    {
+        // There should be no arguments to this program.
+        if (args.length > 0) {
+            printUsage();
+            System.exit(1);
+        }
+
+        QueueMonitor queueMonitor = new QueueMonitor();
+
+        queueMonitor.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e)
+            {
+                System.exit(0);
+            }
+        });
+
+        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+        screenSize.height = screenSize.height / 2 ;
+        screenSize.width = screenSize.width / 2 ;
+        queueMonitor.setSize(screenSize);
+        queueMonitor.setVisible(true);
+
+    }
+
+    /** Prints the usage. */
+    private static void printUsage()
+    {
+        StringBuffer use = new StringBuffer();
+        use.append("\nusage: QueueMonitor\n\n");
+        use.append("Properties for this sample can be set in a properties file.\n");
+        String dfltFile = System.getProperty("propertiesFile", DEFAULT_PROPERTIES_FILE);
+        use.append("[Default file: " + dfltFile +"]\n\n");
+        System.out.print(use);
+    }
+
+    /** Load the window and JMS properties from a file. */
+    private void loadProperties()
+    {
+        try
+        {
+            Properties properties = new Properties();
+
+            propertiesFile = System.getProperty("propertiesFile", propertiesFile);
+
+            properties.load(new FileInputStream(propertiesFile));
+
+            // Connection Properties
+            broker = properties.getProperty("broker",broker).trim();
+            connectID = properties.getProperty("connectID",connectID).trim();
+            username = properties.getProperty("username",username).trim();
+            password = properties.getProperty("password",password).trim();
+
+            // Queue Properties
+            browseQueues = properties.getProperty("browseQueues", browseQueues).trim();
+
+            // Text Properties
+            textFontName = properties.getProperty("textFontName", textFontName).trim();
+            textFontStyle = properties.getProperty("textFontStyle", textFontStyle).trim();
+            textFontSize = properties.getProperty("textFontSize", textFontSize).trim();
+
+            // Window Properties
+            title = properties.getProperty("title", title).trim();
+
+        }
+        catch (java.io.FileNotFoundException fnfe)
+        {
+            System.out.println (propertiesFile + " not found: using defaults"); // Use Defaults
+        }
+        catch (java.io.IOException ioe)
+        {
+            ioe.printStackTrace();
+        }
+    }
+
+   /** Class to handle the "Browse" button action. */
+    public class OnBrowse implements ActionListener
+    {
+
+        public void actionPerformed(ActionEvent evt)
+        {
+            // Clear the textArea.
+            textArea.setText("");
+            textArea.paintImmediately(textArea.getBounds());
+
+            if(theQueues.size() == 0){
+                textArea.setText("No Queues to be monitored");
+            }
+            else{
+                for(int i = 0; i<theQueues.size();i++)
+                {
+                    try
+                    {
+                        // Create a browser on the queue and show the messages waiting in it.
+                        javax.jms.Queue q = (javax.jms.Queue) theQueues.elementAt(i);
+                       textArea.append("--------------------------------------------------\n");
+                       textArea.append("Messages on queue " + q.getQueueName() + ":\n");
+  
+                        // Create a queue browser
+                        System.out.print ("Browsing messages in queue " + q.getQueueName() + "\"...");
+                        javax.jms.QueueBrowser browser = session.createBrowser(q);
+                        System.out.println ("[done]");
+                        int cnt = 0;
+                        Enumeration e = browser.getEnumeration();
+                        if(!e.hasMoreElements())
+                        {
+                            textArea.append ("(This queue is empty.)");
+                        }
+                        else
+                        {
+                            while(e.hasMoreElements())
+                            {
+                                System.out.print(" --> getting message " + String.valueOf(++cnt) + "...");
+                                javax.jms.Message message = (javax.jms.Message) e.nextElement();
+                                System.out.println("[" + message + "]");
+                                if (message != null)
+                                {
+                                    String msgText = getContents (message);
+                                    textArea.append(msgText + "\n");
+                                    try
+                                    {
+                                        // Scroll the text area to show the message
+                                        Rectangle area = textArea.modelToView(textArea.getText().length());
+                                        textArea.scrollRectToVisible(area);
+                                        textArea.paintImmediately(textArea.getBounds());
+                                    }
+                                    catch(Exception jle) { jle.printStackTrace();}
+                                }
+                            }
+                        }
+                        // Free any resources in the browser.
+                        browser.close();
+                        textArea.append ("\n");
+                    }
+                    catch (javax.jms.JMSException jmse){
+                        jmse.printStackTrace();
+                    }
+                }
+                try
+                {
+                    // Scroll the text area to show the message
+                    Rectangle area = textArea.modelToView(textArea.getText().length());
+                    textArea.scrollRectToVisible(area);
+                    textArea.paintImmediately(textArea.getBounds());
+                }
+                catch(Exception jle) { jle.printStackTrace();}
+            }
+        }
+    }
+
+    public String getContents (javax.jms.Message message){
+
+
+            String msgBody = null;
+            String msgClass = message.getClass().getName();
+
+            if (message instanceof javax.jms.TextMessage)
+            {
+                msgClass = "javax.jms.TextMessage";
+                try
+                {
+                    msgBody = ((javax.jms.TextMessage)message).getText();
+                }
+                catch (javax.jms.JMSException jmse)
+                {
+                    msgBody = "";
+                }
+            }
+          
+            else if (message instanceof org.apache.activemq.command.ActiveMQMapMessage)
+            {
+		  			    System.out.println ("(Name value pairs in the MapMessage are not displayed.)");
+            }
+            else if (message instanceof javax.jms.BytesMessage)
+          			{
+		  			    System.out.println ("Warning: A bytes message was discarded because it could not be processed as a javax.jms.TextMessage.");
+		  			 }
+            else if (message instanceof javax.jms.ObjectMessage)
+          			{
+		  			    System.out.println ("Warning: An object message was discarded because it could not be processed as a javax.jms.TextMessage.");
+		  			 }
+
+            else if (message instanceof javax.jms.StreamMessage)
+					{
+			   			System.out.println ("Warning: A stream message was discarded because it could not be processed as a javax.jms.TextMessage.");
+					 }
+        return "- " + msgClass + " from " + msgBody ;
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.properties b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.properties
new file mode 100644
index 0000000..1db7b82
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/QueuePTPSamples/QueueMonitor/QueueMonitor.properties
@@ -0,0 +1,56 @@
+#
+# This is the properties file for the QueueMonitor Class.
+#
+# A QueueMonitor object will load this file when constructed.
+# By default, a QueueMonitor object searches for and load a 
+# file named "QueueMonitor.properties" in the JVM's "current" directory.
+#
+# This behavior may be overriden by assigning an alternate property file
+# name and location to the System property "propertiesFile".
+#
+# Property:         broker
+# Default Value:    localhost   
+# Description:      Specifies the host and port of the Messaging Broker to connect to.
+broker              tcp://localhost:61616
+#
+# Property:         connectID
+# Default Value:    QueueMonitor 
+# Description:      Specifies the program identifier used to connect to the Messaging Broker.
+connectID           QueueMonitor 
+#
+# Property:         userID
+# Default Value:    Administrator 
+# Description:      Specifies the user identifier used to connect to the Messaging Broker.
+username            Administrator 
+#
+# Property:         password
+# Default Value:    Administrator 
+# Description:      Specifies the password used to connect to the Messaging Broker.
+password            Administrator 
+#
+# Property:         browseQueues
+# Default Value:     
+# Description:      A comma-separated list of queue names that QueueMonitor browses.
+#                   NOTE: An empty list will subscribe to no queues.
+browseQueues        Q1,Q2,Q3,Q4
+##
+# Property:         textFontName
+# Default Value:    Dialog
+# Description:      The name of the font used to display recieved messages.
+textFontName        Dialog   
+#
+# Property:         textFontStyle
+# Default Value:    PLAIN
+# Description:      The style of the font used to display received messages.
+textFontStyle       PLAIN   
+#
+# Property:         textFontSize
+# Default Value:    12
+# Description:      The size of the font used to display recieved messages.
+textFontSize        12   
+#
+# Property:         title
+# Default Value:    QueueMonitor
+# Description:      The title of the QueueMonitor Window.
+title               QueueMonitor   
+..


[04/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.css b/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.css
new file mode 100644
index 0000000..5e1aee0
--- /dev/null
+++ b/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.css
@@ -0,0 +1,610 @@
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover{color:#005580;text-decoration:underline;}
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
+.row:after{clear:both;}
+[class*="span"]{float:left;margin-left:20px;}
+.span1{width:60px;}
+.span2{width:140px;}
+.span3{width:220px;}
+.span4{width:300px;}
+.span5{width:380px;}
+.span6{width:460px;}
+.span7{width:540px;}
+.span8{width:620px;}
+.span9{width:700px;}
+.span10{width:780px;}
+.span11{width:860px;}
+.span12,.container{width:940px;}
+.offset1{margin-left:100px;}
+.offset2{margin-left:180px;}
+.offset3{margin-left:260px;}
+.offset4{margin-left:340px;}
+.offset5{margin-left:420px;}
+.offset6{margin-left:500px;}
+.offset7{margin-left:580px;}
+.offset8{margin-left:660px;}
+.offset9{margin-left:740px;}
+.offset10{margin-left:820px;}
+.offset11{margin-left:900px;}
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
+.row-fluid:after{clear:both;}
+.row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;}
+.row-fluid>[class*="span"]:first-child{margin-left:0;}
+.row-fluid .span1{width:6.382978723%;}
+.row-fluid .span2{width:14.89361702%;}
+.row-fluid .span3{width:23.404255317%;}
+.row-fluid .span4{width:31.914893614%;}
+.row-fluid .span5{width:40.425531911%;}
+.row-fluid .span6{width:48.93617020799999%;}
+.row-fluid .span7{width:57.446808505%;}
+.row-fluid .span8{width:65.95744680199999%;}
+.row-fluid .span9{width:74.468085099%;}
+.row-fluid .span10{width:82.97872339599999%;}
+.row-fluid .span11{width:91.489361693%;}
+.row-fluid .span12{width:99.99999998999999%;}
+.container{width:940px;margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
+.container:after{clear:both;}
+.container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
+.container-fluid:after{clear:both;}
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
+h1,h2,h3,h4,h5,h6{margin:0;font-weight:bold;color:#333333;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
+h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;}
+h4,h5,h6{line-height:18px;}
+h4{font-size:14px;}h4 small{font-size:12px;}
+h5{font-size:12px;}
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
+.page-header h1{line-height:1;}
+ul,ol{padding:0;margin:0 0 9px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;}
+ul.unstyled{margin-left:0;list-style:none;}
+dl{margin-bottom:18px;}
+dt,dd{line-height:18px;}
+dt{font-weight:bold;}
+dd{margin-left:9px;}
+hr{margin:18px 0;border:0;border-top:1px solid #e5e5e5;border-bottom:1px solid #ffffff;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+.muted{color:#999999;}
+abbr{font-size:90%;text-transform:uppercase;border-bottom:1px dotted #ddd;cursor:help;}
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;}
+small{font-size:100%;}
+cite{font-style:normal;}
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:3px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;}pre.prettyprint{margin-bottom:18px;}
+pre code{padding:0;background-color:transparent;}
+form{margin:0 0 18px;}
+fieldset{padding:0;margin:0;border:0;}
+legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}
+label,input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;}
+label{display:block;margin-bottom:5px;color:#333333;}
+input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.uneditable-textarea{width:auto;height:auto;}
+label input,label textarea,label select{display:block;}
+input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:0;cursor:pointer;border-radius:0 \0/;}
+input[type="file"]{padding:initial;line-height:initial;border:initial;background-color:#ffffff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;}
+select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;}
+select{width:220px;background-color:#ffffff;}
+select[multiple],select[size]{height:auto;}
+input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+textarea{height:auto;}
+input[type="hidden"]{display:none;}
+.radio,.checkbox{padding-left:18px;}
+.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;}
+.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
+.radio.inline,.checkbox.inline{display:inline-block;margin-bottom:0;vertical-align:middle;}
+.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
+.controls>.radio.inline:first-child,.controls>.checkbox.inline:first-child{padding-top:0;}
+input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}
+input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;}
+input[type="file"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.input-mini{width:60px;}
+.input-small{width:90px;}
+.input-medium{width:150px;}
+.input-large{width:210px;}
+.input-xlarge{width:270px;}
+.input-xxlarge{width:530px;}
+input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0;}
+input.span1,textarea.span1,.uneditable-input.span1{width:50px;}
+input.span2,textarea.span2,.uneditable-input.span2{width:130px;}
+input.span3,textarea.span3,.uneditable-input.span3{width:210px;}
+input.span4,textarea.span4,.uneditable-input.span4{width:290px;}
+input.span5,textarea.span5,.uneditable-input.span5{width:370px;}
+input.span6,textarea.span6,.uneditable-input.span6{width:450px;}
+input.span7,textarea.span7,.uneditable-input.span7{width:530px;}
+input.span8,textarea.span8,.uneditable-input.span8{width:610px;}
+input.span9,textarea.span9,.uneditable-input.span9{width:690px;}
+input.span10,textarea.span10,.uneditable-input.span10{width:770px;}
+input.span11,textarea.span11,.uneditable-input.span11{width:850px;}
+input.span12,textarea.span12,.uneditable-input.span12{width:930px;}
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
+.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
+.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;}
+.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
+.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
+.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;}
+.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
+.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
+.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;}
+.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
+input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
+.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;}
+.uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
+:-moz-placeholder{color:#999999;}
+::-webkit-input-placeholder{color:#999999;}
+.help-block{margin-top:5px;margin-bottom:0;color:#999999;}
+.help-inline{display:inline-block;*display:inline;*zoom:1;margin-bottom:9px;vertical-align:middle;padding-left:5px;}
+.input-prepend,.input-append{margin-bottom:5px;*zoom:1;}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;content:"";}
+.input-prepend:after,.input-append:after{clear:both;}
+.input-prepend input,.input-append input,.input-prepend .uneditable-input,.input-append .uneditable-input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2;}
+.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;}
+.input-prepend .add-on,.input-append .add-on{float:left;display:block;width:auto;min-width:16px;height:18px;margin-right:-1px;padding:4px 5px;font-weight:normal;line-height:18px;color:#999999;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
+.input-prepend .add-on{*margin-top:1px;}
+.input-append input,.input-append .uneditable-input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-append .uneditable-input{border-right-color:#ccc;}
+.input-append .add-on{margin-right:0;margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.input-append input:first-child{*margin-left:-160px;}.input-append input:first-child+.add-on{*margin-left:-21px;}
+.search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;}
+.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input{display:inline-block;margin-bottom:0;}
+.form-search label,.form-inline label,.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{display:inline-block;}
+.form-search .input-append .add-on,.form-inline .input-prepend .add-on,.form-search .input-append .add-on,.form-inline .input-prepend .add-on{vertical-align:middle;}
+.control-group{margin-bottom:9px;}
+.form-horizontal legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;}
+.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}
+.form-horizontal .control-group:after{clear:both;}
+.form-horizontal .control-group>label{float:left;width:140px;padding-top:5px;text-align:right;}
+.form-horizontal .controls{margin-left:160px;}
+.form-horizontal .form-actions{padding-left:160px;}
+table{max-width:100%;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;border-top:1px solid #ddd;}
+.table th{font-weight:bold;vertical-align:bottom;}
+.table td{vertical-align:top;}
+.table thead:first-child tr th,.table thead:first-child tr td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #ddd;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th+th,.table-bordered td+td,.table-bordered th+td,.table-bordered td+th{border-left:1px solid #ddd;}
+.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+table .span1{float:none;width:44px;margin-left:0;}
+table .span2{float:none;width:124px;margin-left:0;}
+table .span3{float:none;width:204px;margin-left:0;}
+table .span4{float:none;width:284px;margin-left:0;}
+table .span5{float:none;width:364px;margin-left:0;}
+table .span6{float:none;width:444px;margin-left:0;}
+table .span7{float:none;width:524px;margin-left:0;}
+table .span8{float:none;width:604px;margin-left:0;}
+table .span9{float:none;width:684px;margin-left:0;}
+table .span10{float:none;width:764px;margin-left:0;}
+table .span11{float:none;width:844px;margin-left:0;}
+table .span12{float:none;width:924px;margin-left:0;}
+[class^="icon-"]{display:inline-block;width:14px;height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child{*margin-left:0;}
+.icon-white{background-image:url(../img/glyphicons-halflings-white.png);}
+.icon-glass{background-position:0 0;}
+.icon-music{background-position:-24px 0;}
+.icon-search{background-position:-48px 0;}
+.icon-envelope{background-position:-72px 0;}
+.icon-heart{background-position:-96px 0;}
+.icon-star{background-position:-120px 0;}
+.icon-star-empty{background-position:-144px 0;}
+.icon-user{background-position:-168px 0;}
+.icon-film{background-position:-192px 0;}
+.icon-th-large{background-position:-216px 0;}
+.icon-th{background-position:-240px 0;}
+.icon-th-list{background-position:-264px 0;}
+.icon-ok{background-position:-288px 0;}
+.icon-remove{background-position:-312px 0;}
+.icon-zoom-in{background-position:-336px 0;}
+.icon-zoom-out{background-position:-360px 0;}
+.icon-off{background-position:-384px 0;}
+.icon-signal{background-position:-408px 0;}
+.icon-cog{background-position:-432px 0;}
+.icon-trash{background-position:-456px 0;}
+.icon-home{background-position:0 -24px;}
+.icon-file{background-position:-24px -24px;}
+.icon-time{background-position:-48px -24px;}
+.icon-road{background-position:-72px -24px;}
+.icon-download-alt{background-position:-96px -24px;}
+.icon-download{background-position:-120px -24px;}
+.icon-upload{background-position:-144px -24px;}
+.icon-inbox{background-position:-168px -24px;}
+.icon-play-circle{background-position:-192px -24px;}
+.icon-repeat{background-position:-216px -24px;}
+.icon-refresh{background-position:-240px -24px;}
+.icon-list-alt{background-position:-264px -24px;}
+.icon-lock{background-position:-287px -24px;}
+.icon-flag{background-position:-312px -24px;}
+.icon-headphones{background-position:-336px -24px;}
+.icon-volume-off{background-position:-360px -24px;}
+.icon-volume-down{background-position:-384px -24px;}
+.icon-volume-up{background-position:-408px -24px;}
+.icon-qrcode{background-position:-432px -24px;}
+.icon-barcode{background-position:-456px -24px;}
+.icon-tag{background-position:0 -48px;}
+.icon-tags{background-position:-25px -48px;}
+.icon-book{background-position:-48px -48px;}
+.icon-bookmark{background-position:-72px -48px;}
+.icon-print{background-position:-96px -48px;}
+.icon-camera{background-position:-120px -48px;}
+.icon-font{background-position:-144px -48px;}
+.icon-bold{background-position:-167px -48px;}
+.icon-italic{background-position:-192px -48px;}
+.icon-text-height{background-position:-216px -48px;}
+.icon-text-width{background-position:-240px -48px;}
+.icon-align-left{background-position:-264px -48px;}
+.icon-align-center{background-position:-288px -48px;}
+.icon-align-right{background-position:-312px -48px;}
+.icon-align-justify{background-position:-336px -48px;}
+.icon-list{background-position:-360px -48px;}
+.icon-indent-left{background-position:-384px -48px;}
+.icon-indent-right{background-position:-408px -48px;}
+.icon-facetime-video{background-position:-432px -48px;}
+.icon-picture{background-position:-456px -48px;}
+.icon-pencil{background-position:0 -72px;}
+.icon-map-marker{background-position:-24px -72px;}
+.icon-adjust{background-position:-48px -72px;}
+.icon-tint{background-position:-72px -72px;}
+.icon-edit{background-position:-96px -72px;}
+.icon-share{background-position:-120px -72px;}
+.icon-check{background-position:-144px -72px;}
+.icon-move{background-position:-168px -72px;}
+.icon-step-backward{background-position:-192px -72px;}
+.icon-fast-backward{background-position:-216px -72px;}
+.icon-backward{background-position:-240px -72px;}
+.icon-play{background-position:-264px -72px;}
+.icon-pause{background-position:-288px -72px;}
+.icon-stop{background-position:-312px -72px;}
+.icon-forward{background-position:-336px -72px;}
+.icon-fast-forward{background-position:-360px -72px;}
+.icon-step-forward{background-position:-384px -72px;}
+.icon-eject{background-position:-408px -72px;}
+.icon-chevron-left{background-position:-432px -72px;}
+.icon-chevron-right{background-position:-456px -72px;}
+.icon-plus-sign{background-position:0 -96px;}
+.icon-minus-sign{background-position:-24px -96px;}
+.icon-remove-sign{background-position:-48px -96px;}
+.icon-ok-sign{background-position:-72px -96px;}
+.icon-question-sign{background-position:-96px -96px;}
+.icon-info-sign{background-position:-120px -96px;}
+.icon-screenshot{background-position:-144px -96px;}
+.icon-remove-circle{background-position:-168px -96px;}
+.icon-ok-circle{background-position:-192px -96px;}
+.icon-ban-circle{background-position:-216px -96px;}
+.icon-arrow-left{background-position:-240px -96px;}
+.icon-arrow-right{background-position:-264px -96px;}
+.icon-arrow-up{background-position:-289px -96px;}
+.icon-arrow-down{background-position:-312px -96px;}
+.icon-share-alt{background-position:-336px -96px;}
+.icon-resize-full{background-position:-360px -96px;}
+.icon-resize-small{background-position:-384px -96px;}
+.icon-plus{background-position:-408px -96px;}
+.icon-minus{background-position:-433px -96px;}
+.icon-asterisk{background-position:-456px -96px;}
+.icon-exclamation-sign{background-position:0 -120px;}
+.icon-gift{background-position:-24px -120px;}
+.icon-leaf{background-position:-48px -120px;}
+.icon-fire{background-position:-72px -120px;}
+.icon-eye-open{background-position:-96px -120px;}
+.icon-eye-close{background-position:-120px -120px;}
+.icon-warning-sign{background-position:-144px -120px;}
+.icon-plane{background-position:-168px -120px;}
+.icon-calendar{background-position:-192px -120px;}
+.icon-random{background-position:-216px -120px;}
+.icon-comment{background-position:-240px -120px;}
+.icon-magnet{background-position:-264px -120px;}
+.icon-chevron-up{background-position:-288px -120px;}
+.icon-chevron-down{background-position:-313px -119px;}
+.icon-retweet{background-position:-336px -120px;}
+.icon-shopping-cart{background-position:-360px -120px;}
+.icon-folder-close{background-position:-384px -120px;}
+.icon-folder-open{background-position:-408px -120px;}
+.icon-resize-vertical{background-position:-432px -119px;}
+.icon-resize-horizontal{background-position:-456px -118px;}
+.dropdown{position:relative;}
+.dropdown-toggle{*margin-bottom:-3px;}
+.dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
+.caret{display:inline-block;width:0;height:0;text-indent:-99999px;*text-indent:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000000;opacity:0.3;filter:alpha(opacity=30);content:"\2193";}
+.dropdown .caret{margin-top:8px;margin-left:2px;}
+.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100);}
+.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;max-width:220px;_width:160px;padding:4px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#ccc;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px;}
+.dropdown-menu .divider{height:1px;margin:5px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;}
+.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#555555;white-space:nowrap;}
+.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;}
+.dropdown.open{*z-index:1000;}.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
+.dropdown.open .dropdown-menu{display:block;}
+.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
+.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
+.collapse{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;position:relative;overflow:hidden;height:0;}.collapse.in{height:auto;}
+.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;opacity:0.4;filter:alpha(opacity=40);cursor:pointer;}
+.btn{display:inline-block;padding:4px 10px 4px;font-size:13px;line-height:18px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#fafafa;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow
 :inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);cursor:pointer;*margin-left:.3em;}.btn:first-child{*margin-left:0;}
+.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
+.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;color:rgba(0, 0, 0, 0.5);outline:0;}
+.btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.btn-large .icon{margin-top:1px;}
+.btn-small{padding:5px 9px;font-size:11px;line-height:16px;}
+.btn-small .icon{margin-top:-1px;}
+.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);color:#ffffff;}
+.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active{color:rgba(255, 255, 255, 0.75);}
+.btn-primary{background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-ms-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(top, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0044cc;}
+.btn-primary:active,.btn-primary.active{background-color:#003399 \9;}
+.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;}
+.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
+.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;}
+.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
+.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;}
+.btn-success:active,.btn-success.active{background-color:#408140 \9;}
+.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;}
+.btn-info:active,.btn-info.active{background-color:#24748c \9;}
+button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
+button.btn.large,input[type="submit"].btn.large{*padding-top:7px;*padding-bottom:7px;}
+button.btn.small,input[type="submit"].btn.small{*padding-top:3px;*padding-bottom:3px;}
+.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";}
+.btn-group:after{clear:both;}
+.btn-group:first-child{*margin-left:0;}
+.btn-group+.btn-group{margin-left:5px;}
+.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;}
+.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
+.btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
+.btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
+.btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
+.btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2;}
+.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
+.btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);*padding-top:5px;*padding-bottom:5px;}
+.btn-group.open{*z-index:1000;}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);}
+.btn .caret{margin-top:7px;margin-left:0;}
+.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);}
+.btn-primary .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret{border-top-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);}
+.btn-small .caret{margin-top:4px;}
+.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.alert,.alert-heading{color:#c09853;}
+.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;}
+.alert-success{background-color:#dff0d8;border-color:#d6e9c6;}
+.alert-success,.alert-success .alert-heading{color:#468847;}
+.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;}
+.alert-danger,.alert-error,.alert-danger .alert-heading,.alert-error .alert-heading{color:#b94a48;}
+.alert-info{background-color:#d9edf7;border-color:#bce8f1;}
+.alert-info,.alert-info .alert-heading{color:#3a87ad;}
+.alert-block{padding-top:14px;padding-bottom:14px;}
+.alert-block>p,.alert-block>ul{margin-bottom:0;}
+.alert-block p+p{margin-top:5px;}
+.nav{margin-left:0;margin-bottom:18px;list-style:none;}
+.nav>li>a{display:block;}
+.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
+.nav-list{padding-left:14px;padding-right:14px;margin-bottom:0;}
+.nav-list>li>a,.nav-list .nav-header{display:block;padding:3px 15px;margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
+.nav-list .nav-header{font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-transform:uppercase;}
+.nav-list>li+.nav-header{margin-top:9px;}
+.nav-list .active>a{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
+.nav-list .icon{margin-right:2px;}
+.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";}
+.nav-tabs:after,.nav-pills:after{clear:both;}
+.nav-tabs>li,.nav-pills>li{float:left;}
+.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
+.nav-tabs{border-bottom:1px solid #ddd;}
+.nav-tabs>li{margin-bottom:-1px;}
+.nav-tabs>li>a{padding-top:9px;padding-bottom:9px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;}
+.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
+.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.nav-pills .active>a,.nav-pills .active>a:hover{color:#ffffff;background-color:#0088cc;}
+.nav-stacked>li{float:none;}
+.nav-stacked>li>a{margin-right:0;}
+.nav-tabs.nav-stacked{border-bottom:0;}
+.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
+.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
+.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;}
+.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
+.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
+.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;}
+.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;margin-top:6px;}
+.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;}
+.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;}
+.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;}
+.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;}
+.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
+.tabs-stacked .open>a:hover{border-color:#999999;}
+.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";}
+.tabbable:after{clear:both;}
+.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;}
+.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
+.tab-content>.active,.pill-content>.active{display:block;}
+.tabs-below .nav-tabs{border-top:1px solid #ddd;}
+.tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;}
+.tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;}
+.tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;}
+.tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;}
+.tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
+.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
+.tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
+.tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
+.tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
+.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
+.tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
+.tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
+.navbar{overflow:visible;margin-bottom:18px;}
+.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
+.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box
 -shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;}
+.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;}
+.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
+.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
+.nav-collapse.collapse{height:auto;}
+.navbar .brand:hover{text-decoration:none;}
+.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;}
+.navbar .navbar-text{margin-bottom:0;line-height:40px;color:#999999;}.navbar .navbar-text a:hover{color:#ffffff;background-color:transparent;}
+.navbar .btn,.navbar .btn-group{margin-top:5px;}
+.navbar .btn-group .btn{margin-top:0;}
+.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";}
+.navbar-form:after{clear:both;}
+.navbar-form input,.navbar-form select{display:inline-block;margin-top:5px;margin-bottom:0;}
+.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
+.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
+.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;color:rgba(255, 255, 255, 0.75);background:#666;background:rgba(255, 255, 255, 0.3);border:1px solid #111;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query :-moz-placeholder{color:#eeeeee;}
+.navbar-search .search-query::-webkit-input-placeholder{color:#eeeeee;}
+.navbar-search .search-query:hover{color:#ffffff;background-color:#999999;background-color:rgba(255, 255, 255, 0.5);}
+.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
+.navbar-fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030;}
+.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
+.navbar .nav.pull-right{float:right;}
+.navbar .nav>li{display:block;float:left;}
+.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
+.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;}
+.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;background-color:rgba(0, 0, 0, 0.5);}
+.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;}
+.navbar .nav.pull-right{margin-left:10px;margin-right:0;}
+.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
+.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
+.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;}
+.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);}
+.navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;}
+.navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;}
+.navbar .nav.pull-right .dropdown-menu{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before{left:auto;right:12px;}
+.navbar .nav.pull-right .dropdown-menu:after{left:auto;right:13px;}
+.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
+.breadcrumb .divider{padding:0 5px;color:#999999;}
+.breadcrumb .active a{color:#333333;}
+.pagination{height:36px;margin:18px 0;}
+.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
+.pagination li{display:inline;}
+.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;}
+.pagination a:hover,.pagination .active a{background-color:#f5f5f5;}
+.pagination .active a{color:#999999;cursor:default;}
+.pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;}
+.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.pagination-centered{text-align:center;}
+.pagination-right{text-align:right;}
+.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";}
+.pager:after{clear:both;}
+.pager li{display:inline;}
+.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.pager a:hover{text-decoration:none;background-color:#f5f5f5;}
+.pager .next a{float:right;}
+.pager .previous a{float:left;}
+.modal-open .dropdown-menu{z-index:2050;}
+.modal-open .dropdown.open{*z-index:2050;}
+.modal-open .popover{z-index:2060;}
+.modal-open .tooltip{z-index:2070;}
+.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
+.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
+.modal{position:fixed;top:50%;left:50%;z-index:1050;max-height:500px;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
+.modal.fade.in{top:50%;}
+.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
+.modal-body{padding:15px;}
+.modal-footer{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";}
+.modal-footer:after{clear:both;}
+.modal-footer .btn{float:right;margin-left:5px;margin-bottom:0;}
+.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
+.tooltip.top{margin-top:-2px;}
+.tooltip.right{margin-left:2px;}
+.tooltip.bottom{margin-top:2px;}
+.tooltip.left{margin-left:-2px;}
+.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
+.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
+.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
+.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
+.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.tooltip-arrow{position:absolute;width:0;height:0;}
+.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;}
+.popover.right{margin-left:5px;}
+.popover.bottom{margin-top:5px;}
+.popover.left{margin-left:-5px;}
+.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
+.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
+.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
+.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
+.popover .arrow{position:absolute;width:0;height:0;}
+.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
+.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}
+.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;}
+.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";}
+.thumbnails:after{clear:both;}
+.thumbnails>li{float:left;margin:0 0 18px 20px;}
+.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}
+a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
+.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
+.thumbnail .caption{padding:9px;}
+.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;background-color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.label-important{background-color:#b94a48;}
+.label-warning{background-color:#f89406;}
+.label-success{background-color:#468847;}
+.label-info{background-color:#3a87ad;}
+@-webkit-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,
  0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s e
 ase;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
+.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-
 45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
+.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
+.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);}
+.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-l
 inear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);}
+.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-
 linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);}
+.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-lin
 ear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.accordion{margin-bottom:18px;}
+.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.accordion-heading{border-bottom:0;}
+.accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
+.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
+.carousel{position:relative;margin-bottom:18px;line-height:1;}
+.carousel-inner{overflow:hidden;width:100%;position:relative;}
+.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}
+.carousel .item>img{display:block;line-height:1;}
+.carousel .active,.carousel .next,.carousel .prev{display:block;}
+.carousel .active{left:0;}
+.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;}
+.carousel .next{left:100%;}
+.carousel .prev{left:-100%;}
+.carousel .next.left,.carousel .prev.right{left:0;}
+.carousel .active.left{left:-100%;}
+.carousel .active.right{left:100%;}
+.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
+.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
+.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);}
+.carousel-caption h4,.carousel-caption p{color:#ffffff;}
+.hero-unit{padding:60px;margin-bottom:30px;background-color:#f5f5f5;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;}
+.hero-unit p{font-size:18px;font-weight:200;line-height:27px;}
+.pull-right{float:right;}
+.pull-left{float:left;}
+.hide{display:none;}
+.show{display:block;}
+.invisible{visibility:hidden;}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.responsive.css
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.responsive.css b/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.responsive.css
new file mode 100644
index 0000000..bc3f2ab
--- /dev/null
+++ b/assembly/src/release/examples/stomp/websocket/css/bootstrap.min.responsive.css
@@ -0,0 +1,3 @@
+
+.hidden{display:none;visibility:hidden;}
+@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input[class*="span"],.input-append input[class*="span"]{width:auto;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:768px){.container{width:a
 uto;padding:0 20px;} .row-fluid{width:100%;} .row{margin-left:0;} .row>[class*="span"],.row-fluid>[class*="span"]{float:none;display:block;width:auto;margin:0;}}@media (min-width:768px) and (max-width:980px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .span1{width:42px;} .span2{width:104px;} .span3{width:166px;} .span4{width:228px;} .span5{width:290px;} .span6{width:352px;} .span7{width:414px;} .span8{width:476px;} .span9{width:538px;} .span10{width:600px;} .span11{width:662px;} .span12,.container{width:724px;} .offset1{margin-left:82px;} .offset2{margin-left:144px;} .offset3{margin-left:206px;} .offset4{margin-left:268px;} .offset5{margin-left:330px;} .offset6{margin-left:392px;} .offset7{margin-left:454px;} .offset8{margin-left:516px;} .offset9{margin-left:578px;} .offset10{margin-left:640px;} .offset11{margin-left:702px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.ro
 w-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.762430939%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.801104972%;} .row-fluid .span2{width:14.364640883%;} .row-fluid .span3{width:22.928176794%;} .row-fluid .span4{width:31.491712705%;} .row-fluid .span5{width:40.055248616%;} .row-fluid .span6{width:48.618784527%;} .row-fluid .span7{width:57.182320438000005%;} .row-fluid .span8{width:65.74585634900001%;} .row-fluid .span9{width:74.30939226%;} .row-fluid .span10{width:82.87292817100001%;} .row-fluid .span11{width:91.436464082%;} .row-fluid .span12{width:99.999999993%;} input.span1,textarea.span1,.uneditable-input.span1{width:32px;} input.span2,textarea.span2,.uneditable-input.span2{width:94px;} input.span3,textarea.span3,.uneditable-input.span3{width:156px;} input.span4,textarea.span4,.uneditable-input.span4{width:218px;} input.span5,textarea.span5,.uneditable-input.span5{
 width:280px;} input.span6,textarea.span6,.uneditable-input.span6{width:342px;} input.span7,textarea.span7,.uneditable-input.span7{width:404px;} input.span8,textarea.span8,.uneditable-input.span8{width:466px;} input.span9,textarea.span9,.uneditable-input.span9{width:528px;} input.span10,textarea.span10,.uneditable-input.span10{width:590px;} input.span11,textarea.span11,.uneditable-input.span11{width:652px;} input.span12,textarea.span12,.uneditable-input.span12{width:714px;}}@media (max-width:980px){body{padding-top:0;} .navbar-fixed-top{position:static;margin-bottom:18px;} .navbar-fixed-top .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .navbar .nav-collapse{clear:left;} .navbar .nav{float:none;margin:0 0 9px;} .navbar .nav>li{float:none;} .navbar .nav>li>a{margin-bottom:2px;} .navbar .nav>.divider-vertical{display:none;} .navbar .nav>li>a,.navbar .dropdown-menu a{padding:6px 15px;font-weig
 ht:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .navbar .dropdown-menu li+li a{margin-bottom:2px;} .navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover{background-color:#222222;} .navbar .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .navbar .dropdown-menu:before,.navbar .dropdown-menu:after{display:none;} .navbar .dropdown-menu .divider{display:none;} .navbar-form,.navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 
 0 rgba(255, 255, 255, 0.1);} .navbar .nav.pull-right{float:none;margin-left:0;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;} .btn-navbar{display:block;} .nav-collapse{overflow:hidden;height:0;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .span1{width:70px;} .span2{width:170px;} .span3{width:270px;} .span4{width:370px;} .span5{width:470px;} .span6{width:570px;} .span7{width:670px;} .span8{width:770px;} .span9{width:870px;} .span10{width:970px;} .span11{width:1070px;} .span12,.container{width:1170px;} .offset1{margin-left:130px;} .offset2{margin-left:230px;} .offset3{margin-left:330px;} .offset4{margin-left:430px;} .offset5{margin-left:530px;} .offset6{margin-left:630px;} .offset7{margin-left:730px;} .offset8{margin-left:830px;} .offset9{margin-left:930px;} .
 offset10{margin-left:1030px;} .offset11{margin-left:1130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.564102564%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.982905983%;} .row-fluid .span2{width:14.529914530000001%;} .row-fluid .span3{width:23.076923077%;} .row-fluid .span4{width:31.623931624%;} .row-fluid .span5{width:40.170940171000005%;} .row-fluid .span6{width:48.717948718%;} .row-fluid .span7{width:57.264957265%;} .row-fluid .span8{width:65.81196581200001%;} .row-fluid .span9{width:74.358974359%;} .row-fluid .span10{width:82.905982906%;} .row-fluid .span11{width:91.45299145300001%;} .row-fluid .span12{width:100%;} input.span1,textarea.span1,.uneditable-input.span1{width:60px;} input.span2,textarea.span2,.uneditable-input.span2{width:160px;} input.span3,textarea.span3,.uneditable-input.span3{width:260px;} inpu
 t.span4,textarea.span4,.uneditable-input.span4{width:360px;} input.span5,textarea.span5,.uneditable-input.span5{width:460px;} input.span6,textarea.span6,.uneditable-input.span6{width:560px;} input.span7,textarea.span7,.uneditable-input.span7{width:660px;} input.span8,textarea.span8,.uneditable-input.span8{width:760px;} input.span9,textarea.span9,.uneditable-input.span9{width:860px;} input.span10,textarea.span10,.uneditable-input.span10{width:960px;} input.span11,textarea.span11,.uneditable-input.span11{width:1060px;} input.span12,textarea.span12,.uneditable-input.span12{width:1160px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;}}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings-white.png b/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings-white.png
new file mode 100644
index 0000000..a20760b
Binary files /dev/null and b/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings-white.png differ

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings.png b/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings.png
new file mode 100644
index 0000000..92d4445
Binary files /dev/null and b/assembly/src/release/examples/stomp/websocket/img/glyphicons-halflings.png differ

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/index.html
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/index.html b/assembly/src/release/examples/stomp/websocket/index.html
new file mode 100644
index 0000000..03a27cc
--- /dev/null
+++ b/assembly/src/release/examples/stomp/websocket/index.html
@@ -0,0 +1,149 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Chat Example Using STOMP Over WebSockets</title>
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link href="css/bootstrap.min.css" rel="stylesheet">
+    <link href="css/bootstrap.min.responsive.css" rel="stylesheet">
+    <style type="text/css">
+      body { padding-top: 40px; }
+    </style>
+  </head>
+
+  <body>
+    
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="brand" href="#">ActiveMQ STOMP WebSocket Chat Example</a>
+        </div>
+      </div>
+    </div>
+
+    <div class="container-fluid">
+      <div class="row-fluid">
+        <div class="span6">
+          <div id="connect">
+            <div class="page-header">
+              <h2>Server Login</h2>
+            </div>
+            <form class="form-horizontal" id='connect_form'>
+              <fieldset>
+                <div class="control-group">
+                  <label>WebSocket URL</label>
+                  <div class="controls">
+                    <input name=url id='connect_url' value='ws://localhost:61623' type="text">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>User</label>
+                  <div class="controls">
+                    <input id='connect_login' placeholder="User Login" value="admin" type="text">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>Password</label>
+                  <div class="controls">
+                    <input id='connect_passcode' placeholder="User Password" value="password" type="password">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>Destination</label>
+                  <div class="controls">
+                    <input id='destination' placeholder="Destination" value="/topic/chat.general" type="text">
+                  </div>
+                </div>
+                <div class="form-actions">
+                  <button id='connect_submit' type="submit" class="btn btn-large btn-primary">Connect</button>
+                </div>
+              </fieldset>
+            </form>
+          </div>
+          <div id="connected" style="display:none">
+            <div class="page-header">
+              <h2>Chat Room</h2>
+            </div>
+            <div id="messages">
+            </div>
+            <form class="well form-search" id='send_form'>
+              <button class="btn" type="button" id='disconnect' style="float:right">Disconnect</button>
+              <input class="input-medium" id='send_form_input' placeholder="Type your message here" class="span6"/>
+              <button class="btn" type="submit">Send</button>
+            </form>
+          </div>
+        </div>
+        <div class="span4">
+          <div class="page-header">
+            <h2>Debug Log</h2>
+          </div>
+          <pre id="debug"></pre>
+        </div>
+      </div>
+    </div>
+
+    <!-- Scripts placed at the end of the document so the pages load faster -->
+    <script src='js/jquery-1.7.2.min.js'></script>
+    <script src="js/stomp.js"></script>
+    <script>//<![CDATA[
+    $(document).ready(function() {
+      if(window.WebSocket) {
+        var client, destination;
+        $('#connect_form').submit(function() {
+          var url = $("#connect_url").val();
+          var login = $("#connect_login").val();
+          var passcode = $("#connect_passcode").val();
+          destination = $("#destination").val();
+
+          client = Stomp.client(url);
+
+          // this allows to display debug logs directly on the web page
+          client.debug = function(str) {
+            $("#debug").append(str + "\n");
+          };
+          
+          // the client is notified when it is connected to the server.
+          client.connect(login, passcode, function(frame) {
+            client.debug("connected to Stomp");
+            $('#connect').fadeOut({ duration: 'fast' });
+            $('#connected').fadeIn();
+            client.subscribe(destination, function(message) {
+              $("#messages").append("<p>" + message.body + "</p>\n");
+            });
+          });
+          return false;
+        });
+  
+        $('#disconnect').click(function() {
+          client.disconnect(function() {
+            $('#connected').fadeOut({ duration: 'fast' });
+            $('#connect').fadeIn();
+            $("#messages").html("")
+          });
+          return false;
+        });
+   
+        $('#send_form').submit(function() {
+          var text = $('#send_form_input').val();
+          if (text) {
+            client.send(destination, {}, text);
+            $('#send_form_input').val("");
+          }
+          return false;
+        });
+      } else {
+        $("#connect").html("\
+            <h1>Get a new Web Browser!</h1>\
+            <p>\
+            Your browser does not support WebSockets. This example will not work properly.<br>\
+            Please use a Web Browser with WebSockets support (WebKit or Google Chrome).\
+            </p>\
+        ");
+      }
+    });
+    //]]></script>
+
+  </body>
+</html>


[05/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stompest/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stompest/readme.md b/assembly/src/release/examples/stomp/python/stompest/readme.md
new file mode 100644
index 0000000..a1a912b
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stompest/readme.md
@@ -0,0 +1,14 @@
+Prereqs
+=======
+
+Install the [stomppy](http://code.google.com/p/stomppy) python client
+library.
+
+easy_install users can install it by running:
+
+     easy_install stompest
+
+The stompest client library supports a blocking API, and you can find an
+example of it's use in the `sync` directory.  It also supports using 
+a non-blocking API based on Twisted, and that example can be found in 
+the `async` directory.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stompest/sync/__init__.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stompest/sync/__init__.py b/assembly/src/release/examples/stomp/python/stompest/sync/__init__.py
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stompest/sync/listener.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stompest/sync/listener.py b/assembly/src/release/examples/stomp/python/stompest/sync/listener.py
new file mode 100644
index 0000000..2110ee0
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stompest/sync/listener.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+"""
+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.
+"""
+import os
+import sys
+import time
+
+from stompest.config import StompConfig
+from stompest.sync import Stomp
+
+user = os.getenv('ACTIVEMQ_USER') or 'admin'
+password = os.getenv('ACTIVEMQ_PASSWORD') or 'password'
+host = os.getenv('ACTIVEMQ_HOST') or 'localhost'
+port = int(os.getenv('ACTIVEMQ_PORT') or 61613)
+destination = sys.argv[1:2] or ['/topic/event']
+destination = destination[0]
+
+config = StompConfig('tcp://%s:%d' % (host, port), login=user, passcode=password, version='1.1')
+client = Stomp(config)
+
+client.connect(host='mybroker')
+client.subscribe(destination=destination, headers={'id': 'required-for-STOMP-1.1'})
+
+count = 0
+start = time.time()
+
+while (not count) or client.canRead(0):
+    client.receiveFrame()
+    count += 1
+
+diff = time.time() - start
+print 'Received %s frames in %f seconds' % (count, diff)
+
+client.disconnect(receipt='bye')
+client.receiveFrame()
+client.close()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stompest/sync/publisher.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stompest/sync/publisher.py b/assembly/src/release/examples/stomp/python/stompest/sync/publisher.py
new file mode 100644
index 0000000..d666244
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stompest/sync/publisher.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+"""
+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.
+"""
+import os
+import sys
+import time
+
+from stompest.config import StompConfig
+from stompest.sync import Stomp
+
+user = os.getenv('ACTIVEMQ_USER') or 'admin'
+password = os.getenv('ACTIVEMQ_PASSWORD') or 'password'
+host = os.getenv('ACTIVEMQ_HOST') or 'localhost'
+port = int(os.getenv('ACTIVEMQ_PORT') or 61613)
+destination = sys.argv[1:2] or ['/topic/event']
+destination = destination[0]
+
+messages = 10000
+data = 'Hello World from Python'
+
+config = StompConfig('tcp://%s:%d' % (host, port), login=user, passcode=password, version='1.1')
+client = Stomp(config)
+client.connect(host='mybroker')
+
+count = 0
+start = time.time()
+
+for _ in xrange(messages):
+    client.send(destination=destination, body=data, headers={'persistent': 'false'})
+    count += 1
+
+diff = time.time() - start
+print 'Sent %s frames in %f seconds' % (count, diff)
+  
+client.disconnect(receipt='bye')
+client.receiveFrame()
+client.close()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stomppy/listener.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stomppy/listener.py b/assembly/src/release/examples/stomp/python/stomppy/listener.py
new file mode 100755
index 0000000..81fadaf
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stomppy/listener.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+ 
+import time
+import sys
+import os
+import stomp
+
+user = os.getenv("ACTIVEMQ_USER") or "admin"
+password = os.getenv("ACTIVEMQ_PASSWORD") or "password"
+host = os.getenv("ACTIVEMQ_HOST") or "localhost"
+port = os.getenv("ACTIVEMQ_PORT") or 61613
+destination = sys.argv[1:2] or ["/topic/event"]
+destination = destination[0]
+
+class MyListener(object):
+  
+  def __init__(self, conn):
+    self.conn = conn
+    self.count = 0
+    self.start = time.time()
+  
+  def on_error(self, headers, message):
+    print('received an error %s' % message)
+
+  def on_message(self, headers, message):
+    if message == "SHUTDOWN":
+    
+      diff = time.time() - self.start
+      print("Received %s in %f seconds" % (self.count, diff))
+      conn.disconnect()
+      sys.exit(0)
+      
+    else:
+      if self.count==0:
+        self.start = time.time()
+        
+      self.count += 1
+      if self.count % 1000 == 0:
+         print("Received %s messages." % self.count)
+
+conn = stomp.Connection(host_and_ports = [(host, port)])
+conn.set_listener('', MyListener(conn))
+conn.start()
+conn.connect(login=user,passcode=password)
+conn.subscribe(destination=destination, ack='auto')
+print("Waiting for messages...")
+while 1: 
+  time.sleep(10) 

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stomppy/publisher.py
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stomppy/publisher.py b/assembly/src/release/examples/stomp/python/stomppy/publisher.py
new file mode 100755
index 0000000..4e5e0bf
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stomppy/publisher.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+ 
+import time
+import sys
+import os
+import stomp
+
+user = os.getenv("ACTIVEMQ_USER") or "admin"
+password = os.getenv("ACTIVEMQ_PASSWORD") or "password"
+host = os.getenv("ACTIVEMQ_HOST") or "localhost"
+port = os.getenv("ACTIVEMQ_PORT") or 61613
+destination = sys.argv[1:2] or ["/topic/event"]
+destination = destination[0]
+
+messages = 10000
+data = "Hello World from Python"
+
+conn = stomp.Connection(host_and_ports = [(host, port)])
+conn.start()
+conn.connect(login=user,passcode=password)
+
+for i in range(0, messages):
+  conn.send(data, destination=destination, persistent='false')
+  
+conn.send("SHUTDOWN", destination=destination, persistent='false')
+
+conn.disconnect()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/python/stomppy/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/python/stomppy/readme.md b/assembly/src/release/examples/stomp/python/stomppy/readme.md
new file mode 100644
index 0000000..1819d35
--- /dev/null
+++ b/assembly/src/release/examples/stomp/python/stomppy/readme.md
@@ -0,0 +1,10 @@
+Prereqs
+=======
+
+Install the [stomppy](http://code.google.com/p/stomppy) python client
+library.
+
+easy_install users can install it by running:
+
+     easy_install http://stomppy.googlecode.com/files/stomp.py-3.0.2a.tar.gz
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/ruby/catstomp.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/ruby/catstomp.rb b/assembly/src/release/examples/stomp/ruby/catstomp.rb
new file mode 100755
index 0000000..e39af47
--- /dev/null
+++ b/assembly/src/release/examples/stomp/ruby/catstomp.rb
@@ -0,0 +1,43 @@
+#!/usr/bin/env ruby
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+require 'rubygems'
+require 'stomp'
+
+user = ENV["ACTIVEMQ_USER"] || "admin"
+password = ENV["ACTIVEMQ_PASSWORD"] || "password"
+host = ENV["ACTIVEMQ_HOST"] || "localhost"
+port = ENV["ACTIVEMQ_PORT"] || 61613
+destination = $*[0] || "/topic/event"
+
+begin
+  
+  $stderr.print "Connecting to stomp://#{host}:#{port} as #{user}\n"
+  conn = Stomp::Connection.open user, password, host, port, true
+  $stderr.print "Sending input to #{destination}\n"
+
+  headers = {'persistent'=>'false'} 
+  headers['reply-to'] = $*[1] if $*[1] != NIL
+
+  STDIN.each_line { |line| 
+      conn.publish destination, line, headers
+  }
+  conn.disconnect
+
+rescue 
+end
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/ruby/listener.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/ruby/listener.rb b/assembly/src/release/examples/stomp/ruby/listener.rb
new file mode 100755
index 0000000..b3db3cb
--- /dev/null
+++ b/assembly/src/release/examples/stomp/ruby/listener.rb
@@ -0,0 +1,54 @@
+#!/usr/bin/env ruby
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+ 
+require 'rubygems'
+require 'stomp'
+
+user = ENV["ACTIVEMQ_USER"] || "admin"
+password = ENV["ACTIVEMQ_PASSWORD"] || "password"
+host = ENV["ACTIVEMQ_HOST"] || "localhost"
+port = ENV["ACTIVEMQ_PORT"] || 61613
+destination = $*[0] || "/topic/event"
+
+conn = Stomp::Connection.open user, password, host, port, false 
+count = 0
+
+conn.subscribe destination, { :ack =>"auto" }
+start = Time.now
+$stdout.print "Waiting for messages...\n"
+while true 
+	msg = conn.receive
+	if msg.command == "MESSAGE" 
+		if msg.body == "SHUTDOWN"
+			diff = Time.now - start
+			$stdout.print "Received #{count} in #{diff} seconds\n";
+			exit 0
+	
+		else
+		  start = Time.now if count==0 
+			count += 1;
+			if count % 1000 == 0
+ 				$stdout.print "Received #{count} messages.\n"
+			end
+		end
+	else
+ 		$stdout.print "#{msg.command}: #{msg.body}\n"
+	end
+end
+
+conn.disconnect

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/ruby/publisher.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/ruby/publisher.rb b/assembly/src/release/examples/stomp/ruby/publisher.rb
new file mode 100755
index 0000000..be7c0da
--- /dev/null
+++ b/assembly/src/release/examples/stomp/ruby/publisher.rb
@@ -0,0 +1,45 @@
+#!/usr/bin/env ruby
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+ 
+require 'rubygems'
+require 'stomp'
+
+messages = 10000
+size = 256
+
+user = ENV["ACTIVEMQ_USER"] || "admin"
+password = ENV["ACTIVEMQ_PASSWORD"] || "password"
+host = ENV["ACTIVEMQ_HOST"] || "localhost"
+port = ENV["ACTIVEMQ_PORT"] || 61613
+destination = $*[0] || "/topic/event"
+
+conn = Stomp::Connection.open user, password, host, port, false 
+
+DATA = "abcdefghijklmnopqrstuvwxyz";
+body = "";
+for i in 0..(size-1)
+  body += DATA[ i % DATA.length,1]
+end
+
+for i in 1..messages
+  conn.publish destination, body, {'persistent'=>'false'}
+  $stdout.print "Sent #{i} messages\n" if i%1000==0
+end
+
+conn.publish destination, "SHUTDOWN", {'persistent'=>'false'}
+conn.disconnect

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/ruby/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/ruby/readme.md b/assembly/src/release/examples/stomp/ruby/readme.md
new file mode 100644
index 0000000..cf8efbf
--- /dev/null
+++ b/assembly/src/release/examples/stomp/ruby/readme.md
@@ -0,0 +1,27 @@
+Prereqs
+=======
+
+- Install RubyGems see: http://docs.rubygems.org/
+- Install the stomp gem.  Run: gem install stomp
+
+Overview of stompcat.rb and catstomp.rb 
+==========================================
+
+The basic idea behind these scripts to to create something like netcat except over JMS
+destinations.
+
+catstomp.rb - takes stdin and sends it to a stomp destination
+stompcat.rb - outputs data received from a stomp destination
+
+A simple example usage:
+
+In console 1 run:
+cat | ./catstomp.rb
+
+In console 2 run:
+./stompcat.rb
+
+now any line you enter into console 1 will get sent to console 2.
+
+Hopefully these to scripts can get merged together in the future and the command line
+arguments can change so that it look more like netcat.

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/ruby/stompcat.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/ruby/stompcat.rb b/assembly/src/release/examples/stomp/ruby/stompcat.rb
new file mode 100755
index 0000000..20e2667
--- /dev/null
+++ b/assembly/src/release/examples/stomp/ruby/stompcat.rb
@@ -0,0 +1,45 @@
+#!/usr/bin/env ruby
+# ------------------------------------------------------------------------
+# 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.
+# ------------------------------------------------------------------------
+
+require 'rubygems'
+require 'stomp'
+
+user = ENV["ACTIVEMQ_USER"] || "admin"
+password = ENV["ACTIVEMQ_PASSWORD"] || "password"
+host = ENV["ACTIVEMQ_HOST"] || "localhost"
+port = ENV["ACTIVEMQ_PORT"] || 61613
+destination = $*[0] || "/topic/event"
+
+begin
+
+  $stderr.print "Connecting to stomp://#{host}:#{port} as #{user}\n"
+  conn = Stomp::Connection.open user, password, host, port, true
+  $stderr.print "Getting output from #{destination}\n"
+
+  conn.subscribe destination, { :ack =>"client" }
+  while true
+      msg = conn.receive
+      $stdout.print msg.body
+      $stdout.flush
+      conn.ack msg.headers["message-id"]
+  end
+  conn.disconnect
+  
+rescue 
+end
+


[12/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/js/mqttws31.js
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/js/mqttws31.js b/assembly/src/release/examples/mqtt/websocket/js/mqttws31.js
new file mode 100644
index 0000000..5c2f3e3
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/websocket/js/mqttws31.js
@@ -0,0 +1,1876 @@
+/*******************************************************************************
+ * Copyright (c) 2013 IBM Corp.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Eclipse Distribution License v1.0 which accompany this distribution. 
+ *
+ * The Eclipse Public License is available at 
+ *    http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at 
+ *   http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *    Andrew Banks - initial API and implementation and initial documentation
+ *******************************************************************************/
+
+
+// Only expose a single object name in the global namespace.
+// Everything must go through this module. Global Messaging module
+// only has a single public function, client, which returns
+// a Messaging client object given connection details.
+ 
+/**
+ * @namespace Messaging 
+ * Send and receive messages using web browsers.
+ * <p> 
+ * This programming interface lets a JavaScript client application use the MQTT V3.1 protocol to 
+ * connect to an MQTT-supporting messaging server.
+ *  
+ * The function supported includes:
+ * <ol>
+ * <li>Connecting to and disconnecting from a server. The server is identified by its host name and port number. 
+ * <li>Specifying options that relate to the communications link with the server, 
+ * for example the frequency of keep-alive heartbeats, and whether SSL/TLS is required.
+ * <li>Subscribing to and receiving messages from MQTT Topics.
+ * <li>Publishing messages to MQTT Topics.
+ * </ol>
+ * <p>
+ * <h2>The API consists of two main objects:</h2>
+ * The <b>Messaging.Client</b> object. This contains methods that provide the functionality of the API,
+ * including provision of callbacks that notify the application when a message arrives from or is delivered to the messaging server,
+ * or when the status of its connection to the messaging server changes.
+ * <p>
+ * The <b>Messaging.Message</b> object. This encapsulates the payload of the message along with various attributes
+ * associated with its delivery, in particular the destination to which it has been (or is about to be) sent. 
+ * <p>
+ * The programming interface validates parameters passed to it, and will throw an Error containing an error message
+ * intended for developer use, if it detects an error with any parameter.
+ * <p>
+ * Example:
+ * 
+ * <code><pre>
+client = new Messaging.Client(location.hostname, Number(location.port), "clientId");
+client.onConnectionLost = onConnectionLost;
+client.onMessageArrived = onMessageArrived;
+client.connect({onSuccess:onConnect});
+
+function onConnect() {
+  // Once a connection has been made, make a subscription and send a message.
+  console.log("onConnect");
+  client.subscribe("/World");
+  message = new Messaging.Message("Hello");
+  message.destinationName = "/World";
+  client.send(message); 
+};
+function onConnectionLost(responseObject) {
+  if (responseObject.errorCode !== 0)
+    console.log("onConnectionLost:"+responseObject.errorMessage);
+};
+function onMessageArrived(message) {
+  console.log("onMessageArrived:"+message.payloadString);
+  client.disconnect(); 
+};	
+ * </pre></code>
+ * <p>
+ * Other programming languages,
+ * <a href="/clients/java/doc/javadoc/index.html"><big>Java</big></a>,
+ * <a href="/clients/c/doc/html/index.html"><big>C</big></a>.
+ */
+Messaging = (function (global) {
+
+    // Private variables below, these are only visible inside the function closure
+    // which is used to define the module. 
+
+	var version = "0.0.0.0";
+	var buildLevel = "@BUILDLEVEL@";
+	
+    /** 
+     * Unique message type identifiers, with associated
+     * associated integer values.
+     * @private 
+     */
+    var MESSAGE_TYPE = {
+        CONNECT: 1, 
+        CONNACK: 2, 
+        PUBLISH: 3,
+        PUBACK: 4,
+        PUBREC: 5, 
+        PUBREL: 6,
+        PUBCOMP: 7,
+        SUBSCRIBE: 8,
+        SUBACK: 9,
+        UNSUBSCRIBE: 10,
+        UNSUBACK: 11,
+        PINGREQ: 12,
+        PINGRESP: 13,
+        DISCONNECT: 14
+    };
+    
+    // Collection of utility methods used to simplify module code 
+    // and promote the DRY pattern.  
+
+    /**
+     * Validate an object's parameter names to ensure they 
+     * match a list of expected variables name for this option
+     * type. Used to ensure option object passed into the API don't
+     * contain erroneous parameters.
+     * @param {Object} obj User options object
+     * @param {key:type, key2:type, ...} valid keys and types that may exist in obj. 
+     * @throws {Error} Invalid option parameter found. 
+     * @private 
+     */
+    var validate = function(obj, keys) {
+        for(key in obj) {
+        	if (obj.hasOwnProperty(key)) {       		
+        	    if (keys.hasOwnProperty(key)) {
+        	        if (typeof obj[key] !== keys[key])
+        		       throw new Error(format(ERROR.INVALID_TYPE, [typeof obj[key], key]));
+        	    } else {	
+            	    var errorStr = "Unknown property, " + key + ". Valid properties are:";
+            	    for (key in keys)
+            		    if (keys.hasOwnProperty(key))
+            		        errorStr = errorStr+" "+key;
+            	    throw new Error(errorStr);
+                }
+        	}
+        }
+    };
+
+    /**
+     * Return a new function which runs the user function bound
+     * to a fixed scope. 
+     * @param {function} User function
+     * @param {object} Function scope  
+     * @return {function} User function bound to another scope
+     * @private 
+     */
+    var scope = function (f, scope) {
+        return function () {
+            return f.apply(scope, arguments);
+        };
+    };
+    
+    /** 
+     * Unique message type identifiers, with associated
+     * associated integer values.
+     * @private 
+     */
+    var ERROR = {
+    	OK: {code:0, text:"AMQJSC0000I OK."},
+    	CONNECT_TIMEOUT: {code:1, text:"AMQJSC0001E Connect timed out."},
+        SUBSCRIBE_TIMEOUT: {code:2, text:"AMQJS0002E Subscribe timed out."}, 
+        UNSUBSCRIBE_TIMEOUT: {code:3, text:"AMQJS0003E Unsubscribe timed out."},
+        PING_TIMEOUT: {code:4, text:"AMQJS0004E Ping timed out."},
+        INTERNAL_ERROR: {code:5, text:"AMQJS0005E Internal error."},
+        CONNACK_RETURNCODE: {code:6, text:"AMQJS0006E Bad Connack return code:{0} {1}."},
+        SOCKET_ERROR: {code:7, text:"AMQJS0007E Socket error:{0}."},
+        SOCKET_CLOSE: {code:8, text:"AMQJS0008I Socket closed."},
+        MALFORMED_UTF: {code:9, text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."},
+        UNSUPPORTED: {code:10, text:"AMQJS0010E {0} is not supported by this browser."},
+        INVALID_STATE: {code:11, text:"AMQJS0011E Invalid state {0}."},
+        INVALID_TYPE: {code:12, text:"AMQJS0012E Invalid type {0} for {1}."},
+        INVALID_ARGUMENT: {code:13, text:"AMQJS0013E Invalid argument {0} for {1}."},
+        UNSUPPORTED_OPERATION: {code:14, text:"AMQJS0014E Unsupported operation."},
+        INVALID_STORED_DATA: {code:15, text:"AMQJS0015E Invalid data in local storage key={0} value={1}."},
+        INVALID_MQTT_MESSAGE_TYPE: {code:16, text:"AMQJS0016E Invalid MQTT message type {0}."},
+        MALFORMED_UNICODE: {code:17, text:"AMQJS0017E Malformed Unicode string:{0} {1}."},
+    };
+    
+    /** CONNACK RC Meaning. */
+    var CONNACK_RC = {
+   		0:"Connection Accepted",
+   		1:"Connection Refused: unacceptable protocol version",
+   		2:"Connection Refused: identifier rejected",
+   		3:"Connection Refused: server unavailable",
+   		4:"Connection Refused: bad user name or password",
+   		5:"Connection Refused: not authorized"
+    };
+ 
+    /**
+     * Format an error message text.
+     * @private
+     * @param {error} ERROR.KEY value above.
+     * @param {substitutions} [array] substituted into the text.
+     * @return the text with the substitutions made.
+     */
+    var format = function(error, substitutions) {
+    	var text = error.text;
+    	if (substitutions) {
+    	  for (var i=0; i<substitutions.length; i++) {
+    		field = "{"+i+"}";
+    		start = text.indexOf(field);
+    		if(start > 0) {
+    			var part1 = text.substring(0,start);
+    			var part2 = text.substring(start+field.length);
+    			text = part1+substitutions[i]+part2;
+    		}
+    	  }
+    	}
+    	return text;
+    };
+    
+    //MQTT protocol and version        6    M    Q    I    s    d    p    3
+    var MqttProtoIdentifier = [0x00,0x06,0x4d,0x51,0x49,0x73,0x64,0x70,0x03];
+    
+    /**
+     * @ignore
+     * Construct an MQTT wire protocol message.
+     * @param type MQTT packet type.
+     * @param options optional wire message attributes.
+     * 
+     * Optional properties
+     * 
+     * messageIdentifier: message ID in the range [0..65535]
+     * payloadMessage:	Application Message - PUBLISH only
+     * connectStrings:	array of 0 or more Strings to be put into the CONNECT payload
+     * topics:			array of strings (SUBSCRIBE, UNSUBSCRIBE)
+     * requestQoS:		array of QoS values [0..2]
+     *  
+     * "Flag" properties 
+     * cleanSession:	true if present / false if absent (CONNECT)
+     * willMessage:  	true if present / false if absent (CONNECT)
+     * isRetained:		true if present / false if absent (CONNECT)
+     * userName:		true if present / false if absent (CONNECT)
+     * password:		true if present / false if absent (CONNECT)
+     * keepAliveInterval:	integer [0..65535]  (CONNECT)
+     *
+     * @private
+     */
+    var WireMessage = function (type, options) { 	
+        this.type = type;
+        for(name in options) {
+            if (options.hasOwnProperty(name)) {
+                this[name] = options[name];
+            }
+        }
+    };
+    
+    WireMessage.prototype.encode = function() {
+    	// Compute the first byte of the fixed header
+    	var first = ((this.type & 0x0f) << 4);
+    	
+    	/*
+    	 * Now calculate the length of the variable header + payload by adding up the lengths
+    	 * of all the component parts
+    	 */
+
+    	remLength = 0;
+    	topicStrLength = new Array();
+    	
+    	// if the message contains a messageIdentifier then we need two bytes for that
+    	if (this.messageIdentifier != undefined)
+    		remLength += 2;
+
+    	switch(this.type) {
+    	    // If this a Connect then we need to include 12 bytes for its header
+	        case MESSAGE_TYPE.CONNECT:
+	        	remLength += MqttProtoIdentifier.length + 3;
+                remLength += UTF8Length(this.clientId) + 2;
+			    if (this.willMessage != undefined) {
+			    	remLength += UTF8Length(this.willMessage.destinationName) + 2;
+                    // Will message is always a string, sent as UTF-8 characters with a preceding length.
+				    var willMessagePayloadBytes = this.willMessage.payloadBytes;
+				    if (!(willMessagePayloadBytes instanceof Uint8Array))
+		        		willMessagePayloadBytes = new Uint8Array(payloadBytes);
+                    remLength += willMessagePayloadBytes.byteLength +2;
+    	        }
+                if (this.userName != undefined)
+                    remLength += UTF8Length(this.userName) + 2;
+                if (this.password != undefined)
+                    remLength += UTF8Length(this.password) + 2;
+			break;
+
+			// Subscribe, Unsubscribe can both contain topic strings
+	        case MESSAGE_TYPE.SUBSCRIBE:	        	
+	        	first |= 0x02; // Qos = 1;
+	        	for ( var i = 0; i < this.topics.length; i++) {
+	        		topicStrLength[i] = UTF8Length(this.topics[i]);
+	        		remLength += topicStrLength[i] + 2;
+	        	}
+	        	remLength += this.requestedQos.length; // 1 byte for each topic's Qos
+	        	// QoS on Subscribe only
+	        	break;
+
+	        case MESSAGE_TYPE.UNSUBSCRIBE:
+	        	first |= 0x02; // Qos = 1;
+	        	for ( var i = 0; i < this.topics.length; i++) {
+	        		topicStrLength[i] = UTF8Length(this.topics[i]);
+	        		remLength += topicStrLength[i] + 2;
+	        	}
+	        	break;
+
+	        case MESSAGE_TYPE.PUBLISH:
+	        	if (this.payloadMessage.duplicate) first |= 0x08;
+	        	first  = first |= (this.payloadMessage.qos << 1);
+	        	if (this.payloadMessage.retained) first |= 0x01;
+	        	destinationNameLength = UTF8Length(this.payloadMessage.destinationName);
+	        	remLength += destinationNameLength + 2;	   
+	        	var payloadBytes = this.payloadMessage.payloadBytes;
+	        	remLength += payloadBytes.byteLength;  
+	        	if (payloadBytes instanceof ArrayBuffer)
+	        		payloadBytes = new Uint8Array(payloadBytes);
+	        	else if (!(payloadBytes instanceof Uint8Array))
+	        		payloadBytes = new Uint8Array(payloadBytes.buffer);
+	        	break;
+
+	        case MESSAGE_TYPE.DISCONNECT:
+	        	break;
+
+	        default:
+	        	;
+    	}
+
+    	// Now we can allocate a buffer for the message
+
+    	var mbi = encodeMBI(remLength);  // Convert the length to MQTT MBI format
+    	var pos = mbi.length + 1;        // Offset of start of variable header
+    	var buffer = new ArrayBuffer(remLength + pos);
+    	var byteStream = new Uint8Array(buffer);    // view it as a sequence of bytes
+
+    	//Write the fixed header into the buffer
+    	byteStream[0] = first;
+    	byteStream.set(mbi,1);
+
+    	// If this is a PUBLISH then the variable header starts with a topic
+    	if (this.type == MESSAGE_TYPE.PUBLISH)
+    		pos = writeString(this.payloadMessage.destinationName, destinationNameLength, byteStream, pos);
+    	// If this is a CONNECT then the variable header contains the protocol name/version, flags and keepalive time
+    	
+    	else if (this.type == MESSAGE_TYPE.CONNECT) {
+    		byteStream.set(MqttProtoIdentifier, pos);
+    		pos += MqttProtoIdentifier.length;
+    		var connectFlags = 0;
+    		if (this.cleanSession) 
+    			connectFlags = 0x02;
+    		if (this.willMessage != undefined ) {
+    			connectFlags |= 0x04;
+    			connectFlags |= (this.willMessage.qos<<3);
+    			if (this.willMessage.retained) {
+    				connectFlags |= 0x20;
+    			}
+    		}
+    		if (this.userName != undefined)
+    			connectFlags |= 0x80;
+            if (this.password != undefined)
+    		    connectFlags |= 0x40;
+    		byteStream[pos++] = connectFlags; 
+    		pos = writeUint16 (this.keepAliveInterval, byteStream, pos);
+    	}
+
+    	// Output the messageIdentifier - if there is one
+    	if (this.messageIdentifier != undefined)
+    		pos = writeUint16 (this.messageIdentifier, byteStream, pos);
+
+    	switch(this.type) {
+    	    case MESSAGE_TYPE.CONNECT:
+    		    pos = writeString(this.clientId, UTF8Length(this.clientId), byteStream, pos); 
+    		    if (this.willMessage != undefined) {
+    		        pos = writeString(this.willMessage.destinationName, UTF8Length(this.willMessage.destinationName), byteStream, pos);
+    		        pos = writeUint16(willMessagePayloadBytes.byteLength, byteStream, pos);
+    		        byteStream.set(willMessagePayloadBytes, pos);
+		        	pos += willMessagePayloadBytes.byteLength;
+    		        
+    	        }
+    		if (this.userName != undefined) 
+    			pos = writeString(this.userName, UTF8Length(this.userName), byteStream, pos);
+    		if (this.password != undefined) 
+    			pos = writeString(this.password, UTF8Length(this.password), byteStream, pos);
+    		break;
+
+    	    case MESSAGE_TYPE.PUBLISH:	
+    	    	// PUBLISH has a text or binary payload, if text do not add a 2 byte length field, just the UTF characters.	
+    	    	byteStream.set(payloadBytes, pos);
+    	    		
+    	    	break;
+
+//    	    case MESSAGE_TYPE.PUBREC:	
+//    	    case MESSAGE_TYPE.PUBREL:	
+//    	    case MESSAGE_TYPE.PUBCOMP:	
+//    	    	break;
+
+    	    case MESSAGE_TYPE.SUBSCRIBE:
+    	    	// SUBSCRIBE has a list of topic strings and request QoS
+    	    	for (var i=0; i<this.topics.length; i++) {
+    	    		pos = writeString(this.topics[i], topicStrLength[i], byteStream, pos);
+    	    		byteStream[pos++] = this.requestedQos[i];
+    	    	}
+    	    	break;
+
+    	    case MESSAGE_TYPE.UNSUBSCRIBE:	
+    	    	// UNSUBSCRIBE has a list of topic strings
+    	    	for (var i=0; i<this.topics.length; i++)
+    	    		pos = writeString(this.topics[i], topicStrLength[i], byteStream, pos);
+    	    	break;
+
+    	    default:
+    	    	// Do nothing.
+    	}
+
+    	return buffer;
+    }	
+
+    function decodeMessage(input) {
+    	//var msg = new Object();  // message to be constructed
+    	var first = input[0];
+    	var type = first >> 4;
+    	var messageInfo = first &= 0x0f;
+    	var pos = 1;
+    	
+
+    	// Decode the remaining length (MBI format)
+
+    	var digit;
+    	var remLength = 0;
+    	var multiplier = 1;
+    	do {
+    		digit = input[pos++];
+    		remLength += ((digit & 0x7F) * multiplier);
+    		multiplier *= 128;
+    	} while ((digit & 0x80) != 0);
+
+    	var wireMessage = new WireMessage(type);
+    	switch(type) {
+            case MESSAGE_TYPE.CONNACK:
+    	    	wireMessage.topicNameCompressionResponse = input[pos++];
+    	        wireMessage.returnCode = input[pos++];
+    		    break;
+    	    
+    	    case MESSAGE_TYPE.PUBLISH:     	    	
+    	    	var qos = (messageInfo >> 1) & 0x03;
+    	    	   		    
+    	    	var len = readUint16(input, pos);
+    		    pos += 2;
+    		    var topicName = parseUTF8(input, pos, len);
+    		    pos += len;
+    		    // If QoS 1 or 2 there will be a messageIdentifier
+                if (qos > 0) {
+    		        wireMessage.messageIdentifier = readUint16(input, pos);
+    		        pos += 2;
+                }
+                
+                var message = new Messaging.Message(input.subarray(pos));
+                if ((messageInfo & 0x01) == 0x01) 
+    	    		message.retained = true;
+    	    	if ((messageInfo & 0x08) == 0x08)
+    	    		message.duplicate =  true;
+                message.qos = qos;
+                message.destinationName = topicName;
+                wireMessage.payloadMessage = message;	
+    		    break;
+    	    
+    	    case  MESSAGE_TYPE.PUBACK:
+    	    case  MESSAGE_TYPE.PUBREC:	    
+    	    case  MESSAGE_TYPE.PUBREL:    
+    	    case  MESSAGE_TYPE.PUBCOMP:
+    	    case  MESSAGE_TYPE.UNSUBACK:    	    	
+    	    	wireMessage.messageIdentifier = readUint16(input, pos);
+        		break;
+    		    
+    	    case  MESSAGE_TYPE.SUBACK:
+    	    	wireMessage.messageIdentifier = readUint16(input, pos);
+        		pos += 2;
+    	        wireMessage.grantedQos = input.subarray(pos);	
+    		    break;
+    	
+    	    default:
+    	    	;
+    	}
+    	    	
+    	return wireMessage;	
+    }
+
+    function writeUint16(input, buffer, offset) {
+    	buffer[offset++] = input >> 8;      //MSB
+    	buffer[offset++] = input % 256;     //LSB 
+    	return offset;
+    }	
+
+    function writeString(input, utf8Length, buffer, offset) {
+    	offset = writeUint16(utf8Length, buffer, offset);
+    	stringToUTF8(input, buffer, offset);
+    	return offset + utf8Length;
+    }	
+
+    function readUint16(buffer, offset) {
+    	return 256*buffer[offset] + buffer[offset+1];
+    }	
+
+    /**
+     * Encodes an MQTT Multi-Byte Integer
+     * @private 
+     */
+    function encodeMBI(number) {
+    	var output = new Array(1);
+    	var numBytes = 0;
+
+    	do {
+    		var digit = number % 128;
+    		number = number >> 7;
+    		if (number > 0) {
+    			digit |= 0x80;
+    		}
+    		output[numBytes++] = digit;
+    	} while ( (number > 0) && (numBytes<4) );
+
+    	return output;
+    }
+
+    /**
+     * Takes a String and calculates its length in bytes when encoded in UTF8.
+     * @private
+     */
+    function UTF8Length(input) {
+    	var output = 0;
+    	for (var i = 0; i<input.length; i++) 
+    	{
+    		var charCode = input.charCodeAt(i);
+                if (charCode > 0x7FF)
+                   {
+                      // Surrogate pair means its a 4 byte character
+                      if (0xD800 <= charCode && charCode <= 0xDBFF)
+                        {
+                          i++;
+                          output++;
+                        }
+    		       output +=3;
+                   }
+    		else if (charCode > 0x7F)
+    			output +=2;
+    		else
+    			output++;
+    	} 
+    	return output;
+    }
+    
+    /**
+     * Takes a String and writes it into an array as UTF8 encoded bytes.
+     * @private
+     */
+    function stringToUTF8(input, output, start) {
+    	var pos = start;
+    	for (var i = 0; i<input.length; i++) {
+    		var charCode = input.charCodeAt(i);
+    		
+    		// Check for a surrogate pair.
+    		if (0xD800 <= charCode && charCode <= 0xDBFF) {
+    	        lowCharCode = input.charCodeAt(++i);
+    	        if (isNaN(lowCharCode)) {
+    	        	throw new Error(format(ERROR.MALFORMED_UNICODE, [charCode, lowCharCode]));
+    	        }
+    	        charCode = ((charCode - 0xD800)<<10) + (lowCharCode - 0xDC00) + 0x10000;
+    	    
+    	    }
+    		
+    		if (charCode <= 0x7F) {
+    			output[pos++] = charCode;
+    		} else if (charCode <= 0x7FF) {
+    			output[pos++] = charCode>>6  & 0x1F | 0xC0;
+    			output[pos++] = charCode     & 0x3F | 0x80;
+    		} else if (charCode <= 0xFFFF) {    				    
+    	        output[pos++] = charCode>>12 & 0x0F | 0xE0;
+        		output[pos++] = charCode>>6  & 0x3F | 0x80;   
+        		output[pos++] = charCode     & 0x3F | 0x80;   
+    		} else {
+    			output[pos++] = charCode>>18 & 0x07 | 0xF0;
+        		output[pos++] = charCode>>12 & 0x3F | 0x80;
+        		output[pos++] = charCode>>6  & 0x3F | 0x80;
+        		output[pos++] = charCode     & 0x3F | 0x80;
+    		};
+    	} 
+    	return output;
+    }
+    
+    function parseUTF8(input, offset, length) {
+    	var output = "";
+    	var utf16;
+    	var pos = offset;
+
+    	while (pos < offset+length)
+    	{
+    		var byte1 = input[pos++];
+    		if (byte1 < 128)
+    			utf16 = byte1;
+    		else 
+    		{
+    			var byte2 = input[pos++]-128;
+    			if (byte2 < 0) 
+    				throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16),""]));
+    			if (byte1 < 0xE0)             // 2 byte character
+    				utf16 = 64*(byte1-0xC0) + byte2;
+    			else 
+    			{ 
+    				var byte3 = input[pos++]-128;
+    				if (byte3 < 0) 
+    					throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16)]));
+    				if (byte1 < 0xF0)        // 3 byte character
+    					utf16 = 4096*(byte1-0xE0) + 64*byte2 + byte3;
+                                else
+                                {
+                                   var byte4 = input[pos++]-128;
+                                   if (byte4 < 0) 
+    					throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16), byte4.toString(16)]));
+                                   if (byte1 < 0xF8)        // 4 byte character 
+                                           utf16 = 262144*(byte1-0xF0) + 4096*byte2 + 64*byte3 + byte4;
+    				   else                     // longer encodings are not supported  
+    					throw new Error(format(ERROR.MALFORMED_UTF, [byte1.toString(16), byte2.toString(16), byte3.toString(16), byte4.toString(16)]));
+                                }
+    			}
+    		}  
+
+                if (utf16 > 0xFFFF)   // 4 byte character - express as a surrogate pair
+                  {
+                     utf16 -= 0x10000;
+                     output += String.fromCharCode(0xD800 + (utf16 >> 10)); // lead character
+                     utf16 = 0xDC00 + (utf16 & 0x3FF);  // trail character
+                  }
+    		output += String.fromCharCode(utf16);
+    	}
+    	return output;
+    }
+    
+    /** @ignore Repeat keepalive requests, monitor responses.*/
+    var Pinger = function(client, window, keepAliveInterval) { 
+    	this._client = client;        	
+     	this._window = window;
+     	this._keepAliveInterval = keepAliveInterval*1000;     	
+        this.isReset = false;
+        
+        var pingReq = new WireMessage(MESSAGE_TYPE.PINGREQ).encode(); 
+        
+        var doTimeout = function (pinger) {
+	        return function () {
+	            return doPing.apply(pinger);
+	        };
+	    };
+	    
+	    /** @ignore */
+        var doPing = function() { 
+        	if (!this.isReset) {
+        		this._client._trace("Pinger.doPing", "Timed out");
+        		this._client._disconnected( ERROR.PING_TIMEOUT.code , format(ERROR.PING_TIMEOUT));
+        	} else {
+        	    this.isReset = false;
+        	    this._client._trace("Pinger.doPing", "send PINGREQ");
+                this._client.socket.send(pingReq); 
+        	    this.timeout = this._window.setTimeout(doTimeout(this), this._keepAliveInterval);
+            }
+        }
+
+        this.reset = function() {
+        	this.isReset = true;
+        	this._window.clearTimeout(this.timeout);
+        	if (this._keepAliveInterval > 0)
+        		this.timeout = setTimeout(doTimeout(this), this._keepAliveInterval);
+        }
+
+        this.cancel = function() {
+        	this._window.clearTimeout(this.timeout);
+        }
+     }; 
+
+	/** @ignore Monitor request completion. */
+	var Timeout = function(client, window, timeoutSeconds, action, args) {
+		this._window = window;
+		if (!timeoutSeconds)
+			timeoutSeconds = 30;
+		
+		var doTimeout = function (action, client, args) {
+	        return function () {
+	            return action.apply(client, args);
+	        };
+	    };
+        this.timeout = setTimeout(doTimeout(action, client, args), timeoutSeconds * 1000);
+        
+		this.cancel = function() {
+			this._window.clearTimeout(this.timeout);
+		}
+	}; 
+    
+    /*
+	 * Internal implementation of the Websockets MQTT V3.1 client.
+	 * 
+	 * @name Messaging.ClientImpl @constructor 
+	 * @param {String} host the DNS nameof the webSocket host. 
+	 * @param {Number} port the port number for that host.
+	 * @param {String} clientId the MQ client identifier.
+	 */
+    var ClientImpl = function (host, port, clientId) {
+    	// Check dependencies are satisfied in this browser.
+    	if (!("WebSocket" in global && global["WebSocket"] !== null)) {
+            throw new Error(format(ERROR.UNSUPPORTED, ["WebSocket"]));
+ 	    } 
+        if (!("localStorage" in global && global["localStorage"] !== null)) {
+         	throw new Error(format(ERROR.UNSUPPORTED, ["localStorage"]));
+        }
+        if (!("ArrayBuffer" in global && global["ArrayBuffer"] !== null)) {
+         	throw new Error(format(ERROR.UNSUPPORTED, ["ArrayBuffer"]));
+        }
+    	
+        this._trace("Messaging.Client", host, port, clientId);
+
+        this.host = host;
+        this.port = port;
+        this.clientId = clientId;
+
+        // Local storagekeys are qualified with the following string.
+        this._localKey=host+":"+port+":"+clientId+":";
+
+        // Create private instance-only message queue
+        // Internal queue of messages to be sent, in sending order. 
+        this._msg_queue = [];
+
+        // Messages we have sent and are expecting a response for, indexed by their respective message ids. 
+        this._sentMessages = {};
+
+        // Messages we have received and acknowleged and are expecting a confirm message for
+        // indexed by their respective message ids. 
+        this._receivedMessages = {};
+ 
+        // Internal list of callbacks to be executed when messages
+        // have been successfully sent over web socket, e.g. disconnect
+        // when it doesn't have to wait for ACK, just message is dispatched.
+        this._notify_msg_sent = {};
+
+        // Unique identifier for SEND messages, incrementing
+        // counter as messages are sent.
+        this._message_identifier = 1;
+        
+        // Used to determine the transmission sequence of stored sent messages.
+    	this._sequence = 0;
+    	
+
+        // Load the local state, if any, from the saved version, only restore state relevant to this client.   	
+        for(key in localStorage)
+        	if (   key.indexOf("Sent:"+this._localKey) == 0  		    
+        	    || key.indexOf("Received:"+this._localKey) == 0)
+        	this.restore(key);
+    };
+
+    // Messaging Client public instance members. 
+    ClientImpl.prototype.host;
+    ClientImpl.prototype.port;
+    ClientImpl.prototype.clientId;
+
+    // Messaging Client private instance members.
+    ClientImpl.prototype.socket;
+    /* true once we have received an acknowledgement to a CONNECT packet. */
+    ClientImpl.prototype.connected = false;
+    /* The largest message identifier allowed, may not be larger than 2**16 but 
+     * if set smaller reduces the maximum number of outbound messages allowed.
+     */ 
+    ClientImpl.prototype.maxMessageIdentifier = 65536;
+    ClientImpl.prototype.connectOptions;
+    ClientImpl.prototype.hostIndex;
+    ClientImpl.prototype.onConnectionLost;
+    ClientImpl.prototype.onMessageDelivered;
+    ClientImpl.prototype.onMessageArrived;
+    ClientImpl.prototype._msg_queue = null;
+    ClientImpl.prototype._connectTimeout;
+    /* The sendPinger monitors how long we allow before we send data to prove to the server that we are alive. */
+    ClientImpl.prototype.sendPinger = null;
+    /* The receivePinger monitors how long we allow before we require evidence that the server is alive. */
+    ClientImpl.prototype.receivePinger = null;
+    
+    ClientImpl.prototype._traceBuffer = null;
+    ClientImpl.prototype._MAX_TRACE_ENTRIES = 100;
+
+    ClientImpl.prototype.connect = function (connectOptions) {
+    	var connectOptionsMasked = this._traceMask(connectOptions, "password"); 
+    	this._trace("Client.connect", connectOptionsMasked, this.socket, this.connected);
+        
+    	if (this.connected) 
+        	throw new Error(format(ERROR.INVALID_STATE, ["already connected"]));
+    	if (this.socket)
+    		throw new Error(format(ERROR.INVALID_STATE, ["already connected"]));
+        
+    	this.connectOptions = connectOptions;
+    	
+    	if (connectOptions.hosts) {
+    	    this.hostIndex = 0;
+    	    this._doConnect(connectOptions.hosts[0], connectOptions.ports[0]);  
+    	} else {
+            this._doConnect(this.host, this.port);  		
+    	}
+        
+    };
+
+    ClientImpl.prototype.subscribe = function (filter, subscribeOptions) {
+    	this._trace("Client.subscribe", filter, subscribeOptions);
+              
+    	if (!this.connected)
+    	    throw new Error(format(ERROR.INVALID_STATE, ["not connected"]));
+    	
+        var wireMessage = new WireMessage(MESSAGE_TYPE.SUBSCRIBE);
+        wireMessage.topics=[filter];
+        if (subscribeOptions.qos != undefined)
+        	wireMessage.requestedQos = [subscribeOptions.qos];
+        else 
+        	wireMessage.requestedQos = [0];
+        
+        if (subscribeOptions.onSuccess) {
+            wireMessage.callback = function() {subscribeOptions.onSuccess({invocationContext:subscribeOptions.invocationContext});};
+        }
+        if (subscribeOptions.timeout) {
+        	wireMessage.timeOut = new Timeout(this, window, subscribeOptions.timeout, subscribeOptions.onFailure
+        			, [{invocationContext:subscribeOptions.invocationContext, 
+        				errorCode:ERROR.SUBSCRIBE_TIMEOUT.code, 
+        				errorMessage:format(ERROR.SUBSCRIBE_TIMEOUT)}]);
+        }
+        
+        // All subscriptions return a SUBACK. 
+        this._requires_ack(wireMessage);
+        this._schedule_message(wireMessage);
+    };
+
+    /** @ignore */
+    ClientImpl.prototype.unsubscribe = function(filter, unsubscribeOptions) {  
+    	this._trace("Client.unsubscribe", filter, unsubscribeOptions);
+        
+    	if (!this.connected)
+    	   throw new Error(format(ERROR.INVALID_STATE, ["not connected"]));
+    	
+    	var wireMessage = new WireMessage(MESSAGE_TYPE.UNSUBSCRIBE);
+        wireMessage.topics = [filter];
+        
+        if (unsubscribeOptions.onSuccess) {
+        	wireMessage.callback = function() {unsubscribeOptions.onSuccess({invocationContext:unsubscribeOptions.invocationContext});};
+        }
+        if (unsubscribeOptions.timeout) {
+        	wireMessage.timeOut = new Timeout(this, window, unsubscribeOptions.timeout, unsubscribeOptions.onFailure
+        			, [{invocationContext:unsubscribeOptions.invocationContext,
+        				errorCode:ERROR.UNSUBSCRIBE_TIMEOUT.code,
+        				errorMessage:format(ERROR.UNSUBSCRIBE_TIMEOUT)}]);
+        }
+     
+        // All unsubscribes return a SUBACK.         
+        this._requires_ack(wireMessage);
+        this._schedule_message(wireMessage);
+    };
+     
+    ClientImpl.prototype.send = function (message) {
+        this._trace("Client.send", message);
+
+        if (!this.connected)
+           throw new Error(format(ERROR.INVALID_STATE, ["not connected"]));
+        
+        wireMessage = new WireMessage(MESSAGE_TYPE.PUBLISH);
+        wireMessage.payloadMessage = message;
+        
+        if (message.qos > 0)
+            this._requires_ack(wireMessage);
+        else if (this.onMessageDelivered)
+        	this._notify_msg_sent[wireMessage] = this.onMessageDelivered(wireMessage.payloadMessage);
+        this._schedule_message(wireMessage);
+    };
+    
+    ClientImpl.prototype.disconnect = function () {
+        this._trace("Client.disconnect");
+
+        if (!this.socket)
+    		throw new Error(format(ERROR.INVALID_STATE, ["not connecting or connected"]));
+        
+        wireMessage = new WireMessage(MESSAGE_TYPE.DISCONNECT);
+
+        // Run the disconnected call back as soon as the message has been sent,
+        // in case of a failure later on in the disconnect processing.
+        // as a consequence, the _disconected call back may be run several times.
+        this._notify_msg_sent[wireMessage] = scope(this._disconnected, this);
+
+        this._schedule_message(wireMessage);
+    };
+    
+   ClientImpl.prototype.getTraceLog = function () {
+        if ( this._traceBuffer !== null ) {
+            this._trace("Client.getTraceLog", new Date());
+            this._trace("Client.getTraceLog in flight messages", this._sentMessages.length);
+            for (key in this._sentMessages)
+                this._trace("_sentMessages ",key, this._sentMessages[key]);
+            for (key in this._receivedMessages)
+                this._trace("_receivedMessages ",key, this._receivedMessages[key]);
+
+            return this._traceBuffer;
+        }
+    };
+
+    ClientImpl.prototype.startTrace = function () {
+        if ( this._traceBuffer === null ) {
+            this._traceBuffer = [];
+        }
+        this._trace("Client.startTrace", new Date(), version);
+    };
+
+    ClientImpl.prototype.stopTrace = function () {
+        delete this._traceBuffer;
+    };
+
+    ClientImpl.prototype._doConnect = function (host, port) { 	        
+        // When the socket is open, this client will send the CONNECT WireMessage using the saved parameters. 
+        if (this.connectOptions.useSSL)
+          wsurl = ["wss://", host, ":", port, "/mqtt"].join("");
+        else
+          wsurl = ["ws://", host, ":", port, "/mqtt"].join("");
+        this.connected = false;
+        this.socket = new WebSocket(wsurl, 'mqttv3.1');
+        this.socket.binaryType = 'arraybuffer';
+        this.socket.onopen = scope(this._on_socket_open, this);
+        this.socket.onmessage = scope(this._on_socket_message, this);
+        this.socket.onerror = scope(this._on_socket_error, this);
+        this.socket.onclose = scope(this._on_socket_close, this);
+        
+        this.sendPinger = new Pinger(this, window, this.connectOptions.keepAliveInterval);
+        this.receivePinger = new Pinger(this, window, this.connectOptions.keepAliveInterval);
+        
+        this._connectTimeout = new Timeout(this, window, this.connectOptions.timeout, this._disconnected,  [ERROR.CONNECT_TIMEOUT.code, format(ERROR.CONNECT_TIMEOUT)]);
+    };
+
+    
+    // Schedule a new message to be sent over the WebSockets
+    // connection. CONNECT messages cause WebSocket connection
+    // to be started. All other messages are queued internally
+    // until this has happened. When WS connection starts, process
+    // all outstanding messages. 
+    ClientImpl.prototype._schedule_message = function (message) {
+        this._msg_queue.push(message);
+        // Process outstanding messages in the queue if we have an  open socket, and have received CONNACK. 
+        if (this.connected) {
+            this._process_queue();
+        }
+    };
+
+    ClientImpl.prototype.store = function(prefix, wireMessage) {
+    	storedMessage = {type:wireMessage.type, messageIdentifier:wireMessage.messageIdentifier, version:1};
+    	
+    	switch(wireMessage.type) {
+	      case MESSAGE_TYPE.PUBLISH:
+	    	  if(wireMessage.pubRecReceived)
+	    		  storedMessage.pubRecReceived = true;
+	    	  
+	    	  // Convert the payload to a hex string.
+	    	  storedMessage.payloadMessage = {};
+	    	  var hex = "";
+	          var messageBytes = wireMessage.payloadMessage.payloadBytes;
+	          for (var i=0; i<messageBytes.length; i++) {
+	            if (messageBytes[i] <= 0xF)
+	              hex = hex+"0"+messageBytes[i].toString(16);
+	            else 
+	              hex = hex+messageBytes[i].toString(16);
+	          }
+	    	  storedMessage.payloadMessage.payloadHex = hex;
+	    	  
+	    	  storedMessage.payloadMessage.qos = wireMessage.payloadMessage.qos;
+	    	  storedMessage.payloadMessage.destinationName = wireMessage.payloadMessage.destinationName;
+	    	  if (wireMessage.payloadMessage.duplicate) 
+	    		  storedMessage.payloadMessage.duplicate = true;
+	    	  if (wireMessage.payloadMessage.retained) 
+	    		  storedMessage.payloadMessage.retained = true;	   
+	    	  
+	    	  // Add a sequence number to sent messages.
+	    	  if ( prefix.indexOf("Sent:") == 0 ) {
+	    		  if ( wireMessage.sequence === undefined )
+	    		      wireMessage.sequence = ++this._sequence;
+	    		  storedMessage.sequence = wireMessage.sequence;
+	    	  }
+	          break;    
+	          
+	        default:
+	        	throw Error(format(ERROR.INVALID_STORED_DATA, [key, storedMessage]));
+  	    }
+    	localStorage.setItem(prefix+this._localKey+wireMessage.messageIdentifier, JSON.stringify(storedMessage));
+    };
+    
+    ClientImpl.prototype.restore = function(key) {    	
+    	var value = localStorage.getItem(key);
+    	var storedMessage = JSON.parse(value);
+    	
+    	var wireMessage = new WireMessage(storedMessage.type, storedMessage);
+    	
+    	switch(storedMessage.type) {
+	      case MESSAGE_TYPE.PUBLISH:
+	    	  // Replace the payload message with a Message object.
+	    	  var hex = storedMessage.payloadMessage.payloadHex;
+	    	  var buffer = new ArrayBuffer((hex.length)/2);
+              var byteStream = new Uint8Array(buffer); 
+              var i = 0;
+              while (hex.length >= 2) { 
+            	  var x = parseInt(hex.substring(0, 2), 16);
+	              hex = hex.substring(2, hex.length);
+	              byteStream[i++] = x;
+	          }
+              var payloadMessage = new Messaging.Message(byteStream);
+	      	  
+	    	  payloadMessage.qos = storedMessage.payloadMessage.qos;
+	    	  payloadMessage.destinationName = storedMessage.payloadMessage.destinationName;
+              if (storedMessage.payloadMessage.duplicate) 
+	    		  payloadMessage.duplicate = true;
+	    	  if (storedMessage.payloadMessage.retained) 
+	    		  payloadMessage.retained = true;	 
+	    	  wireMessage.payloadMessage = payloadMessage;
+              
+	          break;    
+	          
+	        default:
+	          throw Error(format(ERROR.INVALID_STORED_DATA, [key, value]));
+	    }
+    	    		    	
+    	if (key.indexOf("Sent:"+this._localKey) == 0) {      
+    		this._sentMessages[wireMessage.messageIdentifier] = wireMessage;    		    
+    	} else if (key.indexOf("Received:"+this._localKey) == 0) {
+    		this._receivedMessages[wireMessage.messageIdentifier] = wireMessage;
+    	}
+    };
+    
+    ClientImpl.prototype._process_queue = function () {
+        var message = null;
+        // Process messages in order they were added
+        var fifo = this._msg_queue.reverse();
+
+        // Send all queued messages down socket connection
+        while ((message = fifo.pop())) {
+            this._socket_send(message);
+            // Notify listeners that message was successfully sent
+            if (this._notify_msg_sent[message]) {
+                this._notify_msg_sent[message]();
+                delete this._notify_msg_sent[message];
+            }
+        }
+    };
+
+    /**
+     * @ignore
+     * Expect an ACK response for this message. Add message to the set of in progress
+     * messages and set an unused identifier in this message.
+     */
+    ClientImpl.prototype._requires_ack = function (wireMessage) {
+    	var messageCount = Object.keys(this._sentMessages).length;
+        if (messageCount > this.maxMessageIdentifier)
+            throw Error ("Too many messages:"+messageCount);
+
+        while(this._sentMessages[this._message_identifier] !== undefined) {
+            this._message_identifier++;
+        }
+        wireMessage.messageIdentifier = this._message_identifier;
+        this._sentMessages[wireMessage.messageIdentifier] = wireMessage;
+        if (wireMessage.type === MESSAGE_TYPE.PUBLISH) {
+        	this.store("Sent:", wireMessage);
+        }
+        if (this._message_identifier === this.maxMessagIdentifier) {
+            this._message_identifier = 1;
+        }
+    };
+
+    /** 
+     * @ignore
+     * Called when the underlying websocket has been opened.
+     */
+    ClientImpl.prototype._on_socket_open = function () {        
+        // Create the CONNECT message object.
+        var wireMessage = new WireMessage(MESSAGE_TYPE.CONNECT, this.connectOptions); 
+        wireMessage.clientId = this.clientId;
+        this._socket_send(wireMessage);
+    };
+
+    /** 
+     * @ignore
+     * Called when the underlying websocket has received a complete packet.
+     */
+    ClientImpl.prototype._on_socket_message = function (event) {
+        this._trace("Client._on_socket_message", event.data);
+        
+        // Reset the receive ping timer, we now have evidence the server is alive.
+        this.receivePinger.reset();
+        var byteArray = new Uint8Array(event.data);
+        try {
+            var wireMessage = decodeMessage(byteArray);
+        } catch (error) {
+        	this._disconnected(ERROR.INTERNAL_ERROR.code , format(ERROR.INTERNAL_ERROR, [error.message]));
+        	return;
+        }
+        this._trace("Client._on_socket_message", wireMessage);
+
+        switch(wireMessage.type) {
+            case MESSAGE_TYPE.CONNACK:
+            	this._connectTimeout.cancel();
+            	
+            	// If we have started using clean session then clear up the local state.
+            	if (this.connectOptions.cleanSession) {
+    		    	for (key in this._sentMessages) {	    		
+    		    	    var sentMessage = this._sentMessages[key];
+    					localStorage.removeItem("Sent:"+this._localKey+sentMessage.messageIdentifier);
+    		    	}
+    				this._sentMessages = {};
+
+    				for (key in this._receivedMessages) {
+    					var receivedMessage = this._receivedMessages[key];
+    					localStorage.removeItem("Received:"+this._localKey+receivedMessage.messageIdentifier);
+    				}
+    				this._receivedMessages = {};
+            	}
+            	// Client connected and ready for business.
+            	if (wireMessage.returnCode === 0) {
+        	        this.connected = true;
+        	        // Jump to the end of the list of hosts and stop looking for a good host.
+        	        if (this.connectOptions.hosts)
+        	            this.hostIndex = this.connectOptions.hosts.length;
+                } else {
+                    this._disconnected(ERROR.CONNACK_RETURNCODE.code , format(ERROR.CONNACK_RETURNCODE, [wireMessage.returnCode, CONNACK_RC[wireMessage.returnCode]]));
+                    break;
+                }
+            	
+        	    // Resend messages.
+            	var sequencedMessages = new Array();
+            	for (var msgId in this._sentMessages) {
+            	    if (this._sentMessages.hasOwnProperty(msgId))
+            	        sequencedMessages.push(this._sentMessages[msgId]);
+            	}
+          
+        	    // Sort sentMessages into the original sent order.
+            	var sequencedMessages = sequencedMessages.sort(function(a,b) {return a.sequence - b.sequence;} );
+        	    for (var i=0, len=sequencedMessages.length; i<len; i++) {
+        	    	var sentMessage = sequencedMessages[i];
+        	    	if (sentMessage.type == MESSAGE_TYPE.PUBLISH && sentMessage.pubRecReceived) {
+        	    	    var pubRelMessage = new WireMessage(MESSAGE_TYPE.PUBREL, {messageIdentifier:sentMessage.messageIdentifier});
+        	            this._schedule_message(pubRelMessage);
+        	    	} else {
+        	    		this._schedule_message(sentMessage);
+        	    	};
+        	    }
+
+        	    // Execute the connectOptions.onSuccess callback if there is one.
+        	    if (this.connectOptions.onSuccess) {
+        	        this.connectOptions.onSuccess({invocationContext:this.connectOptions.invocationContext});
+        	    }
+
+        	    // Process all queued messages now that the connection is established. 
+        	    this._process_queue();
+        	    break;
+        
+            case MESSAGE_TYPE.PUBLISH:
+                this._receivePublish(wireMessage);
+                break;
+
+            case MESSAGE_TYPE.PUBACK:
+            	var sentMessage = this._sentMessages[wireMessage.messageIdentifier];
+                 // If this is a re flow of a PUBACK after we have restarted receivedMessage will not exist.
+            	if (sentMessage) {
+                    delete this._sentMessages[wireMessage.messageIdentifier];
+                    localStorage.removeItem("Sent:"+this._localKey+wireMessage.messageIdentifier);
+                    if (this.onMessageDelivered)
+                    	this.onMessageDelivered(sentMessage.payloadMessage);
+                }
+            	break;
+            
+            case MESSAGE_TYPE.PUBREC:
+                var sentMessage = this._sentMessages[wireMessage.messageIdentifier];
+                // If this is a re flow of a PUBREC after we have restarted receivedMessage will not exist.
+                if (sentMessage) {
+                	sentMessage.pubRecReceived = true;
+                    var pubRelMessage = new WireMessage(MESSAGE_TYPE.PUBREL, {messageIdentifier:wireMessage.messageIdentifier});
+                    this.store("Sent:", sentMessage);
+                    this._schedule_message(pubRelMessage);
+                }
+                break;
+            	            	
+            case MESSAGE_TYPE.PUBREL:
+                var receivedMessage = this._receivedMessages[wireMessage.messageIdentifier];
+                localStorage.removeItem("Received:"+this._localKey+wireMessage.messageIdentifier);
+                // If this is a re flow of a PUBREL after we have restarted receivedMessage will not exist.
+                if (receivedMessage) {
+                    this._receiveMessage(receivedMessage);
+                    delete this._receivedMessages[wireMessage.messageIdentifier];
+                }
+                // Always flow PubComp, we may have previously flowed PubComp but the server lost it and restarted.
+                pubCompMessage = new WireMessage(MESSAGE_TYPE.PUBCOMP, {messageIdentifier:wireMessage.messageIdentifier});
+                this._schedule_message(pubCompMessage);                    
+                    
+                
+                break;
+
+            case MESSAGE_TYPE.PUBCOMP: 
+            	var sentMessage = this._sentMessages[wireMessage.messageIdentifier];
+            	delete this._sentMessages[wireMessage.messageIdentifier];
+                localStorage.removeItem("Sent:"+this._localKey+wireMessage.messageIdentifier);
+                if (this.onMessageDelivered)
+                	this.onMessageDelivered(sentMessage.payloadMessage);
+                break;
+                
+            case MESSAGE_TYPE.SUBACK:
+                var sentMessage = this._sentMessages[wireMessage.messageIdentifier];
+                if (sentMessage) {
+                	if(sentMessage.timeOut)
+                	    sentMessage.timeOut.cancel();
+                    if (sentMessage.callback) {
+                        sentMessage.callback();
+                    }
+                    delete this._sentMessages[wireMessage.messageIdentifier];
+                }
+                break;
+        	    
+            case MESSAGE_TYPE.UNSUBACK:
+            	var sentMessage = this._sentMessages[wireMessage.messageIdentifier];
+                if (sentMessage) { 
+                	if (sentMessage.timeOut)
+                        sentMessage.timeOut.cancel();
+                    if (sentMessage.callback) {
+                        sentMessage.callback();
+                    }
+                    delete this._sentMessages[wireMessage.messageIdentifier];
+                }
+
+                break;
+                
+            case MESSAGE_TYPE.PINGRESP:
+            	/* The sendPinger or receivePinger may have sent a ping, the receivePinger has already been reset. */
+            	this.sendPinger.reset();
+            	break;
+            	
+            case MESSAGE_TYPE.DISCONNECT:
+            	// Clients do not expect to receive disconnect packets.
+            	this._disconnected(ERROR.INVALID_MQTT_MESSAGE_TYPE.code , format(ERROR.INVALID_MQTT_MESSAGE_TYPE, [wireMessage.type]));
+            	break;
+
+            default:
+            	this._disconnected(ERROR.INVALID_MQTT_MESSAGE_TYPE.code , format(ERROR.INVALID_MQTT_MESSAGE_TYPE, [wireMessage.type]));
+        }; 
+    };
+    
+    /** @ignore */
+    ClientImpl.prototype._on_socket_error = function (error) {
+    	this._disconnected(ERROR.SOCKET_ERROR.code , format(ERROR.SOCKET_ERROR, [error.data]));
+    };
+
+    /** @ignore */
+    ClientImpl.prototype._on_socket_close = function () {
+        this._disconnected(ERROR.SOCKET_CLOSE.code , format(ERROR.SOCKET_CLOSE));
+    };
+
+    /** @ignore */
+    ClientImpl.prototype._socket_send = function (wireMessage) {
+    	if (wireMessage.type == 1) {
+    		var wireMessageMasked = this._traceMask(wireMessage, "password"); 
+    		this._trace("Client._socket_send", wireMessageMasked);
+    	}
+    	else this._trace("Client._socket_send", wireMessage);
+        
+        this.socket.send(wireMessage.encode());
+        /* We have proved to the server we are alive. */
+        this.sendPinger.reset();
+    };
+    
+    /** @ignore */
+    ClientImpl.prototype._receivePublish = function (wireMessage) {
+        switch(wireMessage.payloadMessage.qos) {
+            case "undefined":
+            case 0:
+                this._receiveMessage(wireMessage);
+                break;
+
+            case 1:
+                var pubAckMessage = new WireMessage(MESSAGE_TYPE.PUBACK, {messageIdentifier:wireMessage.messageIdentifier});
+                this._schedule_message(pubAckMessage);
+                this._receiveMessage(wireMessage);
+                break;
+
+            case 2:
+                this._receivedMessages[wireMessage.messageIdentifier] = wireMessage;
+                this.store("Received:", wireMessage);
+                var pubRecMessage = new WireMessage(MESSAGE_TYPE.PUBREC, {messageIdentifier:wireMessage.messageIdentifier});
+                this._schedule_message(pubRecMessage);
+
+                break;
+
+            default:
+                throw Error("Invaild qos="+wireMmessage.payloadMessage.qos);
+        };
+    };
+
+    /** @ignore */
+    ClientImpl.prototype._receiveMessage = function (wireMessage) {
+        if (this.onMessageArrived) {
+            this.onMessageArrived(wireMessage.payloadMessage);
+        }
+    };
+
+    /**
+     * @ignore
+     * Client has disconnected either at its own request or because the server
+     * or network disconnected it. Remove all non-durable state.
+     * @param {errorCode} [number] the error number.
+     * @param {errorText} [string] the error text.
+     */
+    ClientImpl.prototype._disconnected = function (errorCode, errorText) {
+    	this._trace("Client._disconnected", errorCode, errorText);
+    	
+    	this.sendPinger.cancel();
+    	this.receivePinger.cancel();
+    	if (this._connectTimeout)
+    	    this._connectTimeout.cancel();
+    	// Clear message buffers.
+        this._msg_queue = [];
+        this._notify_msg_sent = {};
+       
+        if (this.socket) {
+            // Cancel all socket callbacks so that they cannot be driven again by this socket.
+            this.socket.onopen = null;
+            this.socket.onmessage = null;
+            this.socket.onerror = null;
+            this.socket.onclose = null;
+            if (this.socket.readyState === 1)
+                this.socket.close();
+            delete this.socket;           
+        }
+        
+        if (this.connectOptions.hosts && this.hostIndex < this.connectOptions.hosts.length-1) {
+        	// Try the next host.
+        	this.hostIndex++;
+        	this._doConnect(this.connectOptions.hosts[this.hostIndex], this.connectOptions.ports[this.hostIndex]);
+        
+        } else {
+        
+            if (errorCode === undefined) {
+        	    errorCode = ERROR.OK.code;
+        	    errorText = format(ERROR.OK);
+            }
+        	
+            // Run any application callbacks last as they may attempt to reconnect and hence create a new socket.
+            if (this.connected) {
+                this.connected = false;
+                // Execute the connectionLostCallback if there is one, and we were connected.       
+                if (this.onConnectionLost)
+            	    this.onConnectionLost({errorCode:errorCode, errorMessage:errorText});      	
+            } else {
+        	    // Otherwise we never had a connection, so indicate that the connect has failed.
+                if(this.connectOptions.onFailure)
+            	    this.connectOptions.onFailure({invocationContext:this.connectOptions.invocationContext, errorCode:errorCode, errorMessage:errorText});
+            }
+        }
+    };
+
+    /** @ignore */
+    ClientImpl.prototype._trace = function () {
+        if ( this._traceBuffer !== null ) {  
+            for (var i = 0, max = arguments.length; i < max; i++) {
+                if ( this._traceBuffer.length == this._MAX_TRACE_ENTRIES ) {    
+                    this._traceBuffer.shift();              
+                }
+                if (i === 0) this._traceBuffer.push(arguments[i]);
+                else if (typeof arguments[i] === "undefined" ) this._traceBuffer.push(arguments[i]);
+                else this._traceBuffer.push("  "+JSON.stringify(arguments[i]));
+           };
+        };
+    };
+    
+    /** @ignore */
+    ClientImpl.prototype._traceMask = function (traceObject, masked) {
+        var traceObjectMasked = {};
+	    for (var attr in traceObject) {
+	        if (traceObject.hasOwnProperty(attr)) {
+	        	if (attr == masked) 
+	        		traceObjectMasked[attr] = "******";
+	        	else
+	        		traceObjectMasked[attr] = traceObject[attr];
+	        } 
+	    }
+	    return traceObjectMasked;
+    };
+
+    // ------------------------------------------------------------------------
+    // Public Programming interface.
+    // ------------------------------------------------------------------------
+    
+    /** 
+     * The JavaScript application communicates to the server using a Messaging.Client object. 
+     * <p>
+     * Other programming languages,
+     * <a href="/clients/java/doc/javadoc/com/ibm/micro/client/mqttv3/MqttClient.html"><big>Java</big></a>,
+     * <a href="/clients/c/doc/html/index.html"><big>C</big></a>.
+     * <p>
+     * Most applications will create just one Client object and then call its connect() method,
+     * however applications can create more than one Client object if they wish. 
+     * In this case the combination of host, port and clientId attributes must be different for each Client object.
+     * <p>
+     * The send, subscribe and unsubscribe methods are implemented as asynchronous JavaScript methods 
+     * (even though the underlying protocol exchange might be synchronous in nature). 
+     * This means they signal their completion by calling back to the application, 
+     * via Success or Failure callback functions provided by the application on the method in question. 
+     * Such callbacks are called at most once per method invocation and do not persist beyond the lifetime 
+     * of the script that made the invocation.
+     * <p>
+     * In contrast there are some callback functions <i> most notably onMessageArrived</i> 
+     * that are defined on the Messaging.Client object.  
+     * These may get called multiple times, and aren't directly related to specific method invocations made by the client. 
+     *
+     * @name Messaging.Client    
+     * 
+     * @constructor
+     * Creates a Messaging.Client object that can be used to communicate with a Messaging server.
+     *  
+     * @param {string} host the address of the messaging server, as a DNS name or dotted decimal IP address.
+     * @param {number} port the port number in the host to connect to.
+     * @param {string} clientId the Messaging client identifier, between 1 and 23 characters in length.
+     * 
+     * @property {string} host <i>read only</i> the server's DNS hostname or dotted decimal IP address.
+     * @property {number} port <i>read only</i> the server's port.
+     * @property {string} clientId <i>read only</i> used when connecting to the server.
+     * @property {function} onConnectionLost called when a connection has been lost, 
+     * after a connect() method has succeeded.
+     * Establish the call back used when a connection has been lost. The connection may be
+     * lost because the client initiates a disconnect or because the server or network 
+     * cause the client to be disconnected. The disconnect call back may be called without 
+     * the connectionComplete call back being invoked if, for example the client fails to 
+     * connect.
+     * A single response object parameter is passed to the onConnectionLost callback containing the following fields:
+     * <ol>   
+     * <li>errorCode
+     * <li>errorMessage       
+     * </ol>
+     * @property {function} onMessageDelivered called when a message has been delivered. 
+     * All processing that this Client will ever do has been completed. So, for example,
+     * in the case of a Qos=2 message sent by this client, the PubComp flow has been received from the server
+     * and the message has been removed from persistent storage before this callback is invoked. 
+     * Parameters passed to the onMessageDelivered callback are:
+     * <ol>   
+     * <li>Messaging.Message that was delivered.
+     * </ol>    
+     * @property {function} onMessageArrived called when a message has arrived in this Messaging.client. 
+     * Parameters passed to the onMessageArrived callback are:
+     * <ol>   
+     * <li>Messaging.Message that has arrived.
+     * </ol>    
+     */
+    var Client = function (host, port, clientId) {
+    	if (typeof host !== "string")
+        	throw new Error(format(ERROR.INVALID_TYPE, [typeof host, "host"]));
+    	if (typeof port !== "number" || port < 0)
+        	throw new Error(format(ERROR.INVALID_TYPE, [typeof port, "port"]));
+    	
+    	var clientIdLength = 0;
+    	for (var i = 0; i<clientId.length; i++) {
+    		var charCode = clientId.charCodeAt(i);                   
+    		if (0xD800 <= charCode && charCode <= 0xDBFF)  {    			
+                 i++; // Surrogate pair.
+            }   		   
+    		clientIdLength++;
+    	}     	   	
+        if (typeof clientId !== "string" || clientIdLength < 1 | clientIdLength > 23)
+        	throw new Error(format(ERROR.INVALID_ARGUMENT, [clientId, "clientId"])); 
+    	
+        var client = new ClientImpl(host, port, clientId);
+        this._getHost =  function() { return client.host; };
+    	this._setHost = function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); };
+         	
+        this._getPort = function() { return client.port; };
+    	this._setPort = function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); };
+    	
+    	this._getClientId = function() { return client.clientId; };
+    	this._setClientId = function() { throw new Error(format(ERROR.UNSUPPORTED_OPERATION)); };
+        
+        this._getOnConnectionLost = function() { return client.onConnectionLost; };
+        this._setOnConnectionLost = function(newOnConnectionLost) { 
+            if (typeof newOnConnectionLost === "function")
+            	client.onConnectionLost = newOnConnectionLost;
+            else 
+    			throw new Error(format(ERROR.INVALID_TYPE, [typeof newOnConnectionLost, "onConnectionLost"]));
+        };
+
+        this._getOnMessageDelivered = function() { return client.onMessageDelivered; };
+    	this._setOnMessageDelivered = function(newOnMessageDelivered) { 
+    		if (typeof newOnMessageDelivered === "function")
+    			client.onMessageDelivered = newOnMessageDelivered;
+    		else 
+    			throw new Error(format(ERROR.INVALID_TYPE, [typeof newOnMessageDelivered, "onMessageDelivered"]));
+    	};
+       
+        this._getOnMessageArrived = function() { return client.onMessageArrived; };
+    	this._setOnMessageArrived = function(newOnMessageArrived) { 
+    		if (typeof newOnMessageArrived === "function")
+    			client.onMessageArrived = newOnMessageArrived;
+    		else 
+    			throw new Error(format(ERROR.INVALID_TYPE, [typeof newOnMessageArrived, "onMessageArrived"]));
+    	};
+        
+        /** 
+         * Connect this Messaging client to its server. 
+         * 
+         * @name Messaging.Client#connect
+         * @function
+         * @param {Object} [connectOptions] attributes used with the connection. 
+         * <p>
+         * Properties of the connect options are: 
+         * @config {number} [timeout] If the connect has not succeeded within this number of seconds, it is deemed to have failed.
+         *                            The default is 30 seconds.
+         * @config {string} [userName] Authentication username for this connection.
+         * @config {string} [password] Authentication password for this connection.
+         * @config {Messaging.Message} [willMessage] sent by the server when the client disconnects abnormally.
+         * @config {Number} [keepAliveInterval] the server disconnects this client if there is no activity for this
+         *                number of seconds. The default value of 60 seconds is assumed if not set.
+         * @config {boolean} [cleanSession] if true(default) the client and server persistent state is deleted on successful connect.
+         * @config {boolean} [useSSL] if present and true, use an SSL Websocket connection.
+         * @config {object} [invocationContext] passed to the onSuccess callback or onFailure callback.
+         * @config {function} [onSuccess] called when the connect acknowledgement has been received from the server.
+         * A single response object parameter is passed to the onSuccess callback containing the following fields:
+         * <ol>
+         * <li>invocationContext as passed in to the onSuccess method in the connectOptions.       
+         * </ol>
+         * @config {function} [onFailure] called when the connect request has failed or timed out.
+         * A single response object parameter is passed to the onFailure callback containing the following fields:
+         * <ol>
+         * <li>invocationContext as passed in to the onFailure method in the connectOptions.       
+         * <li>errorCode a number indicating the nature of the error.
+         * <li>errorMessage text describing the error.      
+         * </ol>
+         * @config {Array} [hosts] If present this set of hostnames is tried in order in place 
+         * of the host and port paramater on the construtor. The hosts and the matching ports are tried one at at time in order until
+         * one of then succeeds.
+         * @config {Array} [ports] If present this set of ports matching the hosts.
+         * @throws {InvalidState} if the client is not in disconnected state. The client must have received connectionLost
+         * or disconnected before calling connect for a second or subsequent time.
+         */
+        this.connect = function (connectOptions) {
+        	connectOptions = connectOptions || {} ;
+        	validate(connectOptions,  {timeout:"number",
+        			                   userName:"string", 
+        		                       password:"string", 
+        		                       willMessage:"object", 
+        		                       keepAliveInterval:"number", 
+        		                       cleanSession:"boolean", 
+        		                       useSSL:"boolean",
+        		                       invocationContext:"object", 
+      		                           onSuccess:"function", 
+      		                           onFailure:"function",
+      		                           hosts:"object",
+      		                           ports:"object"});
+        	
+        	// If no keep alive interval is set, assume 60 seconds.
+            if (connectOptions.keepAliveInterval === undefined)
+            	connectOptions.keepAliveInterval = 60;
+
+        	if (connectOptions.willMessage) {
+                if (!(connectOptions.willMessage instanceof Message))
+            	    throw new Error(format(ERROR.INVALID_TYPE, [connectOptions.willMessage, "connectOptions.willMessage"]));
+                // The will message must have a payload that can be represented as a string.
+                // Cause the willMessage to throw an exception if this is not the case.
+            	connectOptions.willMessage.stringPayload;
+            	
+            	if (typeof connectOptions.willMessage.destinationName === "undefined")
+                	throw new Error(format(ERROR.INVALID_TYPE, [typeof connectOptions.willMessage.destinationName, "connectOptions.willMessage.destinationName"]));
+        	}
+        	if (typeof connectOptions.cleanSession === "undefined")
+        		connectOptions.cleanSession = true;
+        	if (connectOptions.hosts) {
+        		if (!connectOptions.ports)
+        			throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.ports, "connectOptions.ports"]));
+        		if (!(connectOptions.hosts instanceof Array) )
+        			throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, "connectOptions.hosts"]));
+        		if (!(connectOptions.ports instanceof Array) )
+        			throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.ports, "connectOptions.ports"]));
+        		if (connectOptions.hosts.length <1 )
+        			throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, "connectOptions.hosts"]));
+        		if (connectOptions.hosts.length != connectOptions.ports.length)
+        			throw new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.ports, "connectOptions.ports"]));
+        		for (var i = 0; i<connectOptions.hosts.length; i++) {
+        			if (typeof connectOptions.hosts[i] !== "string")
+        	        	throw new Error(format(ERROR.INVALID_TYPE, [typeof connectOptions.hosts[i], "connectOptions.hosts["+i+"]"]));
+        			if (typeof connectOptions.ports[i] !== "number" || connectOptions.ports[i] < 0)
+        	        	throw new Error(format(ERROR.INVALID_TYPE, [typeof connectOptions.ports[i], "connectOptions.ports["+i+"]"]));
+        	    }
+        	}
+
+        	client.connect(connectOptions);
+        };
+     
+        /** 
+         * Subscribe for messages, request receipt of a copy of messages sent to the destinations described by the filter.
+         * 
+         * @name Messaging.Client#subscribe
+         * @function
+         * @param {string} filter describing the destinations to receive messages from.
+         * <br>
+         * @param {object} [subscribeOptions] used to control the subscription, as follows:
+         * <p>
+         * @config {number} [qos] the maiximum qos of any publications sent as a result of making this subscription.
+         * @config {object} [invocationContext] passed to the onSuccess callback or onFailure callback.
+         * @config {function} [onSuccess] called when the subscribe acknowledgement has been received from the server.
+         * A single response object parameter is passed to the onSuccess callback containing the following fields:
+         * <ol>
+         * <li>invocationContext if set in the subscribeOptions.       
+         * </ol>
+         * @config {function} [onFailure] called when the subscribe request has failed or timed out.
+         * A single response object parameter is passed to the onFailure callback containing the following fields:
+         * <ol>
+         * <li>invocationContext if set in the subscribeOptions.       
+         * <li>errorCode a number indicating the nature of the error.
+         * <li>errorMessage text describing the error.      
+         * </ol>
+         * @config {number} [timeout] which if present determines the number of seconds after which the onFailure calback is called
+         * the presence of a timeout does not prevent the onSuccess callback from being called when the MQTT Suback is eventually received.         
+    	 * @throws {InvalidState} if the client is not in connected state.
+         */
+        this.subscribe = function (filter, subscribeOptions) {
+        	if (typeof filter !== "string")
+        		throw new Error("Invalid argument:"+filter);
+        	subscribeOptions = subscribeOptions || {} ;
+        	validate(subscribeOptions,  {qos:"number", 
+        		                         invocationContext:"object", 
+        		                         onSuccess:"function", 
+        		                         onFailure:"function",
+        		                         timeout:"number"
+        		                        });
+        	if (subscribeOptions.timeout && !subscribeOptions.onFailure)
+        		throw new Error("subscribeOptions.timeout specified with no onFailure callback.");
+        	if (typeof subscribeOptions.qos !== "undefined" 
+        		&& !(subscribeOptions.qos === 0 || subscribeOptions.qos === 1 || subscribeOptions.qos === 2 ))
+    			throw new Error(format(ERROR.INVALID_ARGUMENT, [subscribeOptions.qos, "subscribeOptions.qos"]));
+            client.subscribe(filter, subscribeOptions);
+        };
+
+        /**
+         * Unsubscribe for messages, stop receiving messages sent to destinations described by the filter.
+         * 
+         * @name Messaging.Client#unsubscribe
+         * @function
+         * @param {string} filter describing the destinations to receive messages from.
+         * @param {object} [unsubscribeOptions] used to control the subscription, as follows:
+         * <p>
+         * @config {object} [invocationContext] passed to the onSuccess callback or onFailure callback.
+         * @config {function} [onSuccess] called when the unsubscribe acknowledgement has been receive dfrom the server.
+         * A single response object parameter is passed to the onSuccess callback containing the following fields:
+         * <ol>
+         * <li>invocationContext if set in the unsubscribeOptions.     
+         * </ol>
+         * @config {function} [onFailure] called when the unsubscribe request has failed or timed out.
+         * A single response object parameter is passed to the onFailure callback containing the following fields:
+         * <ol>
+         * <li>invocationContext if set in the unsubscribeOptions.       
+         * <li>errorCode a number indicating the nature of the error.
+         * <li>errorMessage text describing the error.      
+         * </ol>
+         * @config {number} [timeout] which if present determines the number of seconds after which the onFailure callback is called, the
+         * presence of a timeout does not prevent the onSuccess callback from being called when the MQTT UnSuback is eventually received.
+         * @throws {InvalidState} if the client is not in connected state.
+         */
+        this.unsubscribe = function (filter, unsubscribeOptions) {
+        	if (typeof filter !== "string")
+        		throw new Error("Invalid argument:"+filter);
+        	unsubscribeOptions = unsubscribeOptions || {} ;
+        	validate(unsubscribeOptions,  {invocationContext:"object", 
+        		                           onSuccess:"function", 
+        		                           onFailure:"function",
+        		                           timeout:"number"
+        		                          });
+        	if (unsubscribeOptions.timeout && !unsubscribeOptions.onFailure)
+        		throw new Error("unsubscribeOptions.timeout specified with no onFailure callback.");
+            client.unsubscribe(filter, unsubscribeOptions);
+        };
+
+        /**
+         * Send a message to the consumers of the destination in the Message.
+         * 
+         * @name Messaging.Client#send
+         * @function 
+         * @param {Messaging.Message} message to send.
+         
+         * @throws {InvalidState} if the client is not in connected state.
+         */   
+        this.send = function (message) {       	
+            if (!(message instanceof Message))
+                throw new Error("Invalid argument:"+typeof message);
+            if (typeof message.destinationName === "undefined")
+            	throw new Error("Invalid parameter Message.destinationName:"+message.destinationName);
+           
+            client.send(message);   
+        };
+        
+        /** 
+         * Normal disconnect of this Messaging client from its server.
+         * 
+         * @name Messaging.Client#disconnect
+         * @function
+         * @throws {InvalidState} if the client is not in connected or connecting state.     
+         */
+        this.disconnect = function () {
+        	client.disconnect();
+        };
+        
+        /** 
+         * Get the contents of the trace log.
+         * 
+         * @name Messaging.Client#getTraceLog
+         * @function
+         * @return {Object[]} tracebuffer containing the time ordered trace records.
+         */
+        this.getTraceLog = function () {
+        	return client.getTraceLog();
+        }
+        
+        /** 
+         * Start tracing.
+         * 
+         * @name Messaging.Client#startTrace
+         * @function
+         */
+        this.startTrace = function () {
+        	client.startTrace();
+        };
+        
+        /** 
+         * Stop tracing.
+         * 
+         * @name Messaging.Client#stopTrace
+         * @function
+         */
+        this.stopTrace = function () {
+            client.stopTrace();
+        };
+    };
+
+    Client.prototype = {
+        get host() { return this._getHost(); },
+        set host(newHost) { this._setHost(newHost); },
+        	
+        get port() { return this._getPort(); },
+        set port(newPort) { this._setPort(newPort); },
+        	
+        get clientId() { return this._getClientId(); },
+        set clientId(newClientId) { this._setClientId(newClientId); },
+
+        get onConnectionLost() { return this._getOnConnectionLost(); },
+        set onConnectionLost(newOnConnectionLost) { this._setOnConnectionLost(newOnConnectionLost); },
+
+        get onMessageDelivered() { return this._getOnMessageDelivered(); },
+        set onMessageDelivered(newOnMessageDelivered) { this._setOnMessageDelivered(newOnMessageDelivered); },
+        
+        get onMessageArrived() { return this._getOnMessageArrived(); },
+        set onMessageArrived(newOnMessageArrived) { this._setOnMessageArrived(newOnMessageArrived); }
+    };
+    
+    /** 
+     * An application message, sent or received.
+     * <p>
+     * Other programming languages,
+     * <a href="/clients/java/doc/javadoc/com/ibm/micro/client/mqttv3/MqttMessage.html"><big>Java</big></a>,
+     * <a href="/clients/c/doc/html/struct_m_q_t_t_client__message.html"><big>C</big></a>.
+     * <p>
+     * All attributes may be null, which implies the default values.
+     * 
+     * @name Messaging.Message
+     * @constructor
+     * @param {String|ArrayBuffer} payload The message data to be sent.
+     * <p>
+     * @property {string} payloadString <i>read only</i> The payload as a string if the payload consists of valid UTF-8 characters.
+     * @property {ArrayBuffer} payloadBytes <i>read only</i> The payload as an ArrayBuffer.
+     * <p>
+     * @property {string} destinationName <b>mandatory</b> The name of the destination to which the message is to be sent
+     *                    (for messages about to be sent) or the name of the destination from which the message has been received.
+     *                    (for messages received by the onMessage function).
+     * <p>
+     * @property {number} qos The Quality of Service used to deliver the message.
+     * <dl>
+     *     <dt>0 Best effort (default).
+     *     <dt>1 At least once.
+     *     <dt>2 Exactly once.     
+     * </dl>
+     * <p>
+     * @property {Boolean} retained If true, the message is to be retained by the server and delivered 
+   	 *                     to both current and future subscriptions.
+   	 *                     If false the server only delivers the message to current subscribers, this is the default for new Messages. 
+   	 *                     A received message has the retained boolean set to true if the message was published 
+   	 *                     with the retained boolean set to true
+   	 *                     and the subscrption was made after the message has been published. 
+   	 * <p>
+     * @property {Boolean} duplicate <i>read only</i> If true, this message might be a duplicate of one which has already been received. 
+     *                     This is only set on messages received from the server.
+     *                     
+     */
+    var Message = function (newPayload) {  
+    	var payload;
+    	if (   typeof newPayload === "string" 
+    		|| newPayload instanceof ArrayBuffer
+    		|| newPayload instanceof Int8Array
+    		|| newPayload instanceof Uint8Array
+    		|| newPayload instanceof Int16Array
+    		|| newPayload instanceof Uint16Array
+    		|| newPayload instanceof Int32Array
+    		|| newPayload instanceof Uint32Array
+    		|| newPayload instanceof Float32Array
+    		|| newPayload instanceof Float64Array
+    	   ) {
+            payload = newPayload;
+        } else {
+            throw (format(ERROR.INVALID_ARGUMENT, [newPayload, "newPayload"]));
+        }
+
+    	this._getPayloadString = function () {
+    		if (typeof payload === "string")
+       			return payload;
+       		else
+       			return parseUTF8(payload, 0, payload.length); 
+    	};
+
+    	this._getPayloadBytes = function() {
+    		if (typeof payload === "string") {
+    			var buffer = new ArrayBuffer(UTF8Length(payload));
+    			var byteStream = new Uint8Array(buffer); 
+    			stringToUTF8(payload, byteStream, 0);
+
+    			return byteStream;
+    		} else {
+    			return payload;
+    		};
+    	};
+
+    	var destinationName = undefined;
+    	this._getDestinationName = function() { return destinationName; };
+    	this._setDestinationName = function(newDestinationName) { 
+    		if (typeof newDestinationName === "string")
+    		    destinationName = newDestinationName;
+    		else 
+    			throw new Error(format(ERROR.INVALID_ARGUMENT, [newDestinationName, "newDestinationName"]));
+    	};
+    	    	
+    	var qos = 0;
+    	this._getQos = function() { return qos; };
+    	this._setQos = function(newQos) { 
+    		if (newQos === 0 || newQos === 1 || newQos === 2 )
+    			qos = newQos;
+    		else 
+    			throw new Error("Invalid argument:"+newQos);
+    	};
+
+    	var retained = false;
+    	this._getRetained = function() { return retained; };
+    	this._setRetained = function(newRetained) { 
+    		if (typeof newRetained === "boolean")
+    		    retained = newRetained;
+    		else 
+    			throw new Error(format(ERROR.INVALID_ARGUMENT, [newRetained, "newRetained"]));
+    	};
+    	
+    	var duplicate = false;
+    	this._getDuplicate = function() { return duplicate; };
+    	this._setDuplicate = function(newDuplicate) { duplicate = newDuplicate; };
+    };
+    
+    Message.prototype = {
+    	get payloadString() { return this._getPayloadString(); },
+    	get payloadBytes() { return this._getPayloadBytes(); },
+    	
+    	get destinationName() { return this._getDestinationName(); },
+    	set destinationName(newDestinationName) { this._setDestinationName(newDestinationName); },
+    	
+    	get qos() { return this._getQos(); },
+    	set qos(newQos) { this._setQos(newQos); },
+
+    	get retained() { return this._getRetained(); },
+    	set retained(newRetained) { this._setRetained(newRetained); },
+
+    	get duplicate() { return this._getDuplicate(); },
+    	set duplicate(newDuplicate) { this._setDuplicate(newDuplicate); }
+    };
+       
+    // Module contents.
+    return {
+        Client: Client,
+        Message: Message
+    };
+})(window);

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/readme.md b/assembly/src/release/examples/mqtt/websocket/readme.md
new file mode 100644
index 0000000..daf516a
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/websocket/readme.md
@@ -0,0 +1,18 @@
+## Overview
+
+This is an example of how use the 
+['stomp-websocket'](https://github.com/jmesnil/stomp-websocket) 
+JavaScript APIs with the ActiveMQ message broker.
+
+## Prereqs
+
+- Use a modern browser with WebSocket support like Chrome or WebKit
+
+## Running
+
+Run the ActiveMQ sever locally and then open the `index.html`
+in the current directory using a web browser.
+
+## Credits
+
+This example is a modified version of Jeff Mesnil's chat example.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/pom.xml
new file mode 100644
index 0000000..a345928
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-composite-destinations</artifactId>
+    <profiles>
+        <profile>
+            <id>consumer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.composite.dest.Consumer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>producer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.composite.dest.Producer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file


[07/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/build.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/build.xml b/assembly/src/release/examples/openwire/exploring-jms/build.xml
new file mode 100644
index 0000000..9318351
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/build.xml
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="JMS_Samples">
+
+   <property name="activemq.home" value="../../.." />
+
+   <property name="PTP1" value=".\QueuePTPSamples\QueueMonitor"/>
+   <property name="QMON" location=".\QueuePTPSamples\QueueMonitor\QueueMonitor.properties"/>
+   <property name="PTP2" value=".\QueuePTPSamples\QueueRoundTrip"/>
+   <property name="PTP3" value=".\QueuePTPSamples\RequestReply"/>
+   <property name="PTP4" value=".\QueuePTPSamples\SelectorTalk"/>
+   <property name="PTP5" value=".\QueuePTPSamples\Talk"/>
+   <property name="PTP6" value=".\QueuePTPSamples\TransactedTalk"/>
+   <property name="PS1" value=".\TopicPubSubSamples\Chat"/>
+   <property name="PS2" value=".\TopicPubSubSamples\DurableChat"/>
+   <property name="PS3" value=".\TopicPubSubSamples\HierarchicalChat"/>
+   <property name="PS4" value=".\TopicPubSubSamples\MessageMonitor"/>
+   <property name="PS5" value=".\TopicPubSubSamples\RequestReply"/>
+   <property name="PS6" value=".\TopicPubSubSamples\SelectorChat"/>
+   <property name="PS7" value=".\TopicPubSubSamples\TransactedChat"/>
+   
+   <property name="PUBSUB_SAMPLES" value="${PS1};${PS2};${PS3};${PS4};${PS5};${PS6};${PS7};"/>
+   
+   <property name="PTP_SAMPLES" value="${PTP1};${PTP2};${PTP3};${PTP4};${PTP5};${PTP6};"/>
+
+	<target name="init">
+		<path id="javac.classpath">
+			<pathelement path="conf" />
+			<fileset dir="../../../lib">
+				<include name="**/*.jar" />
+			</fileset>
+		</path>
+	</target>
+
+	<target name="compile" depends="init" description="Compile all Java">
+		<javac srcdir="${PTP1}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PTP2}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PTP3}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PTP4}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PTP5}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PTP6}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PS1}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PS2}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PS3}"><classpath refid="javac.classpath"/></javac>
+		<javac srcdir="${PS4}"><classpath refid="javac.classpath"/></javac>		
+		<javac srcdir="${PS5}"><classpath refid="javac.classpath"/></javac>		
+		<javac srcdir="${PS6}"><classpath refid="javac.classpath"/></javac>	
+		<javac srcdir="${PS7}"><classpath refid="javac.classpath"/></javac>
+	</target>
+
+   <target name="chat1" depends="compile">
+   	<java classname="Chat" fork="true">
+		   <classpath>
+             <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+
+   	       <arg value="-u"/>
+   	       <arg value="Chatter1"/>
+   	</java>
+   </target>
+   
+  <target name="chat2" depends="compile">
+   	<java classname="Chat" fork="true">
+		   <classpath>
+          	 <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+   	       <arg value="-u"/>
+   	       <arg value="Chatter2"/>
+   	</java>
+   </target>
+   
+  <target name="chat3" depends="compile">
+   	<java classname="Chat" fork="true">
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>   	       
+   		   <arg value="-u"/>
+   	       <arg value="Chatter3"/>
+   	</java>
+   </target>
+   
+  <target name="durable1" depends="compile">
+   	<java classname="DurableChat" fork="true">
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+   		   <arg value="-u"/>
+   	       <arg value="DurableChatter_1"/>
+   	</java>
+   </target>
+   
+  <target name="durable2" depends="compile">
+   	<java classname="DurableChat" fork="true">
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>   		
+   	       <arg value="-u"/>
+   	       <arg value="DurableChatter_2"/>
+   	</java>
+   </target>
+
+  <target name="durable3" depends="compile">
+   	<java classname="DurableChat" fork="true">
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+   	       <arg value="-u"/>
+   	       <arg value="DurableChatter_3"/>
+   	</java>
+   </target>
+   
+  <target name="wildcard" depends="compile">
+   	<java classname="HierarchicalChat" fork="true">
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+   	       <arg value="-u"/>
+   	       <arg value="HierarchicalChatter"/>
+   	</java>
+   </target>
+   
+  <target name="tmonitor" depends="compile">
+   	<java classname="MessageMonitor" fork="true">
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>   	
+   	</java>
+   </target>
+   
+  <target name="filterchat1" depends="compile">
+   	<java classname="SelectorChat" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="SelectiveChatter_1"/>
+   	       <arg value="-s"/>
+   	       <arg value="SelectiveChatter_1"/>
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+   	</java>
+   </target>
+   
+  <target name="filterchat2" depends="compile">
+   	<java classname="SelectorChat" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="SelectiveChatter_2"/>
+   	       <arg value="-s"/>
+   	       <arg value="2"/>
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+   	</java>
+   </target>
+   
+  <target name="xnchat" depends="compile">
+   	<java classname="TransactedChat" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="TransactedChatter"/>
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath>
+   	</java>
+   </target>
+   
+  <target name="talk1" depends="compile">
+   	<java classname="Talk" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="Talker_1"/>
+   	       <arg value="-qs"/>
+   	       <arg value="Q1"/>
+   	       <arg value="-qr"/>
+   	       <arg value="Q2"/>
+		   <classpath>
+       	     <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath>
+   	</java>
+   </target>
+   
+  <target name="talk2" depends="compile">
+   	<java classname="Talk" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="Talker_2"/>
+   	       <arg value="-qs"/>
+   	       <arg value="Q2"/>
+   	       <arg value="-qr"/>
+   	       <arg value="Q1"/>
+		   <classpath>
+    	     <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath>   		
+   	</java>
+   </target>
+   
+  <target name="talk3" depends="compile">
+   	<java classname="Talk" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="Talker_3"/>
+   	       <arg value="-qs"/>
+   	       <arg value="Q3"/>
+   	       <arg value="-qr"/>
+   	       <arg value="Q1"/>
+		   <classpath>
+ 	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="qmonitor" depends="compile">
+   	<java classname="QueueMonitor" fork="true">
+		   <classpath>
+ 	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="filtertalk1" depends="compile">
+   	<java classname="SelectorTalk" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="SelectiveTalker_1"/>
+   	       <arg value="-s"/>
+   	       <arg value="1"/>
+   	       <arg value="-qs"/>
+   	       <arg value="Q1"/>
+   	       <arg value="-qr"/>
+   	       <arg value="Q1"/>
+		   <classpath>
+ 	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="filtertalk2" depends="compile">
+   	<java classname="SelectorTalk" fork="true">
+   	       <arg value="-u"/>
+   	       <arg value="SelectiveTalker_2"/>
+   	       <arg value="-s"/>
+   	       <arg value="2"/>
+   	       <arg value="-qs"/>
+   	       <arg value="Q1"/>
+   	       <arg value="-qr"/>
+   	       <arg value="Q1"/>
+		   <classpath>
+ 	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="xntalk" depends="compile">
+   	<java classname="TransactedTalk" fork="true" classpath="${javac.classpath}">
+   	       <arg value="-u"/>
+   	       <arg value="TransactedTalker"/>
+   	       <arg value="-qs"/>
+   	       <arg value="Q1"/>
+   	       <arg value="-qr"/>
+   	       <arg value="Q2"/>
+		   <classpath>
+	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="qreply" depends="compile">
+   	<java classname="Replier" fork="true" classpath="${javac.classpath}">
+   	       <arg value="-u"/>
+   	       <arg value="ReplyingTalker"/>
+		   <classpath>
+	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="qrequest" depends="compile">
+   	<java classname="Requestor" fork="true" classpath="${javac.classpath}">
+   	       <arg value="-u"/>
+   	       <arg value="RequestingTalker"/>
+		   <classpath>
+	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="treply" depends="compile">
+   	<java classname="TopicReplier" fork="true" classpath="${javac.classpath}">
+   	       <arg value="-u"/>
+   	       <arg value="ReplyingChatter"/>
+		   <classpath>
+	         <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="trequest" depends="compile">
+   	<java classname="TopicRequestor" fork="true" classpath="${javac.classpath}">
+   	       <arg value="-u"/>
+   	       <arg value="RequestingChatter"/>
+		   <classpath>
+	         <path refid="javac.classpath"/>
+             <pathelement path="${PUBSUB_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>
+   
+  <target name="roundtrip" depends="compile">
+   	<java classname="QueueRoundTrip" fork="true" classpath="${javac.classpath}">
+   	       <arg value="-u"/>
+   	       <arg value="QueueRoundTrip"/>
+   	       <arg value="-n"/>
+   	       <arg value="10000"/>
+		   <classpath>
+	         <path refid="javac.classpath"/>
+             <pathelement path="${PTP_SAMPLES}"/>
+           </classpath> 
+   	</java>
+   </target>	
+	
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/conf/log4j.properties b/assembly/src/release/examples/openwire/exploring-jms/conf/log4j.properties
new file mode 100644
index 0000000..e5326c5
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/conf/log4j.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+## 
+## http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used by the standalone ActiveMQ broker
+#
+log4j.rootLogger=INFO, stdout, logfile
+
+# CONSOLE appender
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %-5p %m%n
+
+# Log File appender
+log4j.appender.logfile=org.apache.log4j.FileAppender
+log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.logfile.file=activemq.log
+log4j.appender.logfile.append=true
+
+#
+#  You can change logger levels here.
+#
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/exploring-jms/readme.txt
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/exploring-jms/readme.txt b/assembly/src/release/examples/openwire/exploring-jms/readme.txt
new file mode 100644
index 0000000..3296f92
--- /dev/null
+++ b/assembly/src/release/examples/openwire/exploring-jms/readme.txt
@@ -0,0 +1,10 @@
+FuseSource distribution of ActiveMQ - Exploring JMS v1.1
+========================================================
+The Exploring JMS Samples are a described in the "Exploring JMS with 
+the FuseSource distribution of ActiveMQ" book available from fusesource.com.
+
+They demonstrate how to use the JMS client APIs to accomplish basic messaging 
+tasks.
+
+The build.xml file provides targets for rebuilding the examples and for 
+launching them.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/java/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/java/pom.xml b/assembly/src/release/examples/openwire/java/pom.xml
new file mode 100644
index 0000000..0e7a500
--- /dev/null
+++ b/assembly/src/release/examples/openwire/java/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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>
+  
+  <groupId>example</groupId>
+  <artifactId>openwire-example</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  
+  <name>example</name>
+  <description>ActiveMQ Openwire Java Examples</description>
+
+  <repositories>
+    <repository>
+      <id>Fusesource Snapshots</id>
+      <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
+    </repository>
+  </repositories>
+    
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jms_1.1_spec</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-client</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-nop</artifactId>
+      <version>${slf4j-version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+
+      <!-- include all the dependencies into the jar so it's easier to execute the example -->
+      <plugin>
+        <groupId>org.fusesource.mvnplugins</groupId>
+        <artifactId>maven-uberize-plugin</artifactId>
+        <version>1.14</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals><goal>uberize</goal></goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+    </plugins>
+  </build>
+  
+</project>
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/java/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/java/readme.md b/assembly/src/release/examples/openwire/java/readme.md
new file mode 100644
index 0000000..ad23ad7
--- /dev/null
+++ b/assembly/src/release/examples/openwire/java/readme.md
@@ -0,0 +1,32 @@
+## Overview
+
+This is an example of how use the Java JMS api with ActiveMQ.
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    java -cp target/openwire-example-0.1-SNAPSHOT.jar example.Listener
+
+In another terminal window run:
+
+    java -cp target/openwire-example-0.1-SNAPSHOT.jar example.Publisher
+
+You can control to which server the examples try to connect to by
+setting the following environment variables: 
+
+* `ACTIVEMQ_HOST`
+* `ACTIVEMQ_PORT`
+* `ACTIVEMQ_USER`
+* `ACTIVEMQ_PASSWORD`

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/java/src/main/java/example/Listener.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/java/src/main/java/example/Listener.java b/assembly/src/release/examples/openwire/java/src/main/java/example/Listener.java
new file mode 100644
index 0000000..eab887d
--- /dev/null
+++ b/assembly/src/release/examples/openwire/java/src/main/java/example/Listener.java
@@ -0,0 +1,88 @@
+/**
+ * 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 example;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQTopic;
+
+import javax.jms.*;
+
+class Listener {
+
+    public static void main(String []args) throws JMSException {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "61616"));
+        String destination = arg(args, 0, "event");
+
+        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://" + host + ":" + port);
+
+        Connection connection = factory.createConnection(user, password);
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Destination dest = new ActiveMQTopic(destination);
+
+        MessageConsumer consumer = session.createConsumer(dest);
+        long start = System.currentTimeMillis();
+        long count = 1;
+        System.out.println("Waiting for messages...");
+        while(true) {
+            Message msg = consumer.receive();
+            if( msg instanceof  TextMessage ) {
+                String body = ((TextMessage) msg).getText();
+                if( "SHUTDOWN".equals(body)) {
+                    long diff = System.currentTimeMillis() - start;
+                    System.out.println(String.format("Received %d in %.2f seconds", count, (1.0*diff/1000.0)));
+                    break;
+                } else {
+                    if( count != msg.getIntProperty("id") ) {
+                        System.out.println("mismatch: "+count+"!="+msg.getIntProperty("id"));
+                    }
+                    count = msg.getIntProperty("id");
+
+                    if( count == 0 ) {
+                        start = System.currentTimeMillis();
+                    }
+                    if( count % 1000 == 0 ) {
+                        System.out.println(String.format("Received %d messages.", count));
+                    }
+                    count ++;
+                }
+
+            } else {
+                System.out.println("Unexpected message type: "+msg.getClass());
+            }
+        }
+        connection.close();
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/java/src/main/java/example/Publisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/java/src/main/java/example/Publisher.java b/assembly/src/release/examples/openwire/java/src/main/java/example/Publisher.java
new file mode 100644
index 0000000..4f2b4f4
--- /dev/null
+++ b/assembly/src/release/examples/openwire/java/src/main/java/example/Publisher.java
@@ -0,0 +1,80 @@
+/**
+ * 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 example;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQTopic;
+
+import javax.jms.*;
+
+class Publisher {
+
+    public static void main(String []args) throws JMSException {
+
+        String user = env("ACTIVEMQ_USER", "admin");
+        String password = env("ACTIVEMQ_PASSWORD", "password");
+        String host = env("ACTIVEMQ_HOST", "localhost");
+        int port = Integer.parseInt(env("ACTIVEMQ_PORT", "61616"));
+        String destination = arg(args, 0, "event");
+
+        int messages = 10000;
+        int size = 256;
+
+        String DATA = "abcdefghijklmnopqrstuvwxyz";
+        String body = "";
+        for( int i=0; i < size; i ++) {
+            body += DATA.charAt(i%DATA.length());
+        }
+
+        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://" + host + ":" + port);
+
+        Connection connection = factory.createConnection(user, password);
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Destination dest = new ActiveMQTopic(destination);
+        MessageProducer producer = session.createProducer(dest);
+        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+        for( int i=1; i <= messages; i ++) {
+            TextMessage msg = session.createTextMessage(body);
+            msg.setIntProperty("id", i);
+            producer.send(msg);
+            if( (i % 1000) == 0) {
+                System.out.println(String.format("Sent %d messages", i));
+            }
+        }
+
+        producer.send(session.createTextMessage("SHUTDOWN"));
+        connection.close();
+
+    }
+
+    private static String env(String key, String defaultValue) {
+        String rc = System.getenv(key);
+        if( rc== null )
+            return defaultValue;
+        return rc;
+    }
+
+    private static String arg(String []args, int index, String defaultValue) {
+        if( index < args.length )
+            return args[index];
+        else
+            return defaultValue;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/build.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/build.xml b/assembly/src/release/examples/openwire/swissarmy/build.xml
new file mode 100755
index 0000000..f2aba5d
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/build.xml
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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 name="Inbox" default="help" basedir=".">
+
+    <property name="class.dir" value="target/classes" />
+    <property name="activemq.home" value=".." />
+
+    <!-- example program defaults -->
+    <property name="url" value="tcp://localhost:61616" />
+    <property name="topic" value="false" />
+    <property name="subject" value="TEST.FOO" />
+    <property name="durable" value="false" />
+    <property name="max" value="2000" />
+    <property name="parallelThreads" value="1" />
+    <property name="messageSize" value="1000" />
+    <property name="clientId" value="consumer1" />
+    <property name="producerClientId" value="null" />
+    <property name="timeToLive" value="0" />
+    <property name="sleepTime" value="0" />
+    <property name="transacted" value="false" />
+    <property name="reply-subject" value="" />
+    <property name="verbose" value="true"/>
+    <property name="ack-mode" value="AUTO_ACKNOWLEDGE"/>
+    <property name="receive-time-out" value="0"/>
+    <property name="subscribers" value="1"/>
+    <property name="batch" value="10"/>
+    <property name="user" value=""/>
+    <property name="password" value=""/>
+
+    <!-- for WAR -->
+    <property name="app.name" value="activemq-web" />
+    <property name="app.base.dir" location="target/${app.name}" />
+    <property name="app.webinf.dir" value="${app.base.dir}/WEB-INF" />
+    <property name="app.classes.dir" value="${app.webinf.dir}/classes" />
+    <property name="app.lib.dir" value="${app.webinf.dir}/lib" />
+    <property name="app.src.dir" value="src" />
+    <property name="app.conf.dir" value="conf" />
+    <property name="app.dist.dir" value="target" />
+
+
+    <target name="help">
+        <echo>
+            This script requires Ant 1.6 or higher
+
+            NOTE: All options should be specified as system properties
+               on the command line, e.g.:
+
+               ant consumer -Durl=tcp://hostname:1234 -Dtopic=true
+
+                 OR
+
+               ant producer -Durl=tcp://hostname:61616 -Dmax=1000
+
+            Usage:
+              ant &lt;ant-task> &lt;options>
+
+            --------------------------------------------------------
+            ant consumer &lt;options> - Creates a consumer which waits until a specific number
+                                     of messages have been received
+
+            Consumer Options:
+                              url - Used to specify acustom URL for the
+                                    broker, e.g., tcp://hostname:1234
+                            topic - A boolean to determine whether to use
+                                    topics or queues; the default is false
+                          subject - Used to specify a custom destination
+                                    name, e.g. MyDestination
+                          durable - A boolean to specify that you want to
+                                    create a durable topic?
+                              max - The maximum number of messages to wait
+                                    for before shutting down
+                         clientId - A string to use as the client id
+                       transacted - A boolean to specify that you want to use
+                                    transactions?
+                        sleepTime - The time to sleep between message consumptions
+                          verbose - Used to print out more info; the default is
+                                    true
+                         ack-mode - The type of message acknowledgement to use;
+                                    see the Javadocs for javax.jms.Session for
+                                    more information
+                 receive-time-out - An integer to specify the time to wait for
+                                    message consumption
+                  parallelThreads - The number of parallel threads
+                            batch - Batch size for transactions and client acknowledgment (default 10)
+                             user - Connection username (if connecting to secured broker)
+                         password - Connection password (if connecting to secured broker)
+
+            --------------------------------------------------------
+            ant producer &lt;options&gt; - Creates a producer publishing a number of messages
+
+            Producer Options:
+                           url - Used to specify acustom URL for the broker,
+                                 e.g., tcp://hostname:1234
+                         topic - A boolean to determine whether to use topics
+                                 or queues
+                       subject - Used to specify a custom destination name,
+                                 e.g. MyDestination
+                       durable - A boolean to specify that you want to change the DeliveryMode of
+                                 the produced messages ('PERSISTENT':'true' or 'NON-PERSISTENT':'false')
+                           max - The maximum number of messages to wait for
+                                 before shutting down
+                     sleepTime - The time to sleep between message consumptions
+                    transacted - A boolean to specify that you want to use
+                                 transactions?
+                       verbose - Used to print out more info; the default is true
+                   messageSize - The size of the message in 1-byte characters
+               parallelThreads - The number of parallel threads
+                         batch - Batch size for transactions and client acknowledgment (default 10)
+                          user - Connection username (if connecting to secured broker)
+                      password - Connection password (if connecting to secured broker)
+
+           --------------------------------------------------------
+
+                   ant -help  - Display ant help screen
+                    ant help  - Display this message
+                   ant clean  - Delete the built directory
+             ant embedBroker  - Runs an embedded broker inside Java code
+                     ant war  - Creates a WAR deployment unit of the ActiveMQ Broker
+    </echo>
+    </target>
+
+    <target name="clean">
+        <delete dir="target" quiet="true" />
+        <delete dir="${class.dir}" quiet="true" />
+    </target>
+
+    <target name="init">
+        <mkdir dir="${class.dir}" />
+        <mkdir dir="src/ddl" />
+
+        <path id="javac.classpath">
+            <pathelement path="${class.dir}" />
+            <pathelement path="conf" />
+            <fileset dir="../../../lib">
+                <include name="**/*.jar" />
+            </fileset>
+        </path>
+    </target>
+
+
+    <target name="compile" depends="init" description="Compile all Java">
+        <javac srcdir="src" destdir="${class.dir}" includeantruntime="false">
+            <classpath refid="javac.classpath" />
+        </javac>
+        <copy todir="${class.dir}">
+            <fileset dir="src">
+                <include name="**/*.properties" />
+                <include name="**/*.xml" />
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="war" depends="compile" description="Create the activemq broker war file.">
+        <!--Copy the required jar files-->
+        <copy todir="${app.lib.dir}">
+            <fileset dir="../../../lib">
+                <include name="*.jar" />
+                <exclude name="servlet.jar" />
+            </fileset>
+
+            <fileset dir="../../../lib/optional">
+                <include name="activemq-web*.jar" />
+                <include name="activemq-container*.jar" />
+                <include name="commons-bean*.jar" />
+                <include name="spring*.jar" />
+                <include name="xbean*.jar" />
+
+                <!-- include Apache Derby for persistence -->
+                <include name="derby*.jar" />
+
+                <!-- include database pooling just in case -->
+                <include name="commons-pool*.jar" />
+                <include name="commons-db*.jar" />
+            </fileset>
+        </copy>
+        <!--Copy the configuration file-->
+        <copy todir="${app.webinf.dir}">
+            <fileset dir="${app.conf.dir}">
+                <!--Web application configuration file-->
+                <include name="web.xml" />
+                <!--ActiveMQ configuration file-->
+                <include name="activemq.xml" />
+            </fileset>
+        </copy>
+        <copy todir="${app.classes.dir}">
+            <fileset dir="${app.conf.dir}">
+                <!--Log4j configuration file-->
+                <include name="log4j.properties" />
+            </fileset>
+        </copy>
+        <!-- Create the war file -->
+        <jar jarfile="${app.dist.dir}/${app.name}.war" basedir="${app.base.dir}" />
+    </target>
+
+    <target name="consumer" depends="compile" description="Runs a simple consumer">
+
+        <echo>Running consumer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
+        <java classname="ConsumerTool" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="--url=${url}" />
+            <arg value="--topic=${topic}" />
+            <arg value="--subject=${subject}" />
+            <arg value="--durable=${durable}" />
+            <arg value="--maxium-messages=${max}" />
+            <arg value="--client-id=${clientId}" />
+            <arg value="--parallel-threads=${parallelThreads}" />
+            <arg value="--transacted=${transacted}" />
+            <arg value="--sleep-time=${sleepTime}" />
+            <arg value="--verbose=${verbose}"/>
+            <arg value="--ack-mode=${ack-mode}"/>
+            <arg value="--receive-time-out=${receive-time-out}"/>
+      <arg value="--batch=${batch}"/>
+      <arg value="--user=${user}"/>
+      <arg value="--password=${password}"/>
+        </java>
+    </target>
+
+    <target name="producer" depends="compile" description="Runs a simple producer">
+
+        <echo>Running producer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
+        <java classname="ProducerTool" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="--url=${url}" />
+            <arg value="--topic=${topic}" />
+            <arg value="--subject=${subject}" />
+            <arg value="--persistent=${durable}" />
+            <arg value="--message-count=${max}" />
+            <arg value="--message-size=${messageSize}" />
+            <arg value="--parallel-threads=${parallelThreads}" />
+            <arg value="--time-to-live=${timeToLive}" />
+            <arg value="--sleep-time=${sleepTime}" />
+            <arg value="--transacted=${transacted}" />
+            <arg value="--verbose=${verbose}"/>
+      <arg value="--batch=${batch}"/>
+      <arg value="--user=${user}"/>
+      <arg value="--password=${password}"/>
+        </java>
+    </target>
+
+    <target name="requester" depends="compile" description="Runs a simple requester">
+
+        <echo>Running requester against server at $$url = ${url} for subject $$subject = ${subject}</echo>
+        <java classname="RequesterTool" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+            <arg value="--url=${url}" />
+            <arg value="--topic=${topic}" />
+            <arg value="--subject=${subject}" />
+            <arg value="--persistent=${durable}" />
+            <arg value="--message-count=${max}" />
+            <arg value="--message-size=${messageSize}" />
+            <arg value="--client-id=${producerClientId}" />
+            <arg value="--time-to-live=${timeToLive}" />
+            <arg value="--sleep-time=${sleepTime}" />
+            <arg value="--transacted=${transacted}" />
+            <arg value="--reply-subject=${reply-subject}" />
+            <arg value="--verbose=${verbose}"/>
+        </java>
+    </target>
+
+    <target name="embedBroker" depends="compile" description="Runs a simple producer">
+
+        <echo>Running an embedded broker example</echo>
+        <java classname="EmbeddedBroker" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <sysproperty key="activemq.home" value="${activemq.home}"/>
+        </java>
+    </target>
+
+    <target name="topic-publisher" depends="compile" description="Runs a publisher">
+        <java classname="TopicPublisher" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <arg value="--url=${url}" />
+            <arg value="--size=${messageSize}" />
+            <arg value="--subscribers=${subscribers}" />
+            <arg value="--messages=${max}" />
+            <arg value="--delay=${sleepTime}" />
+            <arg value="--batch=${batch}" />
+        </java>
+    </target>
+
+    <target name="topic-listener" depends="compile" description="Runs a listener">
+        <java classname="TopicListener" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+            <arg value="--url=${url}" />
+        </java>
+    </target>
+
+    <target name="stomp" depends="compile" description="Runs a Stomp example">
+        <echo>Running a Stomp example</echo>
+        <java classname="StompExample" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-server" />
+        </java>
+    </target>
+
+    <target name="log4j-jms" depends="compile" description="Runs a Log4j JMS Appender example">
+        <echo>Running a Log4j JMS Appender example</echo>
+        <java classname="Log4jJMSAppenderExample" fork="yes" maxmemory="100M">
+            <classpath refid="javac.classpath" />
+            <jvmarg value="-Dlog4j.configuration=log4j-jms.properties" />
+        </java>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/readme.md b/assembly/src/release/examples/openwire/swissarmy/readme.md
new file mode 100644
index 0000000..0f3d709
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/readme.md
@@ -0,0 +1,32 @@
+# Overview
+
+Before running the examples you should start ActiveMQ on your machine. Follow the 
+installation instructions to use a binary distribution of ActiveMQ. To run the broker 
+in a command shell, type: 
+
+    bin/activemq
+
+This starts up the ActiveMQ broker. 
+
+h3. Running the examples from a binary distro
+
+You can use [Ant](http://ant.apache.org) to compile and run the examples. To run a 
+message producer run: 
+
+    ant producer
+
+To run a consumer, in another shell run: 
+
+    ant consumer
+
+You should then see messages being produced and consumed. You can also pass additional 
+commands into these goals using variables that are available in the build.xml. Below 
+is an example: 
+
+    ant consumer -Durl=tcp://localhost:61616 -Dtopic=true -Ddurable=true -Dmax=5000
+    ant producer -Durl=tcp://localhost:61616 -Dtopic=true -DtimeToLive=30000 -Dmax=5000
+
+For a summary of all the available goals and options try: 
+
+    ant help
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/CommandLineSupport.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/CommandLineSupport.java b/assembly/src/release/examples/openwire/swissarmy/src/CommandLineSupport.java
new file mode 100644
index 0000000..cbde8a4
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/CommandLineSupport.java
@@ -0,0 +1,120 @@
+/**
+ * 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.
+ */
+
+import java.util.ArrayList;
+
+import org.apache.activemq.util.IntrospectionSupport;
+
+/**
+ * Helper utility that can be used to set the properties on any object using
+ * command line arguments.
+ * 
+ * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
+ */
+public final class CommandLineSupport {
+
+    private CommandLineSupport() {
+    }
+    
+    /**
+     * Sets the properties of an object given the command line args.
+     * 
+     * if args contains: --ack-mode=AUTO --url=tcp://localhost:61616 --persistent 
+     * 
+     * then it will try to call the following setters on the target object.
+     * 
+     * target.setAckMode("AUTO");
+     * target.setURL(new URI("tcp://localhost:61616") );
+     * target.setPersistent(true);
+     * 
+     * Notice the the proper conversion for the argument is determined by examining the 
+     * setter arguement type.  
+     * 
+     * @param target the object that will have it's properties set
+     * @param args the commline options
+     * @return any arguments that are not valid options for the target
+     */
+    public static String[] setOptions(Object target, String[] args) {
+        ArrayList<String> rc = new ArrayList<String>();
+
+        for (int i = 0; i < args.length; i++) {
+            if (args[i] == null) {
+                continue;
+            }
+
+            if (args[i].startsWith("--")) {
+
+                // --options without a specified value are considered boolean
+                // flags that are enabled.
+                String value = "true";
+                String name = args[i].substring(2);
+
+                // if --option=value case
+                int p = name.indexOf("=");
+                if (p > 0) {
+                    value = name.substring(p + 1);
+                    name = name.substring(0, p);
+                }
+
+                // name not set, then it's an unrecognized option
+                if (name.length() == 0) {
+                    rc.add(args[i]);
+                    continue;
+                }
+
+                String propName = convertOptionToPropertyName(name);
+                if (!IntrospectionSupport.setProperty(target, propName, value)) {
+                    rc.add(args[i]);
+                    continue;
+                }
+            }
+
+        }
+
+        String r[] = new String[rc.size()];
+        rc.toArray(r);
+        return r;
+    }
+
+    /**
+     * converts strings like: test-enabled to testEnabled
+     * 
+     * @param name
+     * @return
+     */
+    private static String convertOptionToPropertyName(String name) {
+        String rc = "";
+
+        // Look for '-' and strip and then convert the subsequent char to
+        // uppercase
+        int p = name.indexOf("-");
+        while (p > 0) {
+            // strip
+            rc += name.substring(0, p);
+            name = name.substring(p + 1);
+
+            // can I convert the next char to upper?
+            if (name.length() > 0) {
+                rc += name.substring(0, 1).toUpperCase();
+                name = name.substring(1);
+            }
+
+            p = name.indexOf("-");
+        }
+        return rc + name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/ConsumerTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/ConsumerTool.java b/assembly/src/release/examples/openwire/swissarmy/src/ConsumerTool.java
new file mode 100755
index 0000000..e8f39f7
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/ConsumerTool.java
@@ -0,0 +1,353 @@
+/**
+ * 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.
+ */
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.ExceptionListener;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+
+import org.apache.activemq.ActiveMQConnection;
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+/**
+ * A simple tool for consuming messages
+ * 
+ * 
+ */
+public class ConsumerTool extends Thread implements MessageListener, ExceptionListener {
+
+    private boolean running;
+
+    private Session session;
+    private Destination destination;
+    private MessageProducer replyProducer;
+
+    private boolean pauseBeforeShutdown = false;
+    private boolean verbose = true;
+    private int maxiumMessages;
+    private static int parallelThreads = 1;
+    private String subject = "TOOL.DEFAULT";
+    private boolean topic;
+    private String user = ActiveMQConnection.DEFAULT_USER;
+    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
+    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
+    private boolean transacted;
+    private boolean durable;
+    private String clientId;
+    private int ackMode = Session.AUTO_ACKNOWLEDGE;
+    private String consumerName = "James";
+    private long sleepTime;
+    private long receiveTimeOut;
+	private long batch = 10; // Default batch size for CLIENT_ACKNOWLEDGEMENT or SESSION_TRANSACTED
+	private long messagesReceived = 0;
+
+    public static void main(String[] args) {
+        ArrayList<ConsumerTool> threads = new ArrayList();
+        ConsumerTool consumerTool = new ConsumerTool();
+        String[] unknown = CommandLineSupport.setOptions(consumerTool, args);
+        if (unknown.length > 0) {
+            System.out.println("Unknown options: " + Arrays.toString(unknown));
+            System.exit(-1);
+        }
+        consumerTool.showParameters();
+        for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) {
+            consumerTool = new ConsumerTool();
+            CommandLineSupport.setOptions(consumerTool, args);
+            consumerTool.start();
+            threads.add(consumerTool);
+        }
+
+        while (true) {
+            Iterator<ConsumerTool> itr = threads.iterator();
+            int running = 0;
+            while (itr.hasNext()) {
+                ConsumerTool thread = itr.next();
+                if (thread.isAlive()) {
+                    running++;
+                }
+            }
+
+            if (running <= 0) {
+                System.out.println("All threads completed their work");
+                break;
+            }
+
+            try {
+                Thread.sleep(1000);
+            } catch (Exception e) {
+            }
+        }
+        Iterator<ConsumerTool> itr = threads.iterator();
+        while (itr.hasNext()) {
+            ConsumerTool thread = itr.next();
+        }
+    }
+
+    public void showParameters() {
+        System.out.println("Connecting to URL: " + url + " (" + user + ":" + password + ")");
+        System.out.println("Consuming " + (topic ? "topic" : "queue") + ": " + subject);
+        System.out.println("Using a " + (durable ? "durable" : "non-durable") + " subscription");
+        System.out.println("Running " + parallelThreads + " parallel threads");
+    }
+
+    public void run() {
+        try {
+            running = true;
+
+            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
+            Connection connection = connectionFactory.createConnection();
+            if (durable && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
+                connection.setClientID(clientId);
+            }
+            connection.setExceptionListener(this);
+            connection.start();
+
+            session = connection.createSession(transacted, ackMode);
+            if (topic) {
+                destination = session.createTopic(subject);
+            } else {
+                destination = session.createQueue(subject);
+            }
+
+            replyProducer = session.createProducer(null);
+            replyProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+            MessageConsumer consumer = null;
+            if (durable && topic) {
+                consumer = session.createDurableSubscriber((Topic) destination, consumerName);
+            } else {
+                consumer = session.createConsumer(destination);
+            }
+
+            if (maxiumMessages > 0) {
+                consumeMessagesAndClose(connection, session, consumer);
+            } else {
+                if (receiveTimeOut == 0) {
+                    consumer.setMessageListener(this);
+                } else {
+                    consumeMessagesAndClose(connection, session, consumer, receiveTimeOut);
+                }
+            }
+
+        } catch (Exception e) {
+            System.out.println("[" + this.getName() + "] Caught: " + e);
+            e.printStackTrace();
+        }
+    }
+
+    public void onMessage(Message message) {
+
+		messagesReceived++;
+
+        try {
+
+            if (message instanceof TextMessage) {
+                TextMessage txtMsg = (TextMessage) message;
+                if (verbose) {
+
+                    String msg = txtMsg.getText();
+                    int length = msg.length();
+                    if (length > 50) {
+                        msg = msg.substring(0, 50) + "...";
+                    }
+                    System.out.println("[" + this.getName() + "] Received: '" + msg + "' (length " + length + ")");
+                }
+            } else {
+                if (verbose) {
+                    System.out.println("[" + this.getName() + "] Received: '" + message + "'");
+                }
+            }
+
+            if (message.getJMSReplyTo() != null) {
+                replyProducer.send(message.getJMSReplyTo(), session.createTextMessage("Reply: " + message.getJMSMessageID()));
+            }
+
+            if (transacted) {
+				if ((messagesReceived % batch) == 0) {
+					System.out.println("Commiting transaction for last " + batch + " messages; messages so far = " + messagesReceived);
+					session.commit();
+				}
+            } else if (ackMode == Session.CLIENT_ACKNOWLEDGE) {
+				if ((messagesReceived % batch) == 0) {
+					System.out.println("Acknowledging last " + batch + " messages; messages so far = " + messagesReceived);
+					message.acknowledge();
+				}
+            }
+
+        } catch (JMSException e) {
+            System.out.println("[" + this.getName() + "] Caught: " + e);
+            e.printStackTrace();
+        } finally {
+            if (sleepTime > 0) {
+                try {
+                    Thread.sleep(sleepTime);
+                } catch (InterruptedException e) {
+                }
+            }
+        }
+    }
+
+    public synchronized void onException(JMSException ex) {
+        System.out.println("[" + this.getName() + "] JMS Exception occured.  Shutting down client.");
+        running = false;
+    }
+
+    synchronized boolean isRunning() {
+        return running;
+    }
+
+    protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer) throws JMSException,
+            IOException {
+        System.out.println("[" + this.getName() + "] We are about to wait until we consume: " + maxiumMessages
+                + " message(s) then we will shutdown");
+
+        for (int i = 0; i < maxiumMessages && isRunning();) {
+            Message message = consumer.receive(1000);
+            if (message != null) {
+                i++;
+                onMessage(message);
+            }
+        }
+        System.out.println("[" + this.getName() + "] Closing connection");
+        consumer.close();
+        session.close();
+        connection.close();
+        if (pauseBeforeShutdown) {
+            System.out.println("[" + this.getName() + "] Press return to shut down");
+            System.in.read();
+        }
+    }
+
+    protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer, long timeout)
+            throws JMSException, IOException {
+        System.out.println("[" + this.getName() + "] We will consume messages while they continue to be delivered within: " + timeout
+                + " ms, and then we will shutdown");
+
+        Message message;
+        while ((message = consumer.receive(timeout)) != null) {
+            onMessage(message);
+        }
+
+        System.out.println("[" + this.getName() + "] Closing connection");
+        consumer.close();
+        session.close();
+        connection.close();
+        if (pauseBeforeShutdown) {
+            System.out.println("[" + this.getName() + "] Press return to shut down");
+            System.in.read();
+        }
+    }
+
+    public void setAckMode(String ackMode) {
+        if ("CLIENT_ACKNOWLEDGE".equals(ackMode)) {
+            this.ackMode = Session.CLIENT_ACKNOWLEDGE;
+        }
+        if ("AUTO_ACKNOWLEDGE".equals(ackMode)) {
+            this.ackMode = Session.AUTO_ACKNOWLEDGE;
+        }
+        if ("DUPS_OK_ACKNOWLEDGE".equals(ackMode)) {
+            this.ackMode = Session.DUPS_OK_ACKNOWLEDGE;
+        }
+        if ("SESSION_TRANSACTED".equals(ackMode)) {
+            this.ackMode = Session.SESSION_TRANSACTED;
+        }
+    }
+
+    public void setClientId(String clientID) {
+        this.clientId = clientID;
+    }
+
+    public void setConsumerName(String consumerName) {
+        this.consumerName = consumerName;
+    }
+
+    public void setDurable(boolean durable) {
+        this.durable = durable;
+    }
+
+    public void setMaxiumMessages(int maxiumMessages) {
+        this.maxiumMessages = maxiumMessages;
+    }
+
+    public void setPauseBeforeShutdown(boolean pauseBeforeShutdown) {
+        this.pauseBeforeShutdown = pauseBeforeShutdown;
+    }
+
+    public void setPassword(String pwd) {
+        this.password = pwd;
+    }
+
+    public void setReceiveTimeOut(long receiveTimeOut) {
+        this.receiveTimeOut = receiveTimeOut;
+    }
+
+    public void setSleepTime(long sleepTime) {
+        this.sleepTime = sleepTime;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    public void setParallelThreads(int parallelThreads) {
+        if (parallelThreads < 1) {
+            parallelThreads = 1;
+        }
+        this.parallelThreads = parallelThreads;
+    }
+
+    public void setTopic(boolean topic) {
+        this.topic = topic;
+    }
+
+    public void setQueue(boolean queue) {
+        this.topic = !queue;
+    }
+
+    public void setTransacted(boolean transacted) {
+        this.transacted = transacted;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    public void setBatch(long batch) {
+        this.batch = batch;
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/EmbeddedBroker.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/EmbeddedBroker.java b/assembly/src/release/examples/openwire/swissarmy/src/EmbeddedBroker.java
new file mode 100644
index 0000000..d45ceff
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/EmbeddedBroker.java
@@ -0,0 +1,41 @@
+/**
+ * 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.
+ */
+import org.apache.activemq.broker.BrokerService;
+
+/**
+ * This example demonstrates how to run an embedded broker inside your Java code
+ * 
+ * 
+ */
+public final class EmbeddedBroker {
+
+    private EmbeddedBroker() {
+    }
+
+    public static void main(String[] args) throws Exception {
+        BrokerService broker = new BrokerService();
+        broker.setUseJmx(true);
+        broker.addConnector("tcp://localhost:61616");
+        broker.start();
+
+        // now lets wait forever to avoid the JVM terminating immediately
+        Object lock = new Object();
+        synchronized (lock) {
+            lock.wait();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/Log4jJMSAppenderExample.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/Log4jJMSAppenderExample.java b/assembly/src/release/examples/openwire/swissarmy/src/Log4jJMSAppenderExample.java
new file mode 100644
index 0000000..657b9b2
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/Log4jJMSAppenderExample.java
@@ -0,0 +1,70 @@
+/**
+ * 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.
+ */
+
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.Session;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQObjectMessage;
+import org.apache.log4j.Logger;
+import org.apache.log4j.spi.LoggingEvent;
+
+
+/**
+ * A simple example of log4j jms appender in conjuction with ActiveMQ
+ */
+public class Log4jJMSAppenderExample implements MessageListener {
+
+	public Log4jJMSAppenderExample() throws Exception {
+		// create a logTopic topic consumer
+		ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
+		Connection conn = factory.createConnection();
+		Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+		conn.start();
+		MessageConsumer consumer = sess.createConsumer(sess.createTopic("logTopic"));
+		consumer.setMessageListener(this);
+		// log a message
+		Logger log = Logger.getLogger(Log4jJMSAppenderExample.class);
+		log.info("Test log");
+		// clean up
+		Thread.sleep(1000);
+		consumer.close();
+		sess.close();
+		conn.close();
+		System.exit(1);
+	}
+	
+	public static void main(String[] args) throws Exception {
+		new Log4jJMSAppenderExample();
+	}
+
+	public void onMessage(Message message) {
+		try {
+			// receive log event in your consumer
+			LoggingEvent event = (LoggingEvent)((ActiveMQObjectMessage)message).getObject();
+			System.out.println("Received log [" + event.getLevel() + "]: "+ event.getMessage());
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/ProducerAndConsumerTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/ProducerAndConsumerTool.java b/assembly/src/release/examples/openwire/swissarmy/src/ProducerAndConsumerTool.java
new file mode 100644
index 0000000..a1b96ff
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/ProducerAndConsumerTool.java
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+
+import java.util.Arrays;
+import java.util.HashSet;
+
+import javax.jms.MessageListener;
+
+/**
+ * A simple tool for producing and consuming messages
+ * 
+ * 
+ */
+public class ProducerAndConsumerTool extends ConsumerTool implements MessageListener {
+
+    public static void main(String[] args) {
+
+        ConsumerTool consumerTool = new ConsumerTool();
+        String[] unknown = CommandLineSupport.setOptions(consumerTool, args);
+        HashSet<String> set1 = new HashSet<String>(Arrays.asList(unknown));
+
+        ProducerTool producerTool = new ProducerTool();
+        unknown = CommandLineSupport.setOptions(producerTool, args);
+        HashSet<String> set2 = new HashSet<String>(Arrays.asList(unknown));
+
+        set1.retainAll(set2);
+        if (set1.size() > 0) {
+            System.out.println("Unknown options: " + set1);
+            System.exit(-1);
+        }
+
+        consumerTool.run();
+        producerTool.run();
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/ProducerTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/ProducerTool.java b/assembly/src/release/examples/openwire/swissarmy/src/ProducerTool.java
new file mode 100755
index 0000000..3693fd7
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/ProducerTool.java
@@ -0,0 +1,252 @@
+/**
+ * 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.
+ */
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.apache.activemq.ActiveMQConnection;
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.util.IndentPrinter;
+
+/**
+ * A simple tool for publishing messages
+ * 
+ * 
+ */
+public class ProducerTool extends Thread {
+
+    private Destination destination;
+    private int messageCount = 10;
+    private long sleepTime;
+    private boolean verbose = true;
+    private int messageSize = 255;
+    private static int parallelThreads = 1;
+    private long timeToLive;
+    private String user = ActiveMQConnection.DEFAULT_USER;
+    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
+    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
+    private String subject = "TOOL.DEFAULT";
+    private boolean topic;
+    private boolean transacted;
+    private boolean persistent;
+    private long batch = 10;
+    private static Object lockResults = new Object();
+
+    public static void main(String[] args) {
+        ArrayList<ProducerTool> threads = new ArrayList();
+        ProducerTool producerTool = new ProducerTool();
+        String[] unknown = CommandLineSupport.setOptions(producerTool, args);
+        if (unknown.length > 0) {
+            System.out.println("Unknown options: " + Arrays.toString(unknown));
+            System.exit(-1);
+        }
+        producerTool.showParameters();
+        for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) {
+            producerTool = new ProducerTool();
+            CommandLineSupport.setOptions(producerTool, args);
+            producerTool.start();
+            threads.add(producerTool);
+        }
+
+        while (true) {
+            Iterator<ProducerTool> itr = threads.iterator();
+            int running = 0;
+            while (itr.hasNext()) {
+                ProducerTool thread = itr.next();
+                if (thread.isAlive()) {
+                    running++;
+                }
+            }
+            if (running <= 0) {
+                System.out.println("All threads completed their work");
+                break;
+            }
+            try {
+                Thread.sleep(1000);
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    public void showParameters() {
+        System.out.println("Connecting to URL: " + url + " (" + user + ":" + password + ")");
+        System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
+        System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
+        System.out.println("Sleeping between publish " + sleepTime + " ms");
+        System.out.println("Running " + parallelThreads + " parallel threads");
+
+        if (timeToLive != 0) {
+            System.out.println("Messages time to live " + timeToLive + " ms");
+        }
+    }
+
+    public void run() {
+        Connection connection = null;
+        try {
+            // Create the connection.
+            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            // Create the session
+            Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
+            if (topic) {
+                destination = session.createTopic(subject);
+            } else {
+                destination = session.createQueue(subject);
+            }
+
+            // Create the producer.
+            MessageProducer producer = session.createProducer(destination);
+            if (persistent) {
+                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
+            } else {
+                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+            }
+            if (timeToLive != 0) {
+                producer.setTimeToLive(timeToLive);
+            }
+
+            // Start sending messages
+            sendLoop(session, producer);
+
+            System.out.println("[" + this.getName() + "] Done.");
+
+            synchronized (lockResults) {
+                ActiveMQConnection c = (ActiveMQConnection) connection;
+                System.out.println("[" + this.getName() + "] Results:\n");
+                c.getConnectionStats().dump(new IndentPrinter());
+            }
+
+        } catch (Exception e) {
+            System.out.println("[" + this.getName() + "] Caught: " + e);
+            e.printStackTrace();
+        } finally {
+            try {
+                connection.close();
+            } catch (Throwable ignore) {
+            }
+        }
+    }
+
+    protected void sendLoop(Session session, MessageProducer producer) throws Exception {
+
+        for (int i = 0; i < messageCount || messageCount == 0; i++) {
+
+            TextMessage message = session.createTextMessage(createMessageText(i));
+
+            if (verbose) {
+                String msg = message.getText();
+                if (msg.length() > 50) {
+                    msg = msg.substring(0, 50) + "...";
+                }
+                System.out.println("[" + this.getName() + "] Sending message: '" + msg + "'");
+            }
+
+            producer.send(message);
+
+            if (transacted && (i % batch == 0)) {
+                System.out.println("[" + this.getName() + "] Committing " + messageCount + " messages");
+                session.commit();
+            }
+            Thread.sleep(sleepTime);
+        }
+    }
+
+    private String createMessageText(int index) {
+        StringBuffer buffer = new StringBuffer(messageSize);
+        buffer.append("Message: " + index + " sent at: " + new Date());
+        if (buffer.length() > messageSize) {
+            return buffer.substring(0, messageSize);
+        }
+        for (int i = buffer.length(); i < messageSize; i++) {
+            buffer.append(' ');
+        }
+        return buffer.toString();
+    }
+
+    public void setPersistent(boolean durable) {
+        this.persistent = durable;
+    }
+
+    public void setMessageCount(int messageCount) {
+        this.messageCount = messageCount;
+    }
+
+    public void setMessageSize(int messageSize) {
+        this.messageSize = messageSize;
+    }
+
+    public void setPassword(String pwd) {
+        this.password = pwd;
+    }
+
+    public void setSleepTime(long sleepTime) {
+        this.sleepTime = sleepTime;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    public void setTimeToLive(long timeToLive) {
+        this.timeToLive = timeToLive;
+    }
+
+    public void setParallelThreads(int parallelThreads) {
+        if (parallelThreads < 1) {
+            parallelThreads = 1;
+        }
+        this.parallelThreads = parallelThreads;
+    }
+
+    public void setTopic(boolean topic) {
+        this.topic = topic;
+    }
+
+    public void setQueue(boolean queue) {
+        this.topic = !queue;
+    }
+
+    public void setTransacted(boolean transacted) {
+        this.transacted = transacted;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    public void setBatch(long batch) {
+        this.batch = batch;
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/swissarmy/src/RequesterTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/swissarmy/src/RequesterTool.java b/assembly/src/release/examples/openwire/swissarmy/src/RequesterTool.java
new file mode 100644
index 0000000..cd1a650
--- /dev/null
+++ b/assembly/src/release/examples/openwire/swissarmy/src/RequesterTool.java
@@ -0,0 +1,257 @@
+/**
+ * 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.
+ */
+import java.util.Arrays;
+import java.util.Date;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.apache.activemq.ActiveMQConnection;
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.util.IndentPrinter;
+
+/**
+ * A simple tool for publishing messages
+ * 
+ * 
+ */
+public class RequesterTool {
+
+    private int messageCount = 10;
+    private long sleepTime;
+    private boolean verbose = true;
+    private int messageSize = 255;
+    private long timeToLive;
+    private String subject = "TOOL.DEFAULT";
+    private String replySubject;
+    private boolean topic;
+    private String user = ActiveMQConnection.DEFAULT_USER;
+    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
+    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
+    private boolean transacted;
+    private boolean persistent;
+    private String clientId;
+
+    private Destination destination;
+    private Destination replyDest;
+    private MessageProducer producer;
+    private MessageConsumer consumer;
+    private Session session;
+
+    public static void main(String[] args) {
+        RequesterTool requesterTool = new RequesterTool();
+        String[] unknown = CommandLineSupport.setOptions(requesterTool, args);
+        if (unknown.length > 0) {
+            System.out.println("Unknown options: " + Arrays.toString(unknown));
+            System.exit(-1);
+        }
+        requesterTool.run();
+    }
+
+    public void run() {
+
+        Connection connection = null;
+        try {
+
+            System.out.println("Connecting to URL: " + url);
+            System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
+            System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
+            System.out.println("Sleeping between publish " + sleepTime + " ms");
+
+            // Create the connection
+            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
+            connection = connectionFactory.createConnection();
+            if (persistent && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
+                connection.setClientID(clientId);
+            }
+            connection.start();
+
+            // Create the Session
+            session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
+
+            // And the Destinations..
+            if (topic) {
+                destination = session.createTopic(subject);
+                if (replySubject == null || replySubject.equals("")) {
+                    replyDest = session.createTemporaryTopic();
+                } else {
+                    replyDest = session.createTopic(replySubject);
+                }
+            } else {
+                destination = session.createQueue(subject);
+                if (replySubject == null || replySubject.equals("")) {
+                    replyDest = session.createTemporaryQueue();
+                } else {
+                    replyDest = session.createQueue(replySubject);
+                }
+            }
+            System.out.println("Reply Destination: " + replyDest);
+
+            // Create the producer
+            producer = session.createProducer(destination);
+            if (persistent) {
+                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
+            } else {
+                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+            }
+            if (timeToLive != 0) {
+                System.out.println("Messages time to live " + timeToLive + " ms");
+                producer.setTimeToLive(timeToLive);
+            }
+
+            // Create the reply consumer
+            consumer = session.createConsumer(replyDest);
+
+            // Start sending reqests.
+            requestLoop();
+
+            System.out.println("Done.");
+
+            // Use the ActiveMQConnection interface to dump the connection
+            // stats.
+            ActiveMQConnection c = (ActiveMQConnection)connection;
+            c.getConnectionStats().dump(new IndentPrinter());
+
+        } catch (Exception e) {
+            System.out.println("Caught: " + e);
+            e.printStackTrace();
+        } finally {
+            try {
+                connection.close();
+            } catch (Throwable ignore) {
+            }
+        }
+    }
+
+    protected void requestLoop() throws Exception {
+
+        for (int i = 0; i < messageCount || messageCount == 0; i++) {
+
+            TextMessage message = session.createTextMessage(createMessageText(i));
+            message.setJMSReplyTo(replyDest);
+
+            if (verbose) {
+                String msg = message.getText();
+                if (msg.length() > 50) {
+                    msg = msg.substring(0, 50) + "...";
+                }
+                System.out.println("Sending message: " + msg);
+            }
+
+            producer.send(message);
+            if (transacted) {
+                session.commit();
+            }
+
+            System.out.println("Waiting for reponse message...");
+            Message message2 = consumer.receive();
+            if (message2 instanceof TextMessage) {
+                System.out.println("Reponse message: " + ((TextMessage)message2).getText());
+            } else {
+                System.out.println("Reponse message: " + message2);
+            }
+            if (transacted) {
+                session.commit();
+            }
+
+            Thread.sleep(sleepTime);
+
+        }
+    }
+
+    /**
+     * @param i
+     * @return
+     */
+    private String createMessageText(int index) {
+        StringBuffer buffer = new StringBuffer(messageSize);
+        buffer.append("Message: " + index + " sent at: " + new Date());
+        if (buffer.length() > messageSize) {
+            return buffer.substring(0, messageSize);
+        }
+        for (int i = buffer.length(); i < messageSize; i++) {
+            buffer.append(' ');
+        }
+        return buffer.toString();
+    }
+
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    public void setPersistent(boolean durable) {
+        this.persistent = durable;
+    }
+
+    public void setMessageCount(int messageCount) {
+        this.messageCount = messageCount;
+    }
+
+    public void setMessageSize(int messageSize) {
+        this.messageSize = messageSize;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public void setSleepTime(long sleepTime) {
+        this.sleepTime = sleepTime;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    public void setTimeToLive(long timeToLive) {
+        this.timeToLive = timeToLive;
+    }
+
+    public void setTopic(boolean topic) {
+        this.topic = topic;
+    }
+
+    public void setQueue(boolean queue) {
+        this.topic = !queue;
+    }
+
+    public void setTransacted(boolean transacted) {
+        this.transacted = transacted;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    public void setReplySubject(String replySubject) {
+        this.replySubject = replySubject;
+    }
+}


[11/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/readme.md
new file mode 100644
index 0000000..fe842f3
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/readme.md
@@ -0,0 +1,38 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example demonstrates how to use composite destinations for both sending and receiving.
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    mvn -P consumer
+
+In another terminal window run:
+
+    mvn -P producer
+
+## What to look for
+In the console of the producer, you should see log messages indicating messages have been successfully sent
+to the broker.
+
+In the console of the consumer, you should see log messages indicating messages have been received on each individual
+destination:
+
+* test-queue
+* test-queue-foo
+* test-queue-bar
+* test-topic-foo

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Consumer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Consumer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Consumer.java
new file mode 100644
index 0000000..cedffb2
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Consumer.java
@@ -0,0 +1,121 @@
+/**
+ * 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 example.composite.dest;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Consumer {
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final long TIMEOUT = 20000;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        System.out.println("\nWaiting to receive messages... will timeout after " + TIMEOUT / 1000 +"s");
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            Destination destinationFoo = session.createQueue("test-queue-foo");
+            Destination destinationBar = session.createQueue("test-queue-bar");
+            Destination destinationTopicFoo = session.createTopic("test-topic-foo");
+
+            MessageConsumer consumer = session.createConsumer(destination);
+            MessageConsumer consumerFoo = session.createConsumer(destinationFoo);
+            MessageConsumer consumerBar = session.createConsumer(destinationBar);
+            MessageConsumer consumerTopicFoo = session.createConsumer(destinationTopicFoo);
+
+            int i = 0;
+            while (true) {
+                Message message = consumer.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message on test-queue: " + text);
+                    }
+                } else {
+                    break;
+                }
+
+                message = consumerFoo.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message on test-queue-foo: " + text);
+                    }
+                } else {
+                    break;
+                }
+
+                message = consumerBar.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message on test-queue-bar: " + text);
+                    }
+                } else {
+                    break;
+                }
+
+                message = consumerTopicFoo.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message on test-topic-bar: " + text);
+                    }
+                } else {
+                    break;
+                }
+
+            }
+
+            consumer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Producer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Producer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Producer.java
new file mode 100644
index 0000000..24ba652
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-composite-destinations/src/main/java/example/composite/dest/Producer.java
@@ -0,0 +1,73 @@
+/**
+ * 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 example.composite.dest;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Producer {
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue,test-queue-foo,test-queue-bar,topic://test-topic-foo");
+            MessageProducer producer = session.createProducer(destination);
+
+            for (int i = 0; i < NUM_MESSAGES_TO_SEND; i++) {
+                TextMessage message = session.createTextMessage("Message #" + i);
+                System.out.println("Sending message #" + i);
+                producer.send(message);
+                Thread.sleep(DELAY);
+            }
+
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        } finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/pom.xml
new file mode 100644
index 0000000..75dada5
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>jms-example-durable-sub</artifactId>
+    <profiles>
+        <profile>
+            <id>subscriber</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.topic.durable.Subscriber</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>publisher</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.topic.durable.Publisher</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/readme.md
new file mode 100644
index 0000000..1013ba5
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/readme.md
@@ -0,0 +1,29 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example does basic publish-subscribe messaging using Topics
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    mvn -Psubscriber -DclientId=<client_id_goes_here>
+
+In another terminal window run:
+
+    mvn -Ppublisher
+
+You can kill the subscriber at any point and it will not miss messages because the subscription it creates
+is durable

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Publisher.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Publisher.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Publisher.java
new file mode 100644
index 0000000..69f8115
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Publisher.java
@@ -0,0 +1,76 @@
+/**
+ * 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 example.topic.durable;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Publisher {
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createTopic("test-topic");
+            MessageProducer producer = session.createProducer(destination);
+
+            for (int i = 0; i < NUM_MESSAGES_TO_SEND; i++) {
+                TextMessage message = session.createTextMessage("Message #" + i);
+                System.out.println("Sending message #" + i);
+                producer.send(message);
+                Thread.sleep(DELAY);
+            }
+
+            // tell the subscribers we're done
+            producer.send(session.createTextMessage("END"));
+
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Subscriber.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Subscriber.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Subscriber.java
new file mode 100644
index 0000000..918bd87
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-durable-sub/src/main/java/example/topic/durable/Subscriber.java
@@ -0,0 +1,97 @@
+/**
+ * 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 example.topic.durable;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Subscriber implements MessageListener {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+
+    private static final Boolean NON_TRANSACTED = false;
+
+
+    private final CountDownLatch countDownLatch;
+    public Subscriber(CountDownLatch latch) {
+        countDownLatch = latch;
+    }
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        System.out.println("\nWaiting to receive messages... Either waiting for END message or press Ctrl+C to exit");
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            String clientId = System.getProperty("clientId");
+            connection.setClientID(clientId);
+
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Topic destination = session.createTopic("test-topic");
+
+            MessageConsumer consumer = session.createDurableSubscriber(destination, clientId) ;
+            consumer.setMessageListener(new Subscriber(latch));
+
+            latch.await();
+            consumer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onMessage(Message message) {
+        try {
+            if (message instanceof TextMessage) {
+                String text = ((TextMessage) message).getText();
+                if ("END".equalsIgnoreCase(text)) {
+                    System.out.println("Received END message!");
+                    countDownLatch.countDown();
+                }
+                else {
+                    System.out.println("Received message:" +text);
+                }
+            }
+        } catch (JMSException e) {
+            System.out.println("Got a JMS Exception!");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/pom.xml
new file mode 100644
index 0000000..8e1daed
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-exclusive-consumer</artifactId>
+    <profiles>
+        <profile>
+            <id>consumer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.queue.exclusive.Consumer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>producer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.queue.exclusive.Producer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/readme.md
new file mode 100644
index 0000000..49bfaf5
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/readme.md
@@ -0,0 +1,30 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example demos using exclusive consumers (one single consumer)
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+You will want to run **multiple** instances of a consumer. To run the consumer open a
+terminal and type
+
+    mvn -Pconsumer
+
+In another terminal window run:
+
+    mvn -Pproducer
+
+You'll notice that even though you have multiple consumers, only one consumer will be consuming messages. If you
+kill the consumer that's currently receiving messages, one of the other consumers will pick up the consumption.

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Consumer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Consumer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Consumer.java
new file mode 100644
index 0000000..2b46cfe
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Consumer.java
@@ -0,0 +1,80 @@
+/**
+ * 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 example.queue.exclusive;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Consumer {
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final long TIMEOUT = 20000;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        System.out.println("\nWaiting to receive messages... will timeout after " + TIMEOUT / 1000 +"s");
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Queue destination = session.createQueue("test-queue?consumer.exclusive=true");
+            MessageConsumer consumer = session.createConsumer(destination);
+
+            int i = 0;
+            while (true) {
+                Message message = consumer.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message: " + text);
+                    }
+                } else {
+                    break;
+                }
+            }
+
+            consumer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Producer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Producer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Producer.java
new file mode 100644
index 0000000..18abb75
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-exclusive-consumer/src/main/java/example/queue/exclusive/Producer.java
@@ -0,0 +1,73 @@
+/**
+ * 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 example.queue.exclusive;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Producer {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageProducer producer = session.createProducer(destination);
+
+            for (int i = 0; i < NUM_MESSAGES_TO_SEND; i++) {
+                TextMessage message = session.createTextMessage("Message #" + i);
+                System.out.println("Sending message #" + i);
+                producer.send(message);
+                Thread.sleep(DELAY);
+            }
+
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/pom.xml
new file mode 100644
index 0000000..fec0ac4
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-message-browser</artifactId>
+
+    <profiles>
+        <profile>
+            <id>browser</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.browser.Browser</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>producer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.browser.Producer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/readme.md
new file mode 100644
index 0000000..fcdbc3d
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/readme.md
@@ -0,0 +1,28 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example demos how to browse a queue without consuming from it
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+Run these steps in order:
+
+1. In one terminal window run:
+
+    mvn -Pproducer
+
+2. In another terminal window run:
+
+    mvn -Pbrowser
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Browser.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Browser.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Browser.java
new file mode 100644
index 0000000..d6b2555
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Browser.java
@@ -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.
+ */
+package example.browser;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+import java.util.Enumeration;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Browser {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Queue destination = session.createQueue("test-queue");
+            QueueBrowser browser = session.createBrowser(destination);
+            Enumeration enumeration = browser.getEnumeration();
+
+            while (enumeration.hasMoreElements()) {
+                TextMessage message = (TextMessage) enumeration.nextElement();
+                System.out.println("Browsing: " + message);
+                TimeUnit.MILLISECONDS.sleep(DELAY);
+            }
+
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Producer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Producer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Producer.java
new file mode 100644
index 0000000..3b26136
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-message-browser/src/main/java/example/browser/Producer.java
@@ -0,0 +1,74 @@
+/**
+ * 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 example.browser;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Producer {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageProducer producer = session.createProducer(destination);
+
+            for (int i = 0; i < NUM_MESSAGES_TO_SEND; i++) {
+                TextMessage message = session.createTextMessage("Message #" + i);
+                System.out.println("Sending message #" + i);
+                producer.send(message);
+                Thread.sleep(DELAY);
+            }
+
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/pom.xml
new file mode 100644
index 0000000..c944734
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>jms-example-queue-selector</artifactId>
+    <profiles>
+        <profile>
+            <id>consumer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.queue.selector.Consumer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>producer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.queue.selector.Producer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/readme.md
new file mode 100644
index 0000000..d05fb2b
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/readme.md
@@ -0,0 +1,29 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example shows how to use selectors to filter out messages based on criteria
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    mvn -Pconsumer
+
+In another terminal window run:
+
+    mvn -Pproducer
+
+In the consumer's terminal, you'll notice that not all of the messages that the producer sent were consumed.
+Only those that had the property "intended" equal to "me"

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Consumer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Consumer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Consumer.java
new file mode 100644
index 0000000..59a8851
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Consumer.java
@@ -0,0 +1,80 @@
+/**
+ * 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 example.queue.selector;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Consumer {
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final long TIMEOUT = 20000;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        System.out.println("\nWaiting to receive messages... will timeout after " + TIMEOUT / 1000 +"s");
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageConsumer consumer = session.createConsumer(destination, "intended = 'me'");
+
+            int i = 0;
+            while (true) {
+                Message message = consumer.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message: " + text);
+                    }
+                } else {
+                    break;
+                }
+            }
+
+            consumer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Producer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Producer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Producer.java
new file mode 100644
index 0000000..328d7ec
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue-selector/src/main/java/example/queue/selector/Producer.java
@@ -0,0 +1,81 @@
+/**
+ * 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 example.queue.selector;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Producer {
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageProducer producer = session.createProducer(destination);
+
+            for (int i = 0; i < NUM_MESSAGES_TO_SEND; i++) {
+                TextMessage message = session.createTextMessage("Message #" + i);
+                System.out.println("Sending message #" + i);
+                if (i % 2 == 0) {
+                    System.out.println("Sending to me");
+                    message.setStringProperty("intended", "me");
+                } else {
+                    System.out.println("Sending to you");
+                    message.setStringProperty("intended", "you");
+                }
+                producer.send(message);
+                Thread.sleep(DELAY);
+            }
+
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/pom.xml
new file mode 100644
index 0000000..ed2b3ac
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-queue</artifactId>
+    <profiles>
+        <profile>
+            <id>consumer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.queue.Consumer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>producer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.queue.Producer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/readme.md
new file mode 100644
index 0000000..6e0c613
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/readme.md
@@ -0,0 +1,26 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example does basic point-to-point messaging using Queues
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    mvn -Pconsumer
+
+In another terminal window run:
+
+    mvn -Pproducer

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Consumer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Consumer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Consumer.java
new file mode 100644
index 0000000..fe5abfa
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Consumer.java
@@ -0,0 +1,80 @@
+/**
+ * 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 example.queue;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Consumer {
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final long TIMEOUT = 20000;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        System.out.println("\nWaiting to receive messages... will timeout after " + TIMEOUT / 1000 +"s");
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageConsumer consumer = session.createConsumer(destination);
+
+            int i = 0;
+            while (true) {
+                Message message = consumer.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message: " + text);
+                    }
+                } else {
+                    break;
+                }
+            }
+
+            consumer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Producer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Producer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Producer.java
new file mode 100644
index 0000000..664c1b3
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/java/example/queue/Producer.java
@@ -0,0 +1,74 @@
+/**
+ * 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 example.queue;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Producer {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageProducer producer = session.createProducer(destination);
+
+            for (int i = 0; i < NUM_MESSAGES_TO_SEND; i++) {
+                TextMessage message = session.createTextMessage("Message #" + i);
+                System.out.println("Sending message #" + i);
+                producer.send(message);
+                Thread.sleep(DELAY);
+            }
+
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/resources/log4j.properties b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/resources/log4j.properties
new file mode 100644
index 0000000..211f9d4
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-queue/src/main/resources/log4j.properties
@@ -0,0 +1,32 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#
+# Setup the default logging levels
+#
+log4j.rootLogger=INFO, console
+
+#
+# Uncomment one of the following to enable trace logging
+#
+#log4j.logger.org.apache.activemq=TRACE
+
+# Console Settings
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%C %-5p | %m%n
+log4j.appender.console.threshold=TRACE

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/pom.xml b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/pom.xml
new file mode 100644
index 0000000..c9892e4
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>advanced-openwire-example</artifactId>
+        <groupId>example</groupId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>jms-example-temp-destinations</artifactId>
+    <profiles>
+        <profile>
+            <id>consumer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.tempdest.Consumer</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>producer</id>
+            <build>
+                <defaultGoal>package</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>example.tempdest.ProducerRequestReply</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/readme.md
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/readme.md b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/readme.md
new file mode 100644
index 0000000..cdf0076
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/readme.md
@@ -0,0 +1,28 @@
+## Overview
+
+This is an example of how to use the ActiveMQ 5.x / OpenWire protocol to communicate with ActiveMQ
+
+This example shows how to do request response with temporary destinations
+
+## Prereqs
+
+- Install Java SDK
+- Install [Maven](http://maven.apache.org/download.html) 
+
+## Building
+
+Run:
+
+    mvn install
+
+## Running the Examples
+
+In one terminal window run:
+
+    mvn -Pconsumer
+
+In another terminal window run:
+
+    mvn -Pproducer
+
+You'll notice that the producer received a reply for the request it sent.

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/Consumer.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/Consumer.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/Consumer.java
new file mode 100644
index 0000000..d3f0a42
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/Consumer.java
@@ -0,0 +1,83 @@
+package example.tempdest; /**
+ * 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.
+ */
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class Consumer {
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final long TIMEOUT = 20000;
+
+    public static void main(String[] args) {
+
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        System.out.println("\nWaiting to receive messages... will timeout after " + TIMEOUT / 1000 +"s");
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            final Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageConsumer consumer = session.createConsumer(destination);
+
+            int i = 0;
+            while (true) {
+                Message message = consumer.receive(TIMEOUT);
+
+                if (message != null) {
+                    if (message instanceof TextMessage) {
+                        String text = ((TextMessage) message).getText();
+                        System.out.println("Got " + i++ + ". message: " + text);
+                        Destination replyTo = message.getJMSReplyTo();
+                        MessageProducer producer = session.createProducer(replyTo);
+                        producer.send(session.createTextMessage("You made it to the consumer, here is your response"));
+                        producer.close();
+                    }
+                } else {
+                    break;
+                }
+            }
+
+            consumer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/ProducerRequestReply.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/ProducerRequestReply.java b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/ProducerRequestReply.java
new file mode 100644
index 0000000..34b63d0
--- /dev/null
+++ b/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-temp-destinations/src/main/java/example/tempdest/ProducerRequestReply.java
@@ -0,0 +1,85 @@
+package example.tempdest; /**
+ * 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.
+ */
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.*;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
+ */
+public class ProducerRequestReply{
+
+    private static final String BROKER_URL = "tcp://localhost:61616";
+    private static final Boolean NON_TRANSACTED = false;
+    private static final int NUM_MESSAGES_TO_SEND = 100;
+    private static final long DELAY = 100;
+
+    public static void main(String[] args) {
+        String url = BROKER_URL;
+        if (args.length > 0) {
+            url = args[0].trim();
+        }
+        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "password", url);
+        Connection connection = null;
+
+        try {
+
+            connection = connectionFactory.createConnection();
+            connection.start();
+
+            Session session = connection.createSession(NON_TRANSACTED, Session.AUTO_ACKNOWLEDGE);
+            Destination destination = session.createQueue("test-queue");
+            MessageProducer producer = session.createProducer(destination);
+            Destination replyDest = session.createTemporaryQueue();
+
+            // set up the consumer to handle the reply
+            MessageConsumer replyConsumer = session.createConsumer(replyDest);
+            replyConsumer.setMessageListener(new MessageListener() {
+                @Override
+                public void onMessage(Message message) {
+                    System.out.println("*** REPLY *** ");
+                    System.out.println(message.toString());
+                }
+            });
+
+            TextMessage message = session.createTextMessage("I need a response for this, please");
+            message.setJMSReplyTo(replyDest);
+
+            producer.send(message);
+
+            // wait for a response
+            TimeUnit.SECONDS.sleep(2);
+            producer.close();
+            session.close();
+
+        } catch (Exception e) {
+            System.out.println("Caught exception!");
+        }
+        finally {
+            if (connection != null) {
+                try {
+                    connection.close();
+                } catch (JMSException e) {
+                    System.out.println("Could not close an open connection...");
+                }
+            }
+        }
+    }
+
+}


[14/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.responsive.css
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.responsive.css b/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.responsive.css
new file mode 100644
index 0000000..bc3f2ab
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/websocket/css/bootstrap.min.responsive.css
@@ -0,0 +1,3 @@
+
+.hidden{display:none;visibility:hidden;}
+@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input[class*="span"],.input-append input[class*="span"]{width:auto;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:768px){.container{width:a
 uto;padding:0 20px;} .row-fluid{width:100%;} .row{margin-left:0;} .row>[class*="span"],.row-fluid>[class*="span"]{float:none;display:block;width:auto;margin:0;}}@media (min-width:768px) and (max-width:980px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .span1{width:42px;} .span2{width:104px;} .span3{width:166px;} .span4{width:228px;} .span5{width:290px;} .span6{width:352px;} .span7{width:414px;} .span8{width:476px;} .span9{width:538px;} .span10{width:600px;} .span11{width:662px;} .span12,.container{width:724px;} .offset1{margin-left:82px;} .offset2{margin-left:144px;} .offset3{margin-left:206px;} .offset4{margin-left:268px;} .offset5{margin-left:330px;} .offset6{margin-left:392px;} .offset7{margin-left:454px;} .offset8{margin-left:516px;} .offset9{margin-left:578px;} .offset10{margin-left:640px;} .offset11{margin-left:702px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.ro
 w-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.762430939%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.801104972%;} .row-fluid .span2{width:14.364640883%;} .row-fluid .span3{width:22.928176794%;} .row-fluid .span4{width:31.491712705%;} .row-fluid .span5{width:40.055248616%;} .row-fluid .span6{width:48.618784527%;} .row-fluid .span7{width:57.182320438000005%;} .row-fluid .span8{width:65.74585634900001%;} .row-fluid .span9{width:74.30939226%;} .row-fluid .span10{width:82.87292817100001%;} .row-fluid .span11{width:91.436464082%;} .row-fluid .span12{width:99.999999993%;} input.span1,textarea.span1,.uneditable-input.span1{width:32px;} input.span2,textarea.span2,.uneditable-input.span2{width:94px;} input.span3,textarea.span3,.uneditable-input.span3{width:156px;} input.span4,textarea.span4,.uneditable-input.span4{width:218px;} input.span5,textarea.span5,.uneditable-input.span5{
 width:280px;} input.span6,textarea.span6,.uneditable-input.span6{width:342px;} input.span7,textarea.span7,.uneditable-input.span7{width:404px;} input.span8,textarea.span8,.uneditable-input.span8{width:466px;} input.span9,textarea.span9,.uneditable-input.span9{width:528px;} input.span10,textarea.span10,.uneditable-input.span10{width:590px;} input.span11,textarea.span11,.uneditable-input.span11{width:652px;} input.span12,textarea.span12,.uneditable-input.span12{width:714px;}}@media (max-width:980px){body{padding-top:0;} .navbar-fixed-top{position:static;margin-bottom:18px;} .navbar-fixed-top .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .navbar .nav-collapse{clear:left;} .navbar .nav{float:none;margin:0 0 9px;} .navbar .nav>li{float:none;} .navbar .nav>li>a{margin-bottom:2px;} .navbar .nav>.divider-vertical{display:none;} .navbar .nav>li>a,.navbar .dropdown-menu a{padding:6px 15px;font-weig
 ht:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .navbar .dropdown-menu li+li a{margin-bottom:2px;} .navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover{background-color:#222222;} .navbar .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .navbar .dropdown-menu:before,.navbar .dropdown-menu:after{display:none;} .navbar .dropdown-menu .divider{display:none;} .navbar-form,.navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 
 0 rgba(255, 255, 255, 0.1);} .navbar .nav.pull-right{float:none;margin-left:0;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;} .btn-navbar{display:block;} .nav-collapse{overflow:hidden;height:0;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .span1{width:70px;} .span2{width:170px;} .span3{width:270px;} .span4{width:370px;} .span5{width:470px;} .span6{width:570px;} .span7{width:670px;} .span8{width:770px;} .span9{width:870px;} .span10{width:970px;} .span11{width:1070px;} .span12,.container{width:1170px;} .offset1{margin-left:130px;} .offset2{margin-left:230px;} .offset3{margin-left:330px;} .offset4{margin-left:430px;} .offset5{margin-left:530px;} .offset6{margin-left:630px;} .offset7{margin-left:730px;} .offset8{margin-left:830px;} .offset9{margin-left:930px;} .
 offset10{margin-left:1030px;} .offset11{margin-left:1130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.564102564%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.982905983%;} .row-fluid .span2{width:14.529914530000001%;} .row-fluid .span3{width:23.076923077%;} .row-fluid .span4{width:31.623931624%;} .row-fluid .span5{width:40.170940171000005%;} .row-fluid .span6{width:48.717948718%;} .row-fluid .span7{width:57.264957265%;} .row-fluid .span8{width:65.81196581200001%;} .row-fluid .span9{width:74.358974359%;} .row-fluid .span10{width:82.905982906%;} .row-fluid .span11{width:91.45299145300001%;} .row-fluid .span12{width:100%;} input.span1,textarea.span1,.uneditable-input.span1{width:60px;} input.span2,textarea.span2,.uneditable-input.span2{width:160px;} input.span3,textarea.span3,.uneditable-input.span3{width:260px;} inpu
 t.span4,textarea.span4,.uneditable-input.span4{width:360px;} input.span5,textarea.span5,.uneditable-input.span5{width:460px;} input.span6,textarea.span6,.uneditable-input.span6{width:560px;} input.span7,textarea.span7,.uneditable-input.span7{width:660px;} input.span8,textarea.span8,.uneditable-input.span8{width:760px;} input.span9,textarea.span9,.uneditable-input.span9{width:860px;} input.span10,textarea.span10,.uneditable-input.span10{width:960px;} input.span11,textarea.span11,.uneditable-input.span11{width:1060px;} input.span12,textarea.span12,.uneditable-input.span12{width:1160px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;}}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings-white.png b/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings-white.png
new file mode 100644
index 0000000..a20760b
Binary files /dev/null and b/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings-white.png differ

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings.png b/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings.png
new file mode 100644
index 0000000..92d4445
Binary files /dev/null and b/assembly/src/release/examples/mqtt/websocket/img/glyphicons-halflings.png differ

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/mqtt/websocket/index.html
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/mqtt/websocket/index.html b/assembly/src/release/examples/mqtt/websocket/index.html
new file mode 100644
index 0000000..9b45268
--- /dev/null
+++ b/assembly/src/release/examples/mqtt/websocket/index.html
@@ -0,0 +1,198 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Chat Example Using MQTT Over WebSockets</title>
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link href="css/bootstrap.min.css" rel="stylesheet">
+    <link href="css/bootstrap.min.responsive.css" rel="stylesheet">
+    <style type="text/css">
+      body { padding-top: 40px; }
+    </style>
+  </head>
+
+  <body>
+    
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="brand" href="#">ActiveMQ MQTT WebSocket Chat Example</a>
+        </div>
+      </div>
+    </div>
+
+    <div class="container-fluid">
+      <div class="row-fluid">
+        <div class="span6">
+          <div id="connect">
+            <div class="page-header">
+              <h2>Server Login</h2>
+            </div>
+            <form class="form-horizontal" id='connect_form'>
+              <fieldset>                
+                <div class="control-group">
+                  <label>Host</label>
+                  <div class="controls">
+                    <input name=host id='connect_host' value='localhost' type="text">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>Port</label>
+                  <div class="controls">
+                    <input name=url id='connect_port' value='61623' type="text">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>Client ID</label>
+                  <div class="controls">
+                    <input id='connect_clientId' placeholder="id" value="example" type="text">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>User ID</label>
+                  <div class="controls">
+                    <input id='connect_user' placeholder="User ID" value="admin" type="text">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>Password</label>
+                  <div class="controls">
+                    <input id='connect_password' placeholder="User Password" value="password" type="password">
+                  </div>
+                </div>
+                <div class="control-group">
+                  <label>Destination</label>
+                  <div class="controls">
+                    <input id='destination' placeholder="Destination" value="chat/general" type="text">
+                  </div>
+                </div>
+                <div class="form-actions">
+                  <button id='connect_submit' type="submit" class="btn btn-large btn-primary">Connect</button>
+                </div>
+              </fieldset>
+            </form>
+          </div>
+          <div id="connected" style="display:none">
+            <div class="page-header">
+              <h2>Chat Room</h2>
+            </div>
+            <div id="messages">
+            </div>
+            <form class="well form-search" id='send_form'>
+              <button class="btn" type="button" id='disconnect' style="float:right">Disconnect</button>
+              <input class="input-medium" id='send_form_input' placeholder="Type your message here" class="span6"/>
+              <button class="btn" type="submit">Send</button>
+            </form>
+          </div>
+        </div>
+        <div class="span4">
+          <div class="page-header">
+            <h2>Debug Log</h2>
+          </div>
+          <pre id="debug"></pre>
+        </div>
+      </div>
+    </div>
+
+    <!-- Scripts placed at the end of the document so the pages load faster -->
+    <script src='js/jquery-1.7.2.min.js'></script>
+    <script src="js/mqttws31.js"></script>
+    <script>//<![CDATA[
+$(document).ready(function(){
+  if( !window.WebSocket) {
+    $("#connect").html("\
+        <h1>Get a new Web Browser!</h1>\
+        <p>\
+        Your browser does not support WebSockets. This example will not work properly.<br>\
+        Please use a Web Browser with WebSockets support (WebKit or Google Chrome).\
+        </p>\
+    ");
+  } else {
+    
+    var client, destination;
+
+    $('#connect_form').submit(function() {
+      var host = $("#connect_host").val();    
+      var port = $("#connect_port").val();
+      var clientId = $("#connect_clientId").val();
+      var user = $("#connect_user").val();
+      var password = $("#connect_password").val();
+      
+      destination = $("#destination").val();
+
+    
+      client = new Messaging.Client(host, Number(port), clientId);
+
+      client.onConnect = onConnect;
+  
+      client.onMessageArrived = onMessageArrived;
+      client.onConnectionLost = onConnectionLost;            
+
+      client.connect({
+        userName:user, 
+        password:password, 
+        onSuccess:onConnect, 
+        onFailure:onFailure
+      }); 
+      return false;
+    });  
+
+    // the client is notified when it is connected to the server.
+    var onConnect = function(frame) {
+      debug("connected to MQTT");
+      $('#connect').fadeOut({ duration: 'fast' });
+      $('#connected').fadeIn();
+      client.subscribe(destination);
+    };  
+
+    // this allows to display debug logs directly on the web page
+    var debug = function(str) {
+      $("#debug").append(document.createTextNode(str + "\n"));
+    };  
+
+    $('#disconnect').click(function() {
+      client.disconnect();
+      $('#connected').fadeOut({ duration: 'fast' });
+      $('#connect').fadeIn();
+      $("#messages").html("")
+      return false;
+    });
+
+    $('#send_form').submit(function() {
+      var text = $('#send_form_input').val();
+      if (text) {
+        message = new Messaging.Message(text);
+        message.destinationName = destination;
+        client.send(message);
+        $('#send_form_input').val("");
+      }
+      return false;
+    });
+
+    function onFailure(failure) {
+      debug("failure");
+      debug(failure.errorMessage);
+    }  
+
+    function onMessageArrived(message) {
+      var p = document.createElement("p");
+      var t = document.createTextNode(message.payloadString);
+      p.appendChild(t);
+      $("#messages").append(p);
+    }
+
+    function onConnectionLost(responseObject) {
+      if (responseObject.errorCode !== 0) {
+        debug(client.clientId + ": " + responseObject.errorCode + "\n");
+      }
+    }
+    
+    
+  }
+});    
+    //]]></script>
+
+  </body>
+</html>


[03/18] Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/examples/stomp/websocket/js/jquery-1.7.2.min.js
----------------------------------------------------------------------
diff --git a/assembly/src/release/examples/stomp/websocket/js/jquery-1.7.2.min.js b/assembly/src/release/examples/stomp/websocket/js/jquery-1.7.2.min.js
new file mode 100644
index 0000000..16ad06c
--- /dev/null
+++ b/assembly/src/release/examples/stomp/websocket/js/jquery-1.7.2.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7.2 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;
 g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);e
 lse d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d
 =parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaul
 tSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typ
 eof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c
 =a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;r
 eturn this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==nu
 ll?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),t
 ypeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready
 );var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:functio
 n(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[
 ];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f
 .concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date 
 RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],
 e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);re
 turn this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f
 .isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.va
 lue==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecke
 d=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="no
 ne",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position=
 "relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[
 n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(
 j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f
 ._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=th
 is,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof
  a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeCla
 ss"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a
 .attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);r
 eturn}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowsp
 an:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b}
 ,set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["r
 adio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
+a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.gui
 d,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remov
 e.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=
 f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.na
 mespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attr
 Name relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.prop
 s?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.
 type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.
 type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("ch
 ange",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e=
 =null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:funct
 ion(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.tes
 t(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,
 l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[
 t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFi
 lter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]
 |\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode=
 ==b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG
 :function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.
 parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a)
 {var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nod
 eType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p
 =o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,
 e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElemen
 t("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]
 );if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}
 }(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.select
 ors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.c
 ontext).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({p
 arent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P
 .call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^
 \s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChi
 ld;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
+.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;
 if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(functi
 on(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h))
 ,e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.
 createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;
 i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",vi
 sibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f
 .cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f
 ===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.su
 pport.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:f
 unction(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.e
 ach("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},
 ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if
 (!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.
 toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d
 .async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.json
 p!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||
 /loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{i
 f(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.
 css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark
 (this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"
 ),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{
 opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=nul
 l&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.c

<TRUNCATED>

[18/18] git commit: Porting apollo examples structure to ActiveMQ 5.9.

Posted by ch...@apache.org.
Porting apollo examples structure to ActiveMQ 5.9. 


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/2ecf41d0
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/2ecf41d0
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/2ecf41d0

Branch: refs/heads/trunk
Commit: 2ecf41d02f8f858ef1af91fc06e9c276bd667753
Parents: 0320630
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Thu Oct 10 10:39:53 2013 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Thu Oct 10 10:40:04 2013 -0400

----------------------------------------------------------------------
 assembly/src/main/descriptors/common-bin.xml    |   10 -
 assembly/src/main/descriptors/unix-bin.xml      |   22 +-
 assembly/src/main/descriptors/windows-bin.xml   |   12 +
 assembly/src/release/WebConsole-README.txt      |  102 -
 assembly/src/release/conf/activemq.xml          |    2 +
 assembly/src/release/docs/WebConsole-README.txt |  102 +
 assembly/src/release/docs/user-guide.html       |  189 ++
 assembly/src/release/example/build.xml          |  328 ---
 assembly/src/release/example/conf/activemq.xml  |   41 -
 .../src/release/example/conf/log4j.properties   |   39 -
 assembly/src/release/example/conf/resin-web.xml |   35 -
 assembly/src/release/example/conf/web.xml       |   40 -
 .../example/perfharness/perfharness-activemq.sh |   49 -
 assembly/src/release/example/ruby/README.txt    |   27 -
 assembly/src/release/example/ruby/catstomp.rb   |   56 -
 assembly/src/release/example/ruby/listener.rb   |   51 -
 assembly/src/release/example/ruby/publisher.rb  |   67 -
 assembly/src/release/example/ruby/stompcat.rb   |   50 -
 .../release/example/src/CommandLineSupport.java |  120 --
 .../src/release/example/src/ConsumerTool.java   |  353 ----
 .../src/release/example/src/EmbeddedBroker.java |   41 -
 .../example/src/Log4jJMSAppenderExample.java    |   70 -
 .../example/src/ProducerAndConsumerTool.java    |   51 -
 .../src/release/example/src/ProducerTool.java   |  252 ---
 .../src/release/example/src/RequesterTool.java  |  257 ---
 .../src/release/example/src/StompExample.java   |   59 -
 .../src/release/example/src/TopicListener.java  |  118 --
 .../src/release/example/src/TopicPublisher.java |  205 --
 .../src/release/example/src/jndi.properties     |   17 -
 .../release/example/src/log4j-jms.properties    |   31 -
 .../src/release/example/transactions/README.txt |   40 -
 .../src/release/example/transactions/build.xml  |  113 --
 .../example/transactions/src/Retailer.java      |  107 -
 .../example/transactions/src/Supplier.java      |  135 --
 .../transactions/src/TransactionsDemo.java      |   47 -
 .../example/transactions/src/Vendor.java        |  302 ---
 assembly/src/release/examples/amqp/java/pom.xml |   80 +
 .../src/release/examples/amqp/java/readme.md    |   32 +
 .../java/src/main/java/example/Listener.java    |   90 +
 .../java/src/main/java/example/Publisher.java   |   84 +
 .../release/examples/amqp/python/listener.py    |   54 +
 .../release/examples/amqp/python/publisher.py   |   57 +
 .../src/release/examples/conf/activemq-demo.xml |  294 +++
 .../conf/activemq-dynamic-network-broker1.xml   |  108 +
 .../conf/activemq-dynamic-network-broker2.xml   |  109 +
 .../examples/conf/activemq-jdbc-performance.xml |   82 +
 .../src/release/examples/conf/activemq-jdbc.xml |  102 +
 .../conf/activemq-leveldb-replicating.xml       |  173 ++
 .../examples/conf/activemq-scalability.xml      |   77 +
 .../release/examples/conf/activemq-security.xml |  130 ++
 .../release/examples/conf/activemq-specjms.xml  |  118 ++
 .../conf/activemq-static-network-broker1.xml    |  100 +
 .../conf/activemq-static-network-broker2.xml    |  100 +
 .../release/examples/conf/activemq-stomp.xml    |  138 ++
 .../examples/conf/activemq-throughput.xml       |   82 +
 assembly/src/release/examples/conf/activemq.xml |   41 +
 .../src/release/examples/conf/jetty-demo.xml    |  162 ++
 .../src/release/examples/conf/log4j.properties  |   39 +
 .../src/release/examples/conf/resin-web.xml     |   35 +
 assembly/src/release/examples/conf/web.xml      |   40 +
 assembly/src/release/examples/mqtt/java/pom.xml |   76 +
 .../src/release/examples/mqtt/java/readme.md    |   32 +
 .../java/src/main/java/example/Listener.java    |  123 ++
 .../java/src/main/java/example/Publisher.java   |  100 +
 .../mqtt/websocket/css/bootstrap.min.css        |  610 ++++++
 .../websocket/css/bootstrap.min.responsive.css  |    3 +
 .../img/glyphicons-halflings-white.png          |  Bin 0 -> 4352 bytes
 .../mqtt/websocket/img/glyphicons-halflings.png |  Bin 0 -> 4352 bytes
 .../release/examples/mqtt/websocket/index.html  |  198 ++
 .../mqtt/websocket/js/jquery-1.7.2.min.js       |    4 +
 .../examples/mqtt/websocket/js/mqttws31.js      | 1876 ++++++++++++++++++
 .../release/examples/mqtt/websocket/readme.md   |   18 +
 .../jms-example-composite-destinations/pom.xml  |   81 +
 .../readme.md                                   |   38 +
 .../java/example/composite/dest/Consumer.java   |  121 ++
 .../java/example/composite/dest/Producer.java   |   73 +
 .../jms-example-durable-sub/pom.xml             |   81 +
 .../jms-example-durable-sub/readme.md           |   29 +
 .../java/example/topic/durable/Publisher.java   |   76 +
 .../java/example/topic/durable/Subscriber.java  |   97 +
 .../jms-example-exclusive-consumer/pom.xml      |   81 +
 .../jms-example-exclusive-consumer/readme.md    |   30 +
 .../java/example/queue/exclusive/Consumer.java  |   80 +
 .../java/example/queue/exclusive/Producer.java  |   73 +
 .../jms-example-message-browser/pom.xml         |   83 +
 .../jms-example-message-browser/readme.md       |   28 +
 .../src/main/java/example/browser/Browser.java  |   72 +
 .../src/main/java/example/browser/Producer.java |   74 +
 .../jms-example-queue-selector/pom.xml          |   81 +
 .../jms-example-queue-selector/readme.md        |   29 +
 .../java/example/queue/selector/Consumer.java   |   80 +
 .../java/example/queue/selector/Producer.java   |   81 +
 .../jms-example-queue/pom.xml                   |   81 +
 .../jms-example-queue/readme.md                 |   26 +
 .../src/main/java/example/queue/Consumer.java   |   80 +
 .../src/main/java/example/queue/Producer.java   |   74 +
 .../src/main/resources/log4j.properties         |   32 +
 .../jms-example-temp-destinations/pom.xml       |   81 +
 .../jms-example-temp-destinations/readme.md     |   28 +
 .../main/java/example/tempdest/Consumer.java    |   83 +
 .../example/tempdest/ProducerRequestReply.java  |   85 +
 .../jms-example-topic/pom.xml                   |   83 +
 .../jms-example-topic/readme.md                 |   26 +
 .../src/main/java/example/topic/Publisher.java  |   75 +
 .../src/main/java/example/topic/Subscriber.java |   94 +
 .../src/main/resources/log4j.properties         |   32 +
 .../jms-example-transaction/pom.xml             |   58 +
 .../jms-example-transaction/readme.md           |   25 +
 .../main/java/example/transaction/Client.java   |  114 ++
 .../jms-example-wildcard-consumer/pom.xml       |   56 +
 .../jms-example-wildcard-consumer/readme.md     |   31 +
 .../src/main/java/example/wildcard/Client.java  |  109 +
 .../openwire/advanced-scenarios/pom.xml         |   84 +
 .../openwire/advanced-scenarios/readme.md       |    3 +
 .../examples/openwire/ecommerce/README.txt      |   40 +
 .../examples/openwire/ecommerce/build.xml       |  113 ++
 .../openwire/ecommerce/src/Retailer.java        |  107 +
 .../openwire/ecommerce/src/Supplier.java        |  135 ++
 .../ecommerce/src/TransactionsDemo.java         |   47 +
 .../examples/openwire/ecommerce/src/Vendor.java |  302 +++
 .../QueueMonitor/QueueMonitor.java              |  352 ++++
 .../QueueMonitor/QueueMonitor.properties        |   56 +
 .../QueueRoundTrip/QueueRoundTrip.java          |  242 +++
 .../QueuePTPSamples/RequestReply/Replier.java   |  338 ++++
 .../QueuePTPSamples/RequestReply/Requestor.java |  247 +++
 .../SelectorTalk/SelectorTalk.java              |  351 ++++
 .../QueuePTPSamples/Talk/Talk.java              |  332 ++++
 .../TransactedTalk/TransactedTalk.java          |  360 ++++
 .../TopicPubSubSamples/Chat/Chat.java           |  262 +++
 .../DurableChat/DurableChat.java                |  268 +++
 .../HierarchicalChat/HierarchicalChat.java      |  303 +++
 .../MessageMonitor/MessageMonitor.java          |  328 +++
 .../MessageMonitor/MessageMonitor.properties    |   55 +
 .../RequestReply/TopicReplier.java              |  318 +++
 .../RequestReply/TopicRequestor.java            |  241 +++
 .../SelectorChat/SelectorChat.java              |  296 +++
 .../TransactedChat/TransactedChat.java          |  296 +++
 .../examples/openwire/exploring-jms/build.xml   |  334 ++++
 .../exploring-jms/conf/log4j.properties         |   39 +
 .../examples/openwire/exploring-jms/readme.txt  |   10 +
 .../src/release/examples/openwire/java/pom.xml  |   83 +
 .../release/examples/openwire/java/readme.md    |   32 +
 .../java/src/main/java/example/Listener.java    |   88 +
 .../java/src/main/java/example/Publisher.java   |   80 +
 .../examples/openwire/swissarmy/build.xml       |  328 +++
 .../examples/openwire/swissarmy/readme.md       |   32 +
 .../swissarmy/src/CommandLineSupport.java       |  120 ++
 .../openwire/swissarmy/src/ConsumerTool.java    |  353 ++++
 .../openwire/swissarmy/src/EmbeddedBroker.java  |   41 +
 .../swissarmy/src/Log4jJMSAppenderExample.java  |   70 +
 .../swissarmy/src/ProducerAndConsumerTool.java  |   51 +
 .../openwire/swissarmy/src/ProducerTool.java    |  252 +++
 .../openwire/swissarmy/src/RequesterTool.java   |  257 +++
 .../openwire/swissarmy/src/StompExample.java    |   59 +
 .../openwire/swissarmy/src/TopicListener.java   |  118 ++
 .../openwire/swissarmy/src/TopicPublisher.java  |  205 ++
 .../openwire/swissarmy/src/jndi.properties      |   17 +
 .../openwire/swissarmy/src/log4j-jms.properties |   31 +
 .../other/perfharness/perfharness-activemq.sh   |   49 +
 .../src/release/examples/stomp/cpp/Listener.cpp |  126 ++
 .../release/examples/stomp/cpp/Publisher.cpp    |  120 ++
 .../src/release/examples/stomp/cpp/readme.md    |   44 +
 .../csharp/ApolloExamples/ApolloExamples.sln    |   26 +
 .../ApolloExamples/ApolloExamples.userprefs     |   30 +
 .../ApolloExamples/Listener/AssemblyInfo.cs     |   44 +
 .../csharp/ApolloExamples/Listener/Listener.cs  |  106 +
 .../ApolloExamples/Listener/Listener.csproj     |    1 +
 .../csharp/ApolloExamples/Listener/NMSTracer.cs |   78 +
 .../ApolloExamples/Publisher/AssemblyInfo.cs    |   44 +
 .../ApolloExamples/Publisher/NMSTracer.cs       |   78 +
 .../ApolloExamples/Publisher/Publisher.cs       |   87 +
 .../ApolloExamples/Publisher/Publisher.csproj   |    1 +
 .../src/release/examples/stomp/csharp/readme.md |   31 +
 .../src/release/examples/stomp/java/pom.xml     |   80 +
 .../src/release/examples/stomp/java/readme.md   |   32 +
 .../java/src/main/java/example/Listener.java    |   87 +
 .../java/src/main/java/example/Publisher.java   |   79 +
 .../src/release/examples/stomp/perl/listener    |   62 +
 .../src/release/examples/stomp/perl/publisher   |   59 +
 .../src/release/examples/stomp/perl/readme.md   |   12 +
 .../src/release/examples/stomp/php/listener.php |   73 +
 .../release/examples/stomp/php/publisher.php    |   56 +
 .../src/release/examples/stomp/php/readme.md    |   12 +
 .../src/release/examples/stomp/python/readme.md |    7 +
 .../stomp/python/stompest/async/__init__.py     |    0
 .../stomp/python/stompest/async/listener.py     |   65 +
 .../stomp/python/stompest/async/publisher.py    |   57 +
 .../examples/stomp/python/stompest/readme.md    |   14 +
 .../stomp/python/stompest/sync/__init__.py      |    0
 .../stomp/python/stompest/sync/listener.py      |   50 +
 .../stomp/python/stompest/sync/publisher.py     |   51 +
 .../examples/stomp/python/stomppy/listener.py   |   64 +
 .../examples/stomp/python/stomppy/publisher.py  |   43 +
 .../examples/stomp/python/stomppy/readme.md     |   10 +
 .../src/release/examples/stomp/ruby/catstomp.rb |   43 +
 .../src/release/examples/stomp/ruby/listener.rb |   54 +
 .../release/examples/stomp/ruby/publisher.rb    |   45 +
 .../src/release/examples/stomp/ruby/readme.md   |   27 +
 .../src/release/examples/stomp/ruby/stompcat.rb |   45 +
 .../stomp/websocket/css/bootstrap.min.css       |  610 ++++++
 .../websocket/css/bootstrap.min.responsive.css  |    3 +
 .../img/glyphicons-halflings-white.png          |  Bin 0 -> 4352 bytes
 .../websocket/img/glyphicons-halflings.png      |  Bin 0 -> 4352 bytes
 .../release/examples/stomp/websocket/index.html |  149 ++
 .../stomp/websocket/js/jquery-1.7.2.min.js      |    4 +
 .../examples/stomp/websocket/js/stomp.js        |  379 ++++
 .../release/examples/stomp/websocket/readme.md  |   18 +
 assembly/src/release/user-guide.html            |  189 --
 assembly/src/sample-conf/activemq-demo.xml      |  294 ---
 .../activemq-dynamic-network-broker1.xml        |  108 -
 .../activemq-dynamic-network-broker2.xml        |  109 -
 .../sample-conf/activemq-jdbc-performance.xml   |   82 -
 assembly/src/sample-conf/activemq-jdbc.xml      |  102 -
 .../activemq-leveldb-replicating.xml            |  173 --
 .../src/sample-conf/activemq-scalability.xml    |   77 -
 assembly/src/sample-conf/activemq-security.xml  |  130 --
 assembly/src/sample-conf/activemq-specjms.xml   |  118 --
 .../activemq-static-network-broker1.xml         |  100 -
 .../activemq-static-network-broker2.xml         |  100 -
 assembly/src/sample-conf/activemq-stomp.xml     |  138 --
 .../src/sample-conf/activemq-throughput.xml     |   82 -
 assembly/src/sample-conf/jetty-demo.xml         |  162 --
 pom.xml                                         |    1 +
 223 files changed, 19583 insertions(+), 5181 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/main/descriptors/common-bin.xml
----------------------------------------------------------------------
diff --git a/assembly/src/main/descriptors/common-bin.xml b/assembly/src/main/descriptors/common-bin.xml
index 55fb11b..569db14 100644
--- a/assembly/src/main/descriptors/common-bin.xml
+++ b/assembly/src/main/descriptors/common-bin.xml
@@ -32,16 +32,6 @@
       </includes>
     </fileSet>
 
-    <!-- Copy over all sample configurations -->
-    <fileSet>
-      <directory>src/sample-conf</directory>
-      <outputDirectory>conf/</outputDirectory>
-      <includes>
-        <include>activemq-*.xml</include>
-        <include>jetty-*.xml</include>
-      </includes>
-    </fileSet>
-
     <!-- lets copy the portions of the admin web app we need - as we can't exclude stuff from the WAR -->
     <fileSet>
       <directory>../activemq-web-console/src/main/webapp/images</directory>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/main/descriptors/unix-bin.xml
----------------------------------------------------------------------
diff --git a/assembly/src/main/descriptors/unix-bin.xml b/assembly/src/main/descriptors/unix-bin.xml
index 62b3ea6..46bf29c 100644
--- a/assembly/src/main/descriptors/unix-bin.xml
+++ b/assembly/src/main/descriptors/unix-bin.xml
@@ -33,14 +33,27 @@
         <exclude>conf/*.ts</exclude>
         <exclude>conf/*.ks</exclude>
         <exclude>conf/*.cert</exclude>
-        <exclude>example/**/*.sh</exclude>
-        <exclude>example/**/*.rb</exclude>
+        <exclude>examples/**/*.sh</exclude>
+        <exclude>examples/**/*.rb</exclude>
         <exclude>webapps/*.ico</exclude>
+        <exclude>examples/**/pom.xml</exclude>
       </excludes>
       <fileMode>0644</fileMode>
       <directoryMode>0755</directoryMode>
       <lineEnding>unix</lineEnding>
     </fileSet>
+    
+    <!-- Copy over the files that need to be filtered -->
+    <fileSet>
+      <directory>src/release</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>examples/**/pom.xml</include>
+      </includes>
+      <lineEnding>unix</lineEnding>
+      <filtered>true</filtered>
+    </fileSet>
+    
     <fileSet>
       <directory>src/release</directory>
       <outputDirectory>/</outputDirectory>
@@ -98,8 +111,9 @@
       <directory>src/release</directory>
       <outputDirectory>/</outputDirectory>
       <includes>
-        <include>example/**/*.sh</include>
-        <include>example/**/*.rb</include>
+        <include>examples/**/*.sh</include>
+        <include>examples/**/*.rb</include>
+        <include>examples/**/*.py</include>
       </includes>
       <directoryMode>0755</directoryMode>
       <fileMode>0755</fileMode>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/main/descriptors/windows-bin.xml
----------------------------------------------------------------------
diff --git a/assembly/src/main/descriptors/windows-bin.xml b/assembly/src/main/descriptors/windows-bin.xml
index c073a24..3cd6e7b 100644
--- a/assembly/src/main/descriptors/windows-bin.xml
+++ b/assembly/src/main/descriptors/windows-bin.xml
@@ -33,10 +33,22 @@
         <exclude>conf/*.ks</exclude>
         <exclude>conf/*.cert</exclude>
         <exclude>webapps/*.ico</exclude>
+        <exclude>examples/**/pom.xml</exclude>
       </excludes>
       <lineEnding>dos</lineEnding>
     </fileSet>
 
+    <!-- Copy over the files that need to be filtered -->
+    <fileSet>
+      <directory>src/release</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>examples/**/pom.xml</include>
+      </includes>
+      <lineEnding>dos</lineEnding>
+      <filtered>true</filtered>
+    </fileSet>
+
     <fileSet>
       <directory>src/release</directory>
       <outputDirectory>/</outputDirectory>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/WebConsole-README.txt
----------------------------------------------------------------------
diff --git a/assembly/src/release/WebConsole-README.txt b/assembly/src/release/WebConsole-README.txt
deleted file mode 100644
index caa9c9f..0000000
--- a/assembly/src/release/WebConsole-README.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-Deploying the ActiveMQ-WebConsole
-=================================
-
-From ActiveMQ 5.9 onwards ActiveMQ ships with two web consoles:
-- new console using hawtio
-- old console
-
-The old console is deprecated and replaced with a new modern console based on hawtio (http://hawt.io)
-
-The old console is accessible at its usual location at:
-  http://localhost:8161/admin/
-
-And the new console is located at:
-  http://localhost:8161/hawtio/
-
-In the default configuration ActiveMQ automatically starts the web console in the
-same VM as the broker. The console is accessibly under http://localhost:8161/hawtio/.
-
-The broker may ask for credentials to login the web console the first time.
-The default username and password is admin/admin. 
-
-In the new console using hawtio, you can configure the default users, in the 
-conf/users.properties, and conf/groups.properties files.
-
-In the old web console you can configure the default users, in the
-conf/jetty-real.properties file. And in the conf/jetty.xml file you can configure
-to disable login for the web consoles.
-
-However it's also possible to start the web console in a separate VM and connect it
-to the broker via JMS and JMX. The reasons to do so may include increased reliability
-of the broker itself (f.e. the embedded web console could use up all the available
-memory) or the monitoring of a master/slave system.
-
-Just deploy the war into your preferred servlet container and add the apache-activemq.jar
-to the classpath of the container (f.e. under Tomcat that'd be common/lib and under
-Jetty the lib-directory). Two options are available for the configuration of the broker
-and jmx uri(s):
-
- * System Properties
-   -----------------
-     Specify the following system properties in your web container:
-         -Dwebconsole.type=properties
-         -Dwebconsole.jms.url=<url of the broker> (f.e. tcp://localhost:61616)
-         -Dwebconsole.jmx.url=<jmx url to the broker> (f.e. service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
- 
- * JNDI
-   ----
-     If your servlet container supports JNDI it's possible to use a JMS-ConnectionFactory
-     configured outside the war:
-	java:comp/env/jms/connectionFactory: javax.jms.ConnectionFactory for the broker
-	java:comp/env/jmx/url: URL of the brokers JMX (Type java.lang.String)       
-	
-	
-
-Installing Web consoles in Apache Karaf / Apache ServiceMix
------------------------------------------------------------
-
-If you are using Apache Karaf, you can install ActiveMQ broker / client into the container using:
-
-   features:chooseurl activemq 5.9.0
-
-To install the broker:
-
-   features:install activemq-broker
-
-or the client only (web console not available):
-
-   features:install activemq-client
-
-You can then use web:list to see the context-path the console is accessible,
-that is usually: http://localhost:8181/activemqweb
-
-
-To install the new hawtio web console you install it as follows:
-
-If you use Karaf 2.3.3 or better:
-
-    features:chooseurl hawtio 
-
-For older releases you have to use addurl:
-
-    features:addurl mvn:io.hawt/hawtio-karaf/1.2-M19/xml/features
-
-And then you can install hawtio simply by:
-
-    features:install hawtio
-
-You can then use web:list to see the context-path the console is accessible,
-that is usually: http://localhost:8181/hawtio
-
-See also: http://hawt.io/getstarted/index.html for details how to install hawtio.
-
-
-Master/Slave monitoring
------------------------
-To configure the web console to monitor a master/slave configuration configure the jms/jmx
-as follows (system properties shown, but this option is also available when using JNDI):
-   -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)
-   -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi
-With this configuration the web console with switch to the slave as the master is no longer
-available and back as soon as the master is back up.
-

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/conf/activemq.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/conf/activemq.xml b/assembly/src/release/conf/activemq.xml
index 91a8740..d5477c7 100755
--- a/assembly/src/release/conf/activemq.xml
+++ b/assembly/src/release/conf/activemq.xml
@@ -112,6 +112,8 @@
             <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
             <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
             <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
+            <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
+            <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
         </transportConnectors>
 
         <!-- destroy the spring context on shutdown to stop jetty -->

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/docs/WebConsole-README.txt
----------------------------------------------------------------------
diff --git a/assembly/src/release/docs/WebConsole-README.txt b/assembly/src/release/docs/WebConsole-README.txt
new file mode 100644
index 0000000..caa9c9f
--- /dev/null
+++ b/assembly/src/release/docs/WebConsole-README.txt
@@ -0,0 +1,102 @@
+Deploying the ActiveMQ-WebConsole
+=================================
+
+From ActiveMQ 5.9 onwards ActiveMQ ships with two web consoles:
+- new console using hawtio
+- old console
+
+The old console is deprecated and replaced with a new modern console based on hawtio (http://hawt.io)
+
+The old console is accessible at its usual location at:
+  http://localhost:8161/admin/
+
+And the new console is located at:
+  http://localhost:8161/hawtio/
+
+In the default configuration ActiveMQ automatically starts the web console in the
+same VM as the broker. The console is accessibly under http://localhost:8161/hawtio/.
+
+The broker may ask for credentials to login the web console the first time.
+The default username and password is admin/admin. 
+
+In the new console using hawtio, you can configure the default users, in the 
+conf/users.properties, and conf/groups.properties files.
+
+In the old web console you can configure the default users, in the
+conf/jetty-real.properties file. And in the conf/jetty.xml file you can configure
+to disable login for the web consoles.
+
+However it's also possible to start the web console in a separate VM and connect it
+to the broker via JMS and JMX. The reasons to do so may include increased reliability
+of the broker itself (f.e. the embedded web console could use up all the available
+memory) or the monitoring of a master/slave system.
+
+Just deploy the war into your preferred servlet container and add the apache-activemq.jar
+to the classpath of the container (f.e. under Tomcat that'd be common/lib and under
+Jetty the lib-directory). Two options are available for the configuration of the broker
+and jmx uri(s):
+
+ * System Properties
+   -----------------
+     Specify the following system properties in your web container:
+         -Dwebconsole.type=properties
+         -Dwebconsole.jms.url=<url of the broker> (f.e. tcp://localhost:61616)
+         -Dwebconsole.jmx.url=<jmx url to the broker> (f.e. service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
+ 
+ * JNDI
+   ----
+     If your servlet container supports JNDI it's possible to use a JMS-ConnectionFactory
+     configured outside the war:
+	java:comp/env/jms/connectionFactory: javax.jms.ConnectionFactory for the broker
+	java:comp/env/jmx/url: URL of the brokers JMX (Type java.lang.String)       
+	
+	
+
+Installing Web consoles in Apache Karaf / Apache ServiceMix
+-----------------------------------------------------------
+
+If you are using Apache Karaf, you can install ActiveMQ broker / client into the container using:
+
+   features:chooseurl activemq 5.9.0
+
+To install the broker:
+
+   features:install activemq-broker
+
+or the client only (web console not available):
+
+   features:install activemq-client
+
+You can then use web:list to see the context-path the console is accessible,
+that is usually: http://localhost:8181/activemqweb
+
+
+To install the new hawtio web console you install it as follows:
+
+If you use Karaf 2.3.3 or better:
+
+    features:chooseurl hawtio 
+
+For older releases you have to use addurl:
+
+    features:addurl mvn:io.hawt/hawtio-karaf/1.2-M19/xml/features
+
+And then you can install hawtio simply by:
+
+    features:install hawtio
+
+You can then use web:list to see the context-path the console is accessible,
+that is usually: http://localhost:8181/hawtio
+
+See also: http://hawt.io/getstarted/index.html for details how to install hawtio.
+
+
+Master/Slave monitoring
+-----------------------
+To configure the web console to monitor a master/slave configuration configure the jms/jmx
+as follows (system properties shown, but this option is also available when using JNDI):
+   -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)
+   -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi
+With this configuration the web console with switch to the slave as the master is no longer
+available and back as soon as the master is back up.
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/docs/user-guide.html
----------------------------------------------------------------------
diff --git a/assembly/src/release/docs/user-guide.html b/assembly/src/release/docs/user-guide.html
new file mode 100755
index 0000000..b8d31c2
--- /dev/null
+++ b/assembly/src/release/docs/user-guide.html
@@ -0,0 +1,189 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+    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>
+  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
+  <title>Getting Started</title>
+
+</head>
+<body>
+<h1>Getting Started<br>
+</h1>
+
+<p>
+Welcome to Apache ActiveMQ. This document gives you a quick overview of how to get started trying out Apache ActiveMQ.
+</p>
+
+<h2>Running the broker</h2>
+
+<p>
+From the binary distribution you can run the Apache ActiveMQ server via the bin/activemq command.
+If you're using Windows, just type
+</p>
+<pre>
+    cd bin
+    activemq.bat
+</pre>
+<p>
+On Unix-like systems, type
+</p>
+<pre>
+    ./bin/activemq console
+</pre>
+<p>to start the broker in foreground.</p>
+<p>
+The Apache ActiveMQ broker should now have started
+</p>
+<p>
+Tip: If you run the bin/activemq command without any arguments it will output usage.
+</p>
+
+To stop the broker you can press ctrl + c to stop the process.
+
+<h2>Running the broker in the background</h2>
+
+<p>
+The broker can be started as a background process via the bin/activemq command
+on Unix-like systems, type
+</p>
+<pre>
+    ./bin/activemq start
+</pre>
+<p>to start the broker in background. The broker will write to its log in the data/activemq.log file.</p>
+
+<h2>Stopping the broker</h2>
+
+<p>
+The broker can be stopped via the bin/activemq command
+If you're using Windows, just type
+</p>
+<pre>
+    cd bin
+    activemq.bat stop
+</pre>
+<p>
+On Unix-like systems, type
+</p>
+<pre>
+    ./bin/activemq stop
+</pre>
+<p>to stop the broker.
+
+
+<h2>Access the web console</h2>
+
+In a web browser you can access the url <a href="http://0.0.0.0:8161/admin">http://0.0.0.0:8161/admin</a> to access the ActiveMQ web console.
+<br/>
+The broker may ask for credentials to login the web console the first time.
+The default username and password is admin/admin. You can configure this in the conf/jetty-real.properties file.
+
+<h2>Access the web demos</h2>
+
+You would need to start the broker with the demos included, which you do as follows:
+If you're using Windows, just type
+</p>
+<pre>
+    cd bin
+    activemq.bat console xbean:conf/activemq-demo.xml
+</pre>
+<p>
+On Unix-like systems, type
+</p>
+<pre>
+    ./bin/activemq console xbean:conf/activemq-demo.xml
+</pre>
+
+In a web browser you can access the url <a href="http://0.0.0.0:8161/demo">http://0.0.0.0:8161/demo</a> to access the ActiveMQ web demos.
+<br/>
+The broker may ask for credentials to login the web console the first time.
+The default username and password is admin/admin. You can configure this in the conf/jetty-real.properties file.
+
+
+<h2>Running the example programs</h2>
+
+<p>
+To run the demo producer/consumer tools, you need Java and Ant installed.
+</p>
+
+<h3>Installing Ant</h3>
+
+
+<p>
+The example programs depend on <a href="http://ant.apache.org/">Ant</a> being installed. There are more detailed
+instructions on the Ant website - but essentially you need to follow these steps.
+</p>
+<ul>
+<li>
+JAVA_HOME must point to your JDK installation, such that $JAVA_HOME/bin contains the java executable and $JAVA_HOME/lib contains some jar files.
+</li>
+<li>
+ANT_HOME must point to where you installed Apache Ant (http://ant.apache.org)
+</li>
+<li>
+then you need to add $JAVA_HOME/bin and $ANT_HOME/bin to your PATH variable.
+</li>
+</ul>
+
+<p>
+To test this is all working, try typing
+</p>
+
+<pre>
+    java -version
+    cd example
+    ant -version
+</pre>
+
+<h3>Running the example producer and consumer</h3>
+
+<p>
+Once you've got Java and Ant installed correctly you should be able to run
+</p>
+
+<pre>
+    cd example
+    ant consumer
+</pre>
+
+<p>
+and in another shell
+</p>
+
+<pre>
+    cd example
+    ant producer
+</pre>
+
+<p>
+you can specify exact URLs to connect to via command like arguments. e.g.
+</p>
+
+<pre>
+    ant producer -Durl=tcp://somehost:port
+</pre>
+
+
+
+<h2>Further Readings</h2>
+
+You can find more details about Apache ActiveMQ at its website <a href="http://activemq.apache.org">http://activemq.apache.org</a>,
+as well the guide <a href="http://activemq.apache.org/version-5-getting-started.html">getting started</a> guide.
+
+</body>
+</html>
+
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/build.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/build.xml b/assembly/src/release/example/build.xml
deleted file mode 100755
index 074cc62..0000000
--- a/assembly/src/release/example/build.xml
+++ /dev/null
@@ -1,328 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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 name="Inbox" default="help" basedir=".">
-
-    <property name="class.dir" value="target/classes" />
-    <property name="activemq.home" value=".." />
-
-    <!-- example program defaults -->
-    <property name="url" value="tcp://localhost:61616" />
-    <property name="topic" value="false" />
-    <property name="subject" value="TEST.FOO" />
-    <property name="durable" value="false" />
-    <property name="max" value="2000" />
-    <property name="parallelThreads" value="1" />
-    <property name="messageSize" value="1000" />
-    <property name="clientId" value="consumer1" />
-    <property name="producerClientId" value="null" />
-    <property name="timeToLive" value="0" />
-    <property name="sleepTime" value="0" />
-    <property name="transacted" value="false" />
-    <property name="reply-subject" value="" />
-    <property name="verbose" value="true"/>
-    <property name="ack-mode" value="AUTO_ACKNOWLEDGE"/>
-    <property name="receive-time-out" value="0"/>
-    <property name="subscribers" value="1"/>
-    <property name="batch" value="10"/>
-    <property name="user" value=""/>
-    <property name="password" value=""/>
-
-    <!-- for WAR -->
-    <property name="app.name" value="activemq-web" />
-    <property name="app.base.dir" location="target/${app.name}" />
-    <property name="app.webinf.dir" value="${app.base.dir}/WEB-INF" />
-    <property name="app.classes.dir" value="${app.webinf.dir}/classes" />
-    <property name="app.lib.dir" value="${app.webinf.dir}/lib" />
-    <property name="app.src.dir" value="src" />
-    <property name="app.conf.dir" value="conf" />
-    <property name="app.dist.dir" value="target" />
-
-
-    <target name="help">
-        <echo>
-            This script requires Ant 1.6 or higher
-
-            NOTE: All options should be specified as system properties
-               on the command line, e.g.:
-
-               ant consumer -Durl=tcp://hostname:1234 -Dtopic=true
-
-                 OR
-
-               ant producer -Durl=tcp://hostname:61616 -Dmax=1000
-
-            Usage:
-              ant &lt;ant-task> &lt;options>
-
-            --------------------------------------------------------
-            ant consumer &lt;options> - Creates a consumer which waits until a specific number
-                                     of messages have been received
-
-            Consumer Options:
-                              url - Used to specify acustom URL for the
-                                    broker, e.g., tcp://hostname:1234
-                            topic - A boolean to determine whether to use
-                                    topics or queues; the default is false
-                          subject - Used to specify a custom destination
-                                    name, e.g. MyDestination
-                          durable - A boolean to specify that you want to
-                                    create a durable topic?
-                              max - The maximum number of messages to wait
-                                    for before shutting down
-                         clientId - A string to use as the client id
-                       transacted - A boolean to specify that you want to use
-                                    transactions?
-                        sleepTime - The time to sleep between message consumptions
-                          verbose - Used to print out more info; the default is
-                                    true
-                         ack-mode - The type of message acknowledgement to use;
-                                    see the Javadocs for javax.jms.Session for
-                                    more information
-                 receive-time-out - An integer to specify the time to wait for
-                                    message consumption
-                  parallelThreads - The number of parallel threads
-                            batch - Batch size for transactions and client acknowledgment (default 10)
-                             user - Connection username (if connecting to secured broker)
-                         password - Connection password (if connecting to secured broker)
-
-            --------------------------------------------------------
-            ant producer &lt;options&gt; - Creates a producer publishing a number of messages
-
-            Producer Options:
-                           url - Used to specify acustom URL for the broker,
-                                 e.g., tcp://hostname:1234
-                         topic - A boolean to determine whether to use topics
-                                 or queues
-                       subject - Used to specify a custom destination name,
-                                 e.g. MyDestination
-                       durable - A boolean to specify that you want to change the DeliveryMode of
-                                 the produced messages ('PERSISTENT':'true' or 'NON-PERSISTENT':'false')
-                           max - The maximum number of messages to wait for
-                                 before shutting down
-                     sleepTime - The time to sleep between message consumptions
-                    transacted - A boolean to specify that you want to use
-                                 transactions?
-                       verbose - Used to print out more info; the default is true
-                   messageSize - The size of the message in 1-byte characters
-               parallelThreads - The number of parallel threads
-                         batch - Batch size for transactions and client acknowledgment (default 10)
-                          user - Connection username (if connecting to secured broker)
-                      password - Connection password (if connecting to secured broker)
-
-           --------------------------------------------------------
-
-                   ant -help  - Display ant help screen
-                    ant help  - Display this message
-                   ant clean  - Delete the built directory
-             ant embedBroker  - Runs an embedded broker inside Java code
-                     ant war  - Creates a WAR deployment unit of the ActiveMQ Broker
-    </echo>
-    </target>
-
-    <target name="clean">
-        <delete dir="target" quiet="true" />
-        <delete dir="${class.dir}" quiet="true" />
-    </target>
-
-    <target name="init">
-        <mkdir dir="${class.dir}" />
-        <mkdir dir="src/ddl" />
-
-        <path id="javac.classpath">
-            <pathelement path="${class.dir}" />
-            <pathelement path="conf" />
-            <fileset dir="../lib">
-                <include name="**/*.jar" />
-            </fileset>
-        </path>
-    </target>
-
-
-    <target name="compile" depends="init" description="Compile all Java">
-        <javac srcdir="src" destdir="${class.dir}" includeantruntime="false">
-            <classpath refid="javac.classpath" />
-        </javac>
-        <copy todir="${class.dir}">
-            <fileset dir="src">
-                <include name="**/*.properties" />
-                <include name="**/*.xml" />
-            </fileset>
-        </copy>
-    </target>
-
-    <target name="war" depends="compile" description="Create the activemq broker war file.">
-        <!--Copy the required jar files-->
-        <copy todir="${app.lib.dir}">
-            <fileset dir="../lib">
-                <include name="*.jar" />
-                <exclude name="servlet.jar" />
-            </fileset>
-
-            <fileset dir="../lib/optional">
-                <include name="activemq-web*.jar" />
-                <include name="activemq-container*.jar" />
-                <include name="commons-bean*.jar" />
-                <include name="spring*.jar" />
-                <include name="xbean*.jar" />
-
-                <!-- include Apache Derby for persistence -->
-                <include name="derby*.jar" />
-
-                <!-- include database pooling just in case -->
-                <include name="commons-pool*.jar" />
-                <include name="commons-db*.jar" />
-            </fileset>
-        </copy>
-        <!--Copy the configuration file-->
-        <copy todir="${app.webinf.dir}">
-            <fileset dir="${app.conf.dir}">
-                <!--Web application configuration file-->
-                <include name="web.xml" />
-                <!--ActiveMQ configuration file-->
-                <include name="activemq.xml" />
-            </fileset>
-        </copy>
-        <copy todir="${app.classes.dir}">
-            <fileset dir="${app.conf.dir}">
-                <!--Log4j configuration file-->
-                <include name="log4j.properties" />
-            </fileset>
-        </copy>
-        <!-- Create the war file -->
-        <jar jarfile="${app.dist.dir}/${app.name}.war" basedir="${app.base.dir}" />
-    </target>
-
-    <target name="consumer" depends="compile" description="Runs a simple consumer">
-
-        <echo>Running consumer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
-        <java classname="ConsumerTool" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="--url=${url}" />
-            <arg value="--topic=${topic}" />
-            <arg value="--subject=${subject}" />
-            <arg value="--durable=${durable}" />
-            <arg value="--maxium-messages=${max}" />
-            <arg value="--client-id=${clientId}" />
-            <arg value="--parallel-threads=${parallelThreads}" />
-            <arg value="--transacted=${transacted}" />
-            <arg value="--sleep-time=${sleepTime}" />
-            <arg value="--verbose=${verbose}"/>
-            <arg value="--ack-mode=${ack-mode}"/>
-            <arg value="--receive-time-out=${receive-time-out}"/>
-      <arg value="--batch=${batch}"/>
-      <arg value="--user=${user}"/>
-      <arg value="--password=${password}"/>
-        </java>
-    </target>
-
-    <target name="producer" depends="compile" description="Runs a simple producer">
-
-        <echo>Running producer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
-        <java classname="ProducerTool" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="--url=${url}" />
-            <arg value="--topic=${topic}" />
-            <arg value="--subject=${subject}" />
-            <arg value="--persistent=${durable}" />
-            <arg value="--message-count=${max}" />
-            <arg value="--message-size=${messageSize}" />
-            <arg value="--parallel-threads=${parallelThreads}" />
-            <arg value="--time-to-live=${timeToLive}" />
-            <arg value="--sleep-time=${sleepTime}" />
-            <arg value="--transacted=${transacted}" />
-            <arg value="--verbose=${verbose}"/>
-      <arg value="--batch=${batch}"/>
-      <arg value="--user=${user}"/>
-      <arg value="--password=${password}"/>
-        </java>
-    </target>
-
-    <target name="requester" depends="compile" description="Runs a simple requester">
-
-        <echo>Running requester against server at $$url = ${url} for subject $$subject = ${subject}</echo>
-        <java classname="RequesterTool" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="--url=${url}" />
-            <arg value="--topic=${topic}" />
-            <arg value="--subject=${subject}" />
-            <arg value="--persistent=${durable}" />
-            <arg value="--message-count=${max}" />
-            <arg value="--message-size=${messageSize}" />
-            <arg value="--client-id=${producerClientId}" />
-            <arg value="--time-to-live=${timeToLive}" />
-            <arg value="--sleep-time=${sleepTime}" />
-            <arg value="--transacted=${transacted}" />
-            <arg value="--reply-subject=${reply-subject}" />
-            <arg value="--verbose=${verbose}"/>
-        </java>
-    </target>
-
-    <target name="embedBroker" depends="compile" description="Runs a simple producer">
-
-        <echo>Running an embedded broker example</echo>
-        <java classname="EmbeddedBroker" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-        </java>
-    </target>
-
-    <target name="topic-publisher" depends="compile" description="Runs a publisher">
-        <java classname="TopicPublisher" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <arg value="--url=${url}" />
-            <arg value="--size=${messageSize}" />
-            <arg value="--subscribers=${subscribers}" />
-            <arg value="--messages=${max}" />
-            <arg value="--delay=${sleepTime}" />
-            <arg value="--batch=${batch}" />
-        </java>
-    </target>
-
-    <target name="topic-listener" depends="compile" description="Runs a listener">
-        <java classname="TopicListener" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <arg value="--url=${url}" />
-        </java>
-    </target>
-
-    <target name="stomp" depends="compile" description="Runs a Stomp example">
-        <echo>Running a Stomp example</echo>
-        <java classname="StompExample" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-        </java>
-    </target>
-
-    <target name="log4j-jms" depends="compile" description="Runs a Log4j JMS Appender example">
-        <echo>Running a Log4j JMS Appender example</echo>
-        <java classname="Log4jJMSAppenderExample" fork="yes" maxmemory="100M">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-Dlog4j.configuration=log4j-jms.properties" />
-        </java>
-    </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/conf/activemq.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/conf/activemq.xml b/assembly/src/release/example/conf/activemq.xml
deleted file mode 100644
index d70f16a..0000000
--- a/assembly/src/release/example/conf/activemq.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-   
-    http://www.apache.org/licenses/LICENSE-2.0
-   
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  
-  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false">
-
-    <persistenceFactory>
-      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="../data"/>
-    </persistenceFactory>
-  
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>      
-      <transportConnector uri="stomp://localhost:61613"/>
-    </transportConnectors>
-        
-  </broker>
-  
-</beans>
-<!-- END SNIPPET: xbean -->

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/conf/log4j.properties b/assembly/src/release/example/conf/log4j.properties
deleted file mode 100644
index ac07489..0000000
--- a/assembly/src/release/example/conf/log4j.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-## 
-## http://www.apache.org/licenses/LICENSE-2.0
-## 
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-#
-# The logging properties used by the standalone ActiveMQ broker
-#
-log4j.rootLogger=INFO, stdout, logfile
-
-# CONSOLE appender
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %-5p %m%n
-
-# Log File appender
-log4j.appender.logfile=org.apache.log4j.FileAppender
-log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.logfile.file=activemq.log
-log4j.appender.logfile.append=true
-
-#
-#  You can change logger levels here.
-#
-log4j.logger.org.apache.activemq=INFO
-log4j.logger.org.apache.activemq.spring=WARN

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/conf/resin-web.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/conf/resin-web.xml b/assembly/src/release/example/conf/resin-web.xml
deleted file mode 100644
index 1641549..0000000
--- a/assembly/src/release/example/conf/resin-web.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-   
-    http://www.apache.org/licenses/LICENSE-2.0
-   
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<web-app>
-  <!--
-      In order to be able to compatiable with Resin 2.1.x and 3.0.x,
-      both XML and XSLT have to be replaced.
-      If only xalan is included, Resin 2.1.x will fail but not 3.0.x.
-      Therefore the best way is to use the compatiable version of the
-      XML parser ans XSLT.
-       - Please refere to the following link for more detailed information.
-       - http://www.caucho.com/resin-3.0/xml/jaxp.xtp
-  -->
-  <!-- xml -->
-  <system-property javax.xml.parsers.DocumentBuilderFactory=
-               "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
-  <system-property javax.xml.parsers.SAXParserFactory=
-               "org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
-  <!--  xslt -->
-  <system-property javax.xml.transform.TransformerFactory=
-               "org.apache.xalan.processor.TransformerFactoryImpl"/>
-</web-app>

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/conf/web.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/conf/web.xml b/assembly/src/release/example/conf/web.xml
deleted file mode 100644
index e6452fb..0000000
--- a/assembly/src/release/example/conf/web.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    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.
--->
-
-<!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-    "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
-  <display-name>ActiveMQ Message Broker Web Application</display-name>
-
-  <description>
-        ActiveMQ web application to deploy the Broker in a servlet engine.
-  </description>
-
-  <context-param>
-    <param-name>brokerURI</param-name>
-    <param-value>/WEB-INF/activemq.xml</param-value>
-  </context-param>
-
-  <listener>
-    <listener-class>org.apache.activemq.web.SpringBrokerContextListener</listener-class>
-  </listener>
-</web-app>
-

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/perfharness/perfharness-activemq.sh
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/perfharness/perfharness-activemq.sh b/assembly/src/release/example/perfharness/perfharness-activemq.sh
deleted file mode 100755
index c226b4a..0000000
--- a/assembly/src/release/example/perfharness/perfharness-activemq.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-# ------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-# http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ------------------------------------------------------------------------
-
-# ==================================================================
-# Helper script to run the IBM JMS performance harness against
-# the ActiveMQ message broker.
-#
-# Sample Usage: 
-#   ./perfharness-activemq.sh -d dynamicQueues/FOO -tc jms.r11.PutGet -nt 6
-#
-# It assumes that the apache-activemq-${project.version}.jar and 
-# perfharness.jar files are in the current directory.  If they are not,
-# set the ACTIVEMQ_HOME and PERFHARNESS_HOME env variable to the correct location.
-#
-# You can download the perfharness.jar file from:
-# http://www.alphaworks.ibm.com/tech/perfharness
-#
-# By Default the test connects the the vm://localhost broker.
-# To change that, use set the BROKER_URL to the broker url you want to use.
-#
-# ==================================================================
-
-if [ -z "$PERFHARNESS_HOME" ] ; then
-   PERFHARNESS_HOME=.
-fi
-
-if [ -z "$ACTIVEMQ_HOME" ] ; then
-   ACTIVEMQ_HOME=../..
-fi
-
-if [ -z "$BROKER_URL" ] ; then
-   BROKER_URL='vm://(broker://()/localhost?useJmx=false)/localhost'
-fi
-
-java ${JAVA_OPTIONS} -cp ${ACTIVEMQ_HOME}/apache-activemq-${project.version}.jar:${PERFHARNESS_HOME}/perfharness.jar JMSPerfHarness -pc JNDI -ii org.apache.activemq.jndi.ActiveMQInitialContextFactory -iu $BROKER_URL -cf ConnectionFactory -d dynamic$DESTINATION $@

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/ruby/README.txt
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/ruby/README.txt b/assembly/src/release/example/ruby/README.txt
deleted file mode 100644
index 150a971..0000000
--- a/assembly/src/release/example/ruby/README.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-
-Prereqs
-=======
-
-- Install RubyGems see: http://docs.rubygems.org/
-- Install the stomp gem.  Run: gem install stomp
-
-Overview of stompcat.rb and catstomp.rb 
-==========================================
-
-The basic idea behind these scripts to to create something like netcat except over JMS destinations.
-
-catstomp - takes stdin and sends it to a stomp destination
-stompcat - outputs data received from a stomp destination
-
-A simple example usage:
-
-In console 1 run:
-cat | ./catstomp.rb
-
-In console 2 run:
-./stompcat.rb
-
-now any line you enter into console 1 will get sent to console 2.
-
-Hopefully these to scripts can get merged together in the future and the command line arguments can change
-so that it look more like netcat.

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/ruby/catstomp.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/ruby/catstomp.rb b/assembly/src/release/example/ruby/catstomp.rb
deleted file mode 100755
index ed8eff0..0000000
--- a/assembly/src/release/example/ruby/catstomp.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-require 'rubygems'
-require 'stomp'
-
-continue = true
-
-trap("INT") {
-  puts "CTRL+C"
-  puts "shutting down ..."
-  @conn.disconnect
-  sleep 1
-  STDIN.close
-}
-
-  
-@port = 61613
-@host = "localhost"
-@user = ENV["STOMP_USER"];
-@password = ENV["STOMP_PASSWORD"]
-    
-@host = ENV["STOMP_HOST"] if ENV["STOMP_HOST"] != NIL
-@port = ENV["STOMP_PORT"] if ENV["STOMP_PORT"] != NIL
-    
-@destination = "/topic/stompcat"
-@destination = $*[0] if $*[0] != NIL
-    
-$stderr.print "Connecting to stomp://#{@host}:#{@port} as #{@user}\n"
-@conn = Stomp::Connection.open @user, @password, @host, @port, true
-$stderr.print "Sending input to #{@destination}\n"
-
-@headers = {'persistent'=>'false'} 
-@headers['reply-to'] = $*[1] if $*[1] != NIL
-
-begin
-  STDIN.each_line { |line| 
-    @conn.publish @destination, line, @headers
-  }
-rescue IOError
-end

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/ruby/listener.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/ruby/listener.rb b/assembly/src/release/example/ruby/listener.rb
deleted file mode 100755
index c11efc3..0000000
--- a/assembly/src/release/example/ruby/listener.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
- 
-require 'rubygems'
-require 'stomp'
-
-@conn = Stomp::Connection.open '', '', 'localhost', 61613, false 
-@count = 0
-
-@conn.subscribe '/topic/event', { :ack =>"auto" }
-while true 
-	@msg = @conn.receive
-	if @msg.command == "MESSAGE" 
-		if @msg.body == "SHUTDOWN"
-			exit 0
-	
-		elsif @msg.body == "REPORT"
-			@diff = Time.now - @start
-			@body = "Received #{@count} in #{@diff} seconds";
-			@conn.send '/queue/response', @body, {'persistent'=>'false'}
-			@count = 0;
-		else
-			if @count == 0 
-				@start = Time.now
-			end
-
-			@count += 1;
-			if @count % 1000 == 0
- 				$stdout.print "Received #{@count} messages.\n"
-			end
-		end
-	else
- 		$stdout.print "#{@msg.command}: #{@msg.body}\n"
-	end
-end
-@conn.disconnect
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/ruby/publisher.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/ruby/publisher.rb b/assembly/src/release/example/ruby/publisher.rb
deleted file mode 100755
index ed647ba..0000000
--- a/assembly/src/release/example/ruby/publisher.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
- 
-require 'rubygems'
-require 'stomp'
-
-@conn = Stomp::Connection.open '', '', 'localhost', 61613, false 
-@messages = 10000
-@batches = 40
-@subscribers = 10
-@size = 256
-
-@DATA = "abcdefghijklmnopqrstuvwxyz";
-@body = "";
-for i in 0..(@size-1)
-	@body += @DATA[ i % @DATA.length,1]
-end
-
-@times = []
-@conn.subscribe '/queue/response', { :ack =>"auto" }
-
-for i in 1..(@batches)
-	@body += @DATA[ i % @DATA.length,1]
-	sleep 1 if i == 1
-
- 	@start = Time.now	
-
-	for j in 1..@messages
-		@conn.send '/topic/event', @body, {'persistent'=>'false'}
-		$stdout.print "Sent #{j} messages\n" if j%1000==0
-	end
-	@conn.send '/topic/event', "REPORT", {'persistent'=>'false'}
-
-	@remaining = @subscribers
-	while @remaining > 0
-		@msg = @conn.receive
-		if @msg.command == "MESSAGE" 
-			@remaining -= 1
-			$stdout.print "Received report: #{@msg.body}, remaining: #{@remaining}\n"
-		else
- 			$stdout.print "#{@msg.command}: #{@msg.body}\n"
-		end
-	end
- 	@diff = Time.now-@start
-
-	$stdout.print "Batch #{i} of #{@batches} completed in #{@diff} seconds.\n"
-	@times[i] = @diff
-end
-
-@conn.send '/topic/event', "SHUTDOWN", {'persistent'=>'false'}
-
-@conn.disconnect
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/ruby/stompcat.rb
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/ruby/stompcat.rb b/assembly/src/release/example/ruby/stompcat.rb
deleted file mode 100755
index a77b77e..0000000
--- a/assembly/src/release/example/ruby/stompcat.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-require 'rubygems'
-require 'stomp'
-
-begin
-
-    @port = 61613
-    @host = "localhost"
-    @user = ENV["STOMP_USER"];
-    @password = ENV["STOMP_PASSWORD"]
-    
-    @host = ENV["STOMP_HOST"] if ENV["STOMP_HOST"] != NIL
-    @port = ENV["STOMP_PORT"] if ENV["STOMP_PORT"] != NIL
-    
-    @destination = "/topic/stompcat"
-    @destination = $*[0] if $*[0] != NIL
-    
-    $stderr.print "Connecting to stomp://#{@host}:#{@port} as #{@user}\n"
-    @conn = Stomp::Connection.open @user, @password, @host, @port, true
-    $stderr.print "Getting output from #{@destination}\n"
-
-    @conn.subscribe @destination, { :ack =>"client" }
-    while true
-        @msg = @conn.receive
-        $stdout.print @msg.body
-        $stdout.flush
-        @conn.ack @msg.headers["message-id"]
-    end
-    @conn.disconnect
-  
-rescue 
-end
-

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/CommandLineSupport.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/CommandLineSupport.java b/assembly/src/release/example/src/CommandLineSupport.java
deleted file mode 100644
index cbde8a4..0000000
--- a/assembly/src/release/example/src/CommandLineSupport.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.util.ArrayList;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * Helper utility that can be used to set the properties on any object using
- * command line arguments.
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-public final class CommandLineSupport {
-
-    private CommandLineSupport() {
-    }
-    
-    /**
-     * Sets the properties of an object given the command line args.
-     * 
-     * if args contains: --ack-mode=AUTO --url=tcp://localhost:61616 --persistent 
-     * 
-     * then it will try to call the following setters on the target object.
-     * 
-     * target.setAckMode("AUTO");
-     * target.setURL(new URI("tcp://localhost:61616") );
-     * target.setPersistent(true);
-     * 
-     * Notice the the proper conversion for the argument is determined by examining the 
-     * setter arguement type.  
-     * 
-     * @param target the object that will have it's properties set
-     * @param args the commline options
-     * @return any arguments that are not valid options for the target
-     */
-    public static String[] setOptions(Object target, String[] args) {
-        ArrayList<String> rc = new ArrayList<String>();
-
-        for (int i = 0; i < args.length; i++) {
-            if (args[i] == null) {
-                continue;
-            }
-
-            if (args[i].startsWith("--")) {
-
-                // --options without a specified value are considered boolean
-                // flags that are enabled.
-                String value = "true";
-                String name = args[i].substring(2);
-
-                // if --option=value case
-                int p = name.indexOf("=");
-                if (p > 0) {
-                    value = name.substring(p + 1);
-                    name = name.substring(0, p);
-                }
-
-                // name not set, then it's an unrecognized option
-                if (name.length() == 0) {
-                    rc.add(args[i]);
-                    continue;
-                }
-
-                String propName = convertOptionToPropertyName(name);
-                if (!IntrospectionSupport.setProperty(target, propName, value)) {
-                    rc.add(args[i]);
-                    continue;
-                }
-            }
-
-        }
-
-        String r[] = new String[rc.size()];
-        rc.toArray(r);
-        return r;
-    }
-
-    /**
-     * converts strings like: test-enabled to testEnabled
-     * 
-     * @param name
-     * @return
-     */
-    private static String convertOptionToPropertyName(String name) {
-        String rc = "";
-
-        // Look for '-' and strip and then convert the subsequent char to
-        // uppercase
-        int p = name.indexOf("-");
-        while (p > 0) {
-            // strip
-            rc += name.substring(0, p);
-            name = name.substring(p + 1);
-
-            // can I convert the next char to upper?
-            if (name.length() > 0) {
-                rc += name.substring(0, 1).toUpperCase();
-                name = name.substring(1);
-            }
-
-            p = name.indexOf("-");
-        }
-        return rc + name;
-    }
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/ConsumerTool.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/ConsumerTool.java b/assembly/src/release/example/src/ConsumerTool.java
deleted file mode 100755
index e8f39f7..0000000
--- a/assembly/src/release/example/src/ConsumerTool.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * A simple tool for consuming messages
- * 
- * 
- */
-public class ConsumerTool extends Thread implements MessageListener, ExceptionListener {
-
-    private boolean running;
-
-    private Session session;
-    private Destination destination;
-    private MessageProducer replyProducer;
-
-    private boolean pauseBeforeShutdown = false;
-    private boolean verbose = true;
-    private int maxiumMessages;
-    private static int parallelThreads = 1;
-    private String subject = "TOOL.DEFAULT";
-    private boolean topic;
-    private String user = ActiveMQConnection.DEFAULT_USER;
-    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
-    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
-    private boolean transacted;
-    private boolean durable;
-    private String clientId;
-    private int ackMode = Session.AUTO_ACKNOWLEDGE;
-    private String consumerName = "James";
-    private long sleepTime;
-    private long receiveTimeOut;
-	private long batch = 10; // Default batch size for CLIENT_ACKNOWLEDGEMENT or SESSION_TRANSACTED
-	private long messagesReceived = 0;
-
-    public static void main(String[] args) {
-        ArrayList<ConsumerTool> threads = new ArrayList();
-        ConsumerTool consumerTool = new ConsumerTool();
-        String[] unknown = CommandLineSupport.setOptions(consumerTool, args);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        consumerTool.showParameters();
-        for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) {
-            consumerTool = new ConsumerTool();
-            CommandLineSupport.setOptions(consumerTool, args);
-            consumerTool.start();
-            threads.add(consumerTool);
-        }
-
-        while (true) {
-            Iterator<ConsumerTool> itr = threads.iterator();
-            int running = 0;
-            while (itr.hasNext()) {
-                ConsumerTool thread = itr.next();
-                if (thread.isAlive()) {
-                    running++;
-                }
-            }
-
-            if (running <= 0) {
-                System.out.println("All threads completed their work");
-                break;
-            }
-
-            try {
-                Thread.sleep(1000);
-            } catch (Exception e) {
-            }
-        }
-        Iterator<ConsumerTool> itr = threads.iterator();
-        while (itr.hasNext()) {
-            ConsumerTool thread = itr.next();
-        }
-    }
-
-    public void showParameters() {
-        System.out.println("Connecting to URL: " + url + " (" + user + ":" + password + ")");
-        System.out.println("Consuming " + (topic ? "topic" : "queue") + ": " + subject);
-        System.out.println("Using a " + (durable ? "durable" : "non-durable") + " subscription");
-        System.out.println("Running " + parallelThreads + " parallel threads");
-    }
-
-    public void run() {
-        try {
-            running = true;
-
-            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-            Connection connection = connectionFactory.createConnection();
-            if (durable && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
-                connection.setClientID(clientId);
-            }
-            connection.setExceptionListener(this);
-            connection.start();
-
-            session = connection.createSession(transacted, ackMode);
-            if (topic) {
-                destination = session.createTopic(subject);
-            } else {
-                destination = session.createQueue(subject);
-            }
-
-            replyProducer = session.createProducer(null);
-            replyProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-            MessageConsumer consumer = null;
-            if (durable && topic) {
-                consumer = session.createDurableSubscriber((Topic) destination, consumerName);
-            } else {
-                consumer = session.createConsumer(destination);
-            }
-
-            if (maxiumMessages > 0) {
-                consumeMessagesAndClose(connection, session, consumer);
-            } else {
-                if (receiveTimeOut == 0) {
-                    consumer.setMessageListener(this);
-                } else {
-                    consumeMessagesAndClose(connection, session, consumer, receiveTimeOut);
-                }
-            }
-
-        } catch (Exception e) {
-            System.out.println("[" + this.getName() + "] Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void onMessage(Message message) {
-
-		messagesReceived++;
-
-        try {
-
-            if (message instanceof TextMessage) {
-                TextMessage txtMsg = (TextMessage) message;
-                if (verbose) {
-
-                    String msg = txtMsg.getText();
-                    int length = msg.length();
-                    if (length > 50) {
-                        msg = msg.substring(0, 50) + "...";
-                    }
-                    System.out.println("[" + this.getName() + "] Received: '" + msg + "' (length " + length + ")");
-                }
-            } else {
-                if (verbose) {
-                    System.out.println("[" + this.getName() + "] Received: '" + message + "'");
-                }
-            }
-
-            if (message.getJMSReplyTo() != null) {
-                replyProducer.send(message.getJMSReplyTo(), session.createTextMessage("Reply: " + message.getJMSMessageID()));
-            }
-
-            if (transacted) {
-				if ((messagesReceived % batch) == 0) {
-					System.out.println("Commiting transaction for last " + batch + " messages; messages so far = " + messagesReceived);
-					session.commit();
-				}
-            } else if (ackMode == Session.CLIENT_ACKNOWLEDGE) {
-				if ((messagesReceived % batch) == 0) {
-					System.out.println("Acknowledging last " + batch + " messages; messages so far = " + messagesReceived);
-					message.acknowledge();
-				}
-            }
-
-        } catch (JMSException e) {
-            System.out.println("[" + this.getName() + "] Caught: " + e);
-            e.printStackTrace();
-        } finally {
-            if (sleepTime > 0) {
-                try {
-                    Thread.sleep(sleepTime);
-                } catch (InterruptedException e) {
-                }
-            }
-        }
-    }
-
-    public synchronized void onException(JMSException ex) {
-        System.out.println("[" + this.getName() + "] JMS Exception occured.  Shutting down client.");
-        running = false;
-    }
-
-    synchronized boolean isRunning() {
-        return running;
-    }
-
-    protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer) throws JMSException,
-            IOException {
-        System.out.println("[" + this.getName() + "] We are about to wait until we consume: " + maxiumMessages
-                + " message(s) then we will shutdown");
-
-        for (int i = 0; i < maxiumMessages && isRunning();) {
-            Message message = consumer.receive(1000);
-            if (message != null) {
-                i++;
-                onMessage(message);
-            }
-        }
-        System.out.println("[" + this.getName() + "] Closing connection");
-        consumer.close();
-        session.close();
-        connection.close();
-        if (pauseBeforeShutdown) {
-            System.out.println("[" + this.getName() + "] Press return to shut down");
-            System.in.read();
-        }
-    }
-
-    protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer, long timeout)
-            throws JMSException, IOException {
-        System.out.println("[" + this.getName() + "] We will consume messages while they continue to be delivered within: " + timeout
-                + " ms, and then we will shutdown");
-
-        Message message;
-        while ((message = consumer.receive(timeout)) != null) {
-            onMessage(message);
-        }
-
-        System.out.println("[" + this.getName() + "] Closing connection");
-        consumer.close();
-        session.close();
-        connection.close();
-        if (pauseBeforeShutdown) {
-            System.out.println("[" + this.getName() + "] Press return to shut down");
-            System.in.read();
-        }
-    }
-
-    public void setAckMode(String ackMode) {
-        if ("CLIENT_ACKNOWLEDGE".equals(ackMode)) {
-            this.ackMode = Session.CLIENT_ACKNOWLEDGE;
-        }
-        if ("AUTO_ACKNOWLEDGE".equals(ackMode)) {
-            this.ackMode = Session.AUTO_ACKNOWLEDGE;
-        }
-        if ("DUPS_OK_ACKNOWLEDGE".equals(ackMode)) {
-            this.ackMode = Session.DUPS_OK_ACKNOWLEDGE;
-        }
-        if ("SESSION_TRANSACTED".equals(ackMode)) {
-            this.ackMode = Session.SESSION_TRANSACTED;
-        }
-    }
-
-    public void setClientId(String clientID) {
-        this.clientId = clientID;
-    }
-
-    public void setConsumerName(String consumerName) {
-        this.consumerName = consumerName;
-    }
-
-    public void setDurable(boolean durable) {
-        this.durable = durable;
-    }
-
-    public void setMaxiumMessages(int maxiumMessages) {
-        this.maxiumMessages = maxiumMessages;
-    }
-
-    public void setPauseBeforeShutdown(boolean pauseBeforeShutdown) {
-        this.pauseBeforeShutdown = pauseBeforeShutdown;
-    }
-
-    public void setPassword(String pwd) {
-        this.password = pwd;
-    }
-
-    public void setReceiveTimeOut(long receiveTimeOut) {
-        this.receiveTimeOut = receiveTimeOut;
-    }
-
-    public void setSleepTime(long sleepTime) {
-        this.sleepTime = sleepTime;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public void setParallelThreads(int parallelThreads) {
-        if (parallelThreads < 1) {
-            parallelThreads = 1;
-        }
-        this.parallelThreads = parallelThreads;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public void setQueue(boolean queue) {
-        this.topic = !queue;
-    }
-
-    public void setTransacted(boolean transacted) {
-        this.transacted = transacted;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public void setBatch(long batch) {
-        this.batch = batch;
-    }
-}

http://git-wip-us.apache.org/repos/asf/activemq/blob/2ecf41d0/assembly/src/release/example/src/EmbeddedBroker.java
----------------------------------------------------------------------
diff --git a/assembly/src/release/example/src/EmbeddedBroker.java b/assembly/src/release/example/src/EmbeddedBroker.java
deleted file mode 100644
index d45ceff..0000000
--- a/assembly/src/release/example/src/EmbeddedBroker.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * This example demonstrates how to run an embedded broker inside your Java code
- * 
- * 
- */
-public final class EmbeddedBroker {
-
-    private EmbeddedBroker() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(true);
-        broker.addConnector("tcp://localhost:61616");
-        broker.start();
-
-        // now lets wait forever to avoid the JVM terminating immediately
-        Object lock = new Object();
-        synchronized (lock) {
-            lock.wait();
-        }
-    }
-}