activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
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 GMT
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 @@
 -->
 <blueprint
   xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-  xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+  xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
   xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
 
-  <cm:property-placeholder persistent-id="org.apache.activemq.apollo" update-strategy="reload">
+  <cm:property-placeholder persistent-id="org.apache.activemq.apollo">
+  <!-- <cm:property-placeholder persistent-id="org.apache.activemq.apollo" update-strategy="reload">
-->
     <cm:default-properties>
       <cm:property name="apollo.base" value="."/>
     </cm:default-properties>

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 @@
   
   <!-- optional features -->
   <feature name='apollo-jdbm' version='${pom.version}'>
+    <feature version='${pom.version}'>apollo</feature>
     <bundle>mvn:org.apache.activemq/apollo-jdbm2/${pom.version}</bundle>
     <bundle>mvn:org.fusesource.jdbm/jdbm/${jdbm-version}</bundle>
   </feature>
@@ -59,14 +60,13 @@
 
   <feature name='apollo-web' version='${pom.version}'>
     <feature version='${pom.version}'>apollo</feature>
-    <bundle>mvn:org.apache.activemq/apollo-web/${pom.version}/slim</bundle>
-    <bundle>mvn:org.apache.activemq/apollo-web/${pom.version}/war/slim</bundle>
+    <bundle>mvn:org.apache.activemq/apollo-web/${pom.version}/war/osgi</bundle>
     
+    <bundle>mvn:org.fusesource.scalate/scalate-util/${scalate-version}</bundle>
     <bundle>mvn:org.fusesource.scalate/scalate-core/${scalate-version}</bundle>
     <bundle>mvn:org.codehaus.jackson/jackson-jaxrs/${jackson-version}</bundle>
-    <bundle>wrap:mvn:com.sun.jersey/jersey-core/${jersey-version}</bundle>
-    <bundle>wrap:mvn:com.sun.jersey/jersey-server/${jersey-version}</bundle>
-    <bundle>mvn:org.eclipse.jetty/jetty-all-server/${jetty-version}</bundle>
+    <bundle>mvn:com.sun.jersey/jersey-core/${jersey-version}</bundle>
+    <bundle>mvn:com.sun.jersey/jersey-server/${jersey-version}</bundle>
   </feature>
     
 </features>

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 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <!--<scope>test</scope>-->
-      <version>${log4j-version}</version>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>${slf4j-version}</version>
+      <scope>test</scope>
     </dependency>
     
   </dependencies>
@@ -311,9 +311,9 @@
                   <artifact>org.apache.activemq:apollo-web</artifact>
                   <excludes>
                     <exclude>WEB-INF/lib/**</exclude>
-                    <exclude>**/*.scaml</exclude>
+                    <!-- <exclude>**/*.scaml</exclude>
                     <exclude>**/*.jade</exclude>
-                    <exclude>**/*.ssp</exclude>
+                    <exclude>**/*.ssp</exclude> -->
                   </excludes>
                 </filter>
               </filters>

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
   </description>
 
-  <listener>
-    <listener-class>org.apache.activemq.apollo.web.ApolloListener</listener-class>
-  </listener>
-
   <filter>
     <filter-name>Jersey Filter</filter-name>
     <filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
@@ -49,12 +45,23 @@
       <param-value>true</param-value>
     </init-param>
     <init-param>
+      <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
+      <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value>
+    </init-param>
+    <init-param>
+      <param-name>com.sun.jersey.config.property.classnames</param-name>
+      <param-value>
+        org.apache.activemq.apollo.web.resources.BrokerResource,
+        org.apache.activemq.apollo.web.resources.JacksonJsonProvider
+      </param-value>
+    </init-param>
+    <!-- <init-param>
       <param-name>com.sun.jersey.config.property.packages</param-name>
       <param-value>
         org.fusesource.scalate.console;
         org.apache.activemq.apollo.web.resources
       </param-value>
-    </init-param>
+    </init-param> -->
     <init-param>
       <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
       <param-value>true</param-value>

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 @@
     <regexp-version>1.3</regexp-version>
     <rome-version>0.8</rome-version>
 
-    <slf4j-version>1.6.0</slf4j-version>
+    <slf4j-version>1.5.11</slf4j-version>
 
     <jaxb-api-version>2.1</jaxb-api-version>
     <jaxb-version>2.1.6</jaxb-version>
@@ -109,7 +109,7 @@
     <servlet-api-version>2.5</servlet-api-version>
     <jackson-version>1.6.1</jackson-version>
     <logback-version>0.9.24</logback-version>
-    <jersey-version>1.5-ea03</jersey-version>
+    <jersey-version>1.5</jersey-version>
     <snakeyaml-version>1.7</snakeyaml-version>
       
     <!-- maven plugin versions -->
@@ -127,7 +127,7 @@
     <osgi-version>4.2.0</osgi-version>
     <karaf-version>2.1.2</karaf-version>
     <features-maven-plugin-version>2.1.0</features-maven-plugin-version>
-    <bundle-plugin-version>2.3.1-SNAPSHOT</bundle-plugin-version>
+    <bundle-plugin-version>2.3.5-SNAPSHOT</bundle-plugin-version>
   </properties>
 
   <prerequisites>



Mime
View raw message