Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 92049 invoked from network); 2 Feb 2011 23:44:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2011 23:44:57 -0000 Received: (qmail 2548 invoked by uid 500); 2 Feb 2011 23:44:57 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 2480 invoked by uid 500); 2 Feb 2011 23:44:57 -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 2471 invoked by uid 99); 2 Feb 2011 23:44:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 23:44:57 +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; Wed, 02 Feb 2011 23:44:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BB4FE23889E5; Wed, 2 Feb 2011 23:44:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066696 - in /activemq/activemq-apollo/trunk: ./ apollo-broker/src/main/resources/OSGI-INF/blueprint/ apollo-karaf-feature/src/main/resources/ apollo-web/ apollo-web/src/main/scala/org/apache/activemq/apollo/web/ apollo-web/src/main/scala/... Date: Wed, 02 Feb 2011 23:44:32 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110202234432.BB4FE23889E5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Wed Feb 2 23:44:32 2011 New Revision: 1066696 URL: http://svn.apache.org/viewvc?rev=1066696&view=rev Log: Making some progress on getting the admin web interface running on karaf. Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/resources/OSGI-INF/blueprint/broker.xml activemq/activemq-apollo/trunk/apollo-karaf-feature/src/main/resources/features.xml activemq/activemq-apollo/trunk/apollo-web/pom.xml activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml activemq/activemq-apollo/trunk/pom.xml Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/resources/OSGI-INF/blueprint/broker.xml URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/resources/OSGI-INF/blueprint/broker.xml?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-broker/src/main/resources/OSGI-INF/blueprint/broker.xml (original) +++ activemq/activemq-apollo/trunk/apollo-broker/src/main/resources/OSGI-INF/blueprint/broker.xml Wed Feb 2 23:44:32 2011 @@ -19,10 +19,11 @@ --> - + + Modified: activemq/activemq-apollo/trunk/apollo-karaf-feature/src/main/resources/features.xml URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-karaf-feature/src/main/resources/features.xml?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-karaf-feature/src/main/resources/features.xml (original) +++ activemq/activemq-apollo/trunk/apollo-karaf-feature/src/main/resources/features.xml Wed Feb 2 23:44:32 2011 @@ -47,6 +47,7 @@ + apollo mvn:org.apache.activemq/apollo-jdbm2/${pom.version} mvn:org.fusesource.jdbm/jdbm/${jdbm-version} @@ -59,14 +60,13 @@ apollo - mvn:org.apache.activemq/apollo-web/${pom.version}/slim - mvn:org.apache.activemq/apollo-web/${pom.version}/war/slim + mvn:org.apache.activemq/apollo-web/${pom.version}/war/osgi + mvn:org.fusesource.scalate/scalate-util/${scalate-version} mvn:org.fusesource.scalate/scalate-core/${scalate-version} mvn:org.codehaus.jackson/jackson-jaxrs/${jackson-version} - wrap:mvn:com.sun.jersey/jersey-core/${jersey-version} - wrap:mvn:com.sun.jersey/jersey-server/${jersey-version} - mvn:org.eclipse.jetty/jetty-all-server/${jetty-version} + mvn:com.sun.jersey/jersey-core/${jersey-version} + mvn:com.sun.jersey/jersey-server/${jersey-version} Modified: activemq/activemq-apollo/trunk/apollo-web/pom.xml URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/pom.xml?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-web/pom.xml (original) +++ activemq/activemq-apollo/trunk/apollo-web/pom.xml Wed Feb 2 23:44:32 2011 @@ -132,10 +132,10 @@ test - log4j - log4j - - ${log4j-version} + org.slf4j + slf4j-log4j12 + ${slf4j-version} + test @@ -311,9 +311,9 @@ org.apache.activemq:apollo-web WEB-INF/lib/** - **/*.scaml + Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala (original) +++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala Wed Feb 2 23:44:32 2011 @@ -16,16 +16,17 @@ */ package org.apache.activemq.apollo.web -import java.util.concurrent.atomic.AtomicBoolean import org.fusesource.scalate.TemplateEngine class Boot(engine: TemplateEngine) { - - private var initialised = new AtomicBoolean(false) - + + // Put some references to the jersey classes in our code so that the osgi + // metadata creates the proper imports. + val we_are_using = Array( + classOf[com.sun.jersey.spi.container.servlet.ServletContainer] + ) + def run: Unit = { - if (initialised.compareAndSet(false, true)) { - engine.packagePrefix = "org.apache.activemq.apollo.web.templates." - } + engine.packagePrefix = "org.apache.activemq.apollo.web.templates" } } \ No newline at end of file Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala (original) +++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala Wed Feb 2 23:44:32 2011 @@ -36,7 +36,7 @@ case class ConfigurationResource(parent: lazy val store = { val rc = ConfigStore() - if( rc.can_write ) { + if( rc !=null && rc.can_write ) { rc } else { None Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala (original) +++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala Wed Feb 2 23:44:32 2011 @@ -149,14 +149,17 @@ class ViewHelper { @Produces(Array("application/json", "application/xml","text/xml", "text/html;qs=5")) class BrokerResource extends Resource { - val cs = ConfigStore() - val config = cs.load(false) - @GET def get = { val rc = new BrokerSummaryDTO rc.manageable = BrokerRegistry.list.size > 0 - rc.configurable = cs.can_write + + val cs = ConfigStore() + if( cs!=null ) { + val config = cs.load(false) + rc.configurable = cs.can_write + } + rc } Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml (original) +++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml Wed Feb 2 23:44:32 2011 @@ -29,10 +29,6 @@ The Apollo web application - - org.apache.activemq.apollo.web.ApolloListener - - Jersey Filter com.sun.jersey.spi.container.servlet.ServletContainer @@ -49,12 +45,23 @@ true + com.sun.jersey.config.property.resourceConfigClass + com.sun.jersey.api.core.ClassNamesResourceConfig + + + com.sun.jersey.config.property.classnames + + org.apache.activemq.apollo.web.resources.BrokerResource, + org.apache.activemq.apollo.web.resources.JacksonJsonProvider + + + com.sun.jersey.config.feature.FilterForwardOn404 true Modified: activemq/activemq-apollo/trunk/pom.xml URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/pom.xml?rev=1066696&r1=1066695&r2=1066696&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/pom.xml (original) +++ activemq/activemq-apollo/trunk/pom.xml Wed Feb 2 23:44:32 2011 @@ -81,7 +81,7 @@ 1.3 0.8 - 1.6.0 + 1.5.11 2.1 2.1.6 @@ -109,7 +109,7 @@ 2.5 1.6.1 0.9.24 - 1.5-ea03 + 1.5 1.7 @@ -127,7 +127,7 @@ 4.2.0 2.1.2 2.1.0 - 2.3.1-SNAPSHOT + 2.3.5-SNAPSHOT