Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 510C2F994 for ; Fri, 29 Mar 2013 13:35:02 +0000 (UTC) Received: (qmail 96299 invoked by uid 500); 29 Mar 2013 13:35:02 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 96207 invoked by uid 500); 29 Mar 2013 13:35:01 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 96183 invoked by uid 99); 29 Mar 2013 13:35:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Mar 2013 13:35:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Mar 2013 13:34:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 26A6F2388906; Fri, 29 Mar 2013 13:34:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1462479 - in /activemq/trunk: ./ activemq-osgi/ activemq-web-demo/ activemq-web-demo/src/main/webapp/ activemq-web-demo/src/main/webapp/WEB-INF/ activemq-web-demo/src/main/webapp/sandbox/ activemq-web-demo/src/main/webapp/websocket/ active... Date: Fri, 29 Mar 2013 13:34:34 -0000 To: commits@activemq.apache.org From: dejanb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130329133435.26A6F2388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dejanb Date: Fri Mar 29 13:34:34 2013 New Revision: 1462479 URL: http://svn.apache.org/r1462479 Log: https://issues.apache.org/jira/browse/AMQ-4418 - refactor web demo to be war that can be ran in karaf Removed: activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/index.html activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.html activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.js activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/util.js activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/webmq.js Modified: activemq/trunk/activemq-osgi/pom.xml activemq/trunk/activemq-web-demo/pom.xml activemq/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml activemq/trunk/activemq-web-demo/src/main/webapp/chat.html activemq/trunk/activemq-web-demo/src/main/webapp/index.html activemq/trunk/activemq-web-demo/src/main/webapp/websocket/index.html activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java activemq/trunk/assembly/src/main/descriptors/common-bin.xml activemq/trunk/pom.xml Modified: activemq/trunk/activemq-osgi/pom.xml URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-osgi/pom.xml?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/activemq-osgi/pom.xml (original) +++ activemq/trunk/activemq-osgi/pom.xml Fri Mar 29 13:34:34 2013 @@ -65,10 +65,12 @@ javax.transaction*, org.apache.commons.pool*;resolution:=optional, org.apache.commons.net*;resolution:=optional, - * + com.sun.syndication*;resolution:=optional, + * org.apache.activemq*;version=${project.version};-noimport:=true;-split-package:=merge-first, + org.apache.activemq.web*;version=${project.version};-noimport:=true;-split-package:=merge-first, org.fusesource*, @@ -150,6 +152,11 @@ ${project.groupId} + activemq-web + + + + ${project.groupId} activemq-spring Modified: activemq/trunk/activemq-web-demo/pom.xml URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-demo/pom.xml?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/activemq-web-demo/pom.xml (original) +++ activemq/trunk/activemq-web-demo/pom.xml Fri Mar 29 13:34:34 2013 @@ -46,6 +46,96 @@ 10 + + + org.apache.maven.plugins + maven-war-plugin + + @{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@ + + WEB-INF/lib/jetty*.jar, + WEB-INF/lib/servlet*.jar, + WEB-INF/lib/activemq*.jar + + + + ${basedir}/../activemq-web-console/src/main/webapp/styles/ + styles + + + ${basedir}/../activemq-web-console/src/main/webapp/images/ + images + + + ${basedir}/../activemq-web-console/src/main/webapp/js/ + js + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + org.apache.felix + maven-bundle-plugin + + + bundle-manifest + process-classes + + manifest + + + + + + jar + bundle + war + + + activemqdemo + activemqdemo + .,WEB-INF/classes + WEB-INF/lib + *;scope=compile|runtime + true + + org.apache.activemq, + org.apache.activemq.web, + org.xml.sax, + org.xml.sax.helpers, + javax.xml.parsers, + javax.xml.transform, + javax.management.remote, + javax.naming, + org.w3c.dom, + javax.servlet, + javax.servlet.http, + javax.servlet.resources, + javax.servlet.jsp, + javax.servlet.jsp.tagext, + javax.servlet.jsp.el, + javax.management, + javax.management.openmbean, + javax.net, + org.osgi.framework, + org.osgi.service.cm, + org.apache.commons.logging;version="[1.1,2)";resolution:=optional, + org.slf4j;version="[1.6,2)";resolution:=optional, + org.slf4j.spi;version="[1.6,2)";resolution:=optional, + org.apache.log4j;version="[1.2.14,2)";resolution:=optional, + org.apache.log4j.spi;version="[1.2.14,2)";resolution:=optional + + + !* + + + + + Modified: activemq/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml (original) +++ activemq/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml Fri Mar 29 13:34:34 2013 @@ -25,11 +25,6 @@ - org.apache.activemq.brokerURL - vm://amq-broker - The URL of the Message Broker to connect to - - org.apache.activemq.embeddedBroker true Whether we should include an embedded broker or not @@ -106,4 +101,9 @@ /portfolioPublish + + index.html + index.jsp + + Modified: activemq/trunk/activemq-web-demo/src/main/webapp/chat.html URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-demo/src/main/webapp/chat.html?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/activemq-web-demo/src/main/webapp/chat.html (original) +++ activemq/trunk/activemq-web-demo/src/main/webapp/chat.html Fri Mar 29 13:34:34 2013 @@ -22,10 +22,10 @@ Chat Example - ActiveMQ Web Demos Modified: activemq/trunk/activemq-web-demo/src/main/webapp/index.html URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-demo/src/main/webapp/index.html?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/activemq-web-demo/src/main/webapp/index.html (original) +++ activemq/trunk/activemq-web-demo/src/main/webapp/index.html Fri Mar 29 13:34:34 2013 @@ -21,16 +21,16 @@ ActiveMQ Web Demos - - - - + + + + Modified: activemq/trunk/activemq-web-demo/src/main/webapp/websocket/index.html URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-demo/src/main/webapp/websocket/index.html?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/activemq-web-demo/src/main/webapp/websocket/index.html (original) +++ activemq/trunk/activemq-web-demo/src/main/webapp/websocket/index.html Fri Mar 29 13:34:34 2013 @@ -21,10 +21,10 @@ Chat Example Using Stomp Over WebSocket Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java (original) +++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java Fri Mar 29 13:34:34 2013 @@ -47,6 +47,8 @@ import javax.servlet.http.HttpSessionEve import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.MessageAvailableConsumer; +import org.apache.activemq.broker.BrokerRegistry; +import org.apache.activemq.broker.BrokerService; import org.apache.activemq.camel.component.ActiveMQComponent; import org.apache.activemq.camel.component.ActiveMQConfiguration; import org.apache.activemq.pool.PooledConnectionFactory; @@ -280,12 +282,19 @@ public class WebClient implements HttpSe if (factory == null) { String brokerURL = servletContext.getInitParameter(BROKER_URL_INIT_PARAM); - LOG.debug("Value of: " + BROKER_URL_INIT_PARAM + " is: " + brokerURL); if (brokerURL == null) { - throw new IllegalStateException("missing brokerURL (specified via " + BROKER_URL_INIT_PARAM + " init-Param"); + LOG.debug("Couldn't find " + BROKER_URL_INIT_PARAM + " param, trying to find a broker embedded in a local VM"); + BrokerService broker = BrokerRegistry.getInstance().findFirst(); + if (broker == null) { + throw new IllegalStateException("missing brokerURL (specified via " + BROKER_URL_INIT_PARAM + " init-Param) or embedded broker"); + } else { + brokerURL = "vm://" + broker.getBrokerName(); + } } + LOG.debug("Using broker URL: " + brokerURL); + ActiveMQConnectionFactory amqfactory = new ActiveMQConnectionFactory(brokerURL); // Set prefetch policy for factory Modified: activemq/trunk/assembly/src/main/descriptors/common-bin.xml URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/main/descriptors/common-bin.xml?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/assembly/src/main/descriptors/common-bin.xml (original) +++ activemq/trunk/assembly/src/main/descriptors/common-bin.xml Fri Mar 29 13:34:34 2013 @@ -67,6 +67,18 @@ **/webconsole-embedded.xml + + ../activemq-web-console/src/main/webapp/styles/ + /webapps-demo/demo/styles/ + + + ../activemq-web-console/src/main/webapp/images/ + /webapps-demo/demo/images/ + + + ../activemq-web-console/src/main/webapp/js/ + /webapps-demo/demo/js/ + Modified: activemq/trunk/pom.xml URL: http://svn.apache.org/viewvc/activemq/trunk/pom.xml?rev=1462479&r1=1462478&r2=1462479&view=diff ============================================================================== --- activemq/trunk/pom.xml (original) +++ activemq/trunk/pom.xml Fri Mar 29 13:34:34 2013 @@ -234,10 +234,10 @@ activemq-rar activemq-run activemq-spring - activemq-osgi - activemq-blueprint activemq-tooling activemq-web + activemq-osgi + activemq-blueprint activemq-web-demo activemq-web-console activemq-karaf-itest