You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/10/25 12:59:19 UTC

svn commit: r467601 [1/6] - in /incubator/servicemix/trunk/servicemix-web-console: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/servicemix/ src/main/java/org/apache/servicemix/web/ src/main/java...

Author: gnodet
Date: Wed Oct 25 03:59:16 2006
New Revision: 467601

URL: http://svn.apache.org/viewvc?view=rev&rev=467601
Log:
First draft of ServiceMix console 

Added:
    incubator/servicemix/trunk/servicemix-web-console/   (with props)
    incubator/servicemix/trunk/servicemix-web-console/pom.xml
    incubator/servicemix/trunk/servicemix-web-console/src/
    incubator/servicemix/trunk/servicemix-web-console/src/main/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ComponentFactoryBean.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/EndpointFactoryBean.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceAssemblyFactoryBean.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceUnitFactoryBean.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/SharedLibraryFactoryBean.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ComponentLifeCycle.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/DeployServiceAssembly.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/FileUploadBean.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallComponent.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallSharedLibrary.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ServiceAssemblyLifeCycle.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/ApplicationContextFilter.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/Factory.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/handler/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/handler/BindingBeanNameUrlHandlerMapping.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Component.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Endpoint.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ProxyManager.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Registry.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceAssembly.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceUnit.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/SharedLibrary.java
    incubator/servicemix/trunk/servicemix-web-console/src/main/resources/
    incubator/servicemix/trunk/servicemix-web-console/src/main/resources/log4j.xml
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/META-INF/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/META-INF/LICENSE.txt
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/META-INF/NOTICE.txt
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/applicationContext.xml
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/decorators.xml
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/dispatcher-servlet.xml
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/jspf/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/jspf/headertags.jspf
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/tags/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/tags/sitemesh-decorator.tld
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/tags/sitemesh-page.tld
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/WEB-INF/web.xml
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/component.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/components.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/decorators/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/decorators/main.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/decorators/panel.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/decorators/printable.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/endpoint.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/endpoints.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/error.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/Thumbs.db   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/bg.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/bg02-blue-left.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/bg02-blue-right.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/bg02-left.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/bg02-right.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/bg02-white-left.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/bg02-white-right.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/comp-type-bc.gif   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/comp-type-pojo.gif   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/comp-type-se.gif   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/menu.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/menuleft.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/menuright.png   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/images/servicemix.jpg   (with props)
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/index.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/common.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/css.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/mochi/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/mochi/MochiKit.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/mochi/__package__.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/Base.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/Canvas.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/Layout.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/SVG.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/SweetCanvas.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/SweetSVG.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/dummy.svg
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/plotkit/iecanvas.htc
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/js/standardista-table-sorting.js
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/service-assemblies.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/service-assembly.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/service-unit.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/service-units.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/shared-libraries.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/shared-library.jsp
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/styles/
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/styles/sorttable.css
    incubator/servicemix/trunk/servicemix-web-console/src/main/webapp/styles/style.css

Propchange: incubator/servicemix/trunk/servicemix-web-console/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 25 03:59:16 2006
@@ -0,0 +1,3 @@
+.classpath
+.project
+target

Added: incubator/servicemix/trunk/servicemix-web-console/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/pom.xml?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/pom.xml (added)
+++ incubator/servicemix/trunk/servicemix-web-console/pom.xml Wed Oct 25 03:59:16 2006
@@ -0,0 +1,115 @@
+<?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
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.servicemix</groupId>
+    <artifactId>servicemix</artifactId>
+    <version>3.1-incubating-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>servicemix-web-console</artifactId>
+  <packaging>war</packaging>
+  <name>ServiceMix :: Web Console</name>
+  <properties>
+    <jetty.port>8080</jetty.port>
+  </properties>
+  <dependencies>
+  
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-core</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>servlet-api-2.5</artifactId>
+      <version>${jetty-version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- web container -->
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- SiteMesh for layout -->
+    <dependency>
+      <groupId>opensymphony</groupId>
+      <artifactId>sitemesh</artifactId>
+      <version>2.2.1</version>
+    </dependency>
+
+    <!-- JSTL support -->
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>jstl</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>taglibs</groupId>
+      <artifactId>standard</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+    
+    <!-- File upload -->
+    <dependency>
+      <groupId>commons-fileupload</groupId>
+      <artifactId>commons-fileupload</artifactId>
+      <version>1.1.1</version>
+    </dependency>
+
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <configuration>
+          <connectors>
+            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+              <port>${jetty.port}</port>
+              <maxIdleTime>60000</maxIdleTime>
+            </connector>
+          </connectors>
+          <systemProperties>
+            <!-- enable easy connection to JConsole -->
+            <systemProperty>
+              <name>com.sun.management.jmxremote</name>
+              <value></value>
+            </systemProperty>
+          </systemProperties>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ComponentFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ComponentFactoryBean.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ComponentFactoryBean.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ComponentFactoryBean.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web;
+
+import org.apache.servicemix.web.filter.Factory;
+import org.apache.servicemix.web.model.Registry;
+import org.springframework.beans.factory.FactoryBean;
+
+public class ComponentFactoryBean implements FactoryBean {
+
+    private Registry registry;
+    
+    public Object getObject() throws Exception {
+        return new Factory() {
+            private String name;
+            @SuppressWarnings("unused")
+            public void setName(String name) {
+                this.name = name;
+            }
+            public Object getBean() {
+                return registry.getComponent(name);
+            }
+        };
+    }
+
+    public Class getObjectType() {
+        return Factory.class;
+    }
+
+    public boolean isSingleton() {
+        return false;
+    }
+
+    public Registry getRegistry() {
+        return registry;
+    }
+
+    public void setRegistry(Registry registry) {
+        this.registry = registry;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/EndpointFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/EndpointFactoryBean.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/EndpointFactoryBean.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/EndpointFactoryBean.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web;
+
+import org.apache.servicemix.web.filter.Factory;
+import org.apache.servicemix.web.model.Registry;
+import org.springframework.beans.factory.FactoryBean;
+
+public class EndpointFactoryBean implements FactoryBean {
+
+    private Registry registry;
+    
+    public Object getObject() throws Exception {
+        return new Factory() {
+            private String name;
+            @SuppressWarnings("unused")
+            public void setName(String name) {
+                this.name = name;
+            }
+            public Object getBean() {
+                return registry.getEndpoint(name);
+            }
+        };
+    }
+
+    public Class getObjectType() {
+        return Factory.class;
+    }
+
+    public boolean isSingleton() {
+        return false;
+    }
+
+    public Registry getRegistry() {
+        return registry;
+    }
+
+    public void setRegistry(Registry registry) {
+        this.registry = registry;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceAssemblyFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceAssemblyFactoryBean.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceAssemblyFactoryBean.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceAssemblyFactoryBean.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web;
+
+import org.apache.servicemix.web.filter.Factory;
+import org.apache.servicemix.web.model.Registry;
+import org.springframework.beans.factory.FactoryBean;
+
+public class ServiceAssemblyFactoryBean implements FactoryBean {
+
+    private Registry registry;
+    
+    public Object getObject() throws Exception {
+        return new Factory() {
+            private String name;
+            @SuppressWarnings("unused")
+            public void setName(String name) {
+                this.name = name;
+            }
+            public Object getBean() {
+                return registry.getServiceAssembly(name);
+            }
+        };
+    }
+
+    public Class getObjectType() {
+        return Factory.class;
+    }
+
+    public boolean isSingleton() {
+        return false;
+    }
+
+    public Registry getRegistry() {
+        return registry;
+    }
+
+    public void setRegistry(Registry registry) {
+        this.registry = registry;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceUnitFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceUnitFactoryBean.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceUnitFactoryBean.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/ServiceUnitFactoryBean.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web;
+
+import org.apache.servicemix.web.filter.Factory;
+import org.apache.servicemix.web.model.Registry;
+import org.springframework.beans.factory.FactoryBean;
+
+public class ServiceUnitFactoryBean implements FactoryBean {
+
+    private Registry registry;
+    
+    public Object getObject() throws Exception {
+        return new Factory() {
+            private String name;
+            @SuppressWarnings("unused")
+            public void setName(String name) {
+                this.name = name;
+            }
+            public Object getBean() {
+                return registry.getServiceUnit(name);
+            }
+        };
+    }
+
+    public Class getObjectType() {
+        return Factory.class;
+    }
+
+    public boolean isSingleton() {
+        return false;
+    }
+
+    public Registry getRegistry() {
+        return registry;
+    }
+
+    public void setRegistry(Registry registry) {
+        this.registry = registry;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/SharedLibraryFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/SharedLibraryFactoryBean.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/SharedLibraryFactoryBean.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/SharedLibraryFactoryBean.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web;
+
+import org.apache.servicemix.web.filter.Factory;
+import org.apache.servicemix.web.model.Registry;
+import org.springframework.beans.factory.FactoryBean;
+
+public class SharedLibraryFactoryBean implements FactoryBean {
+
+    private Registry registry;
+    
+    public Object getObject() throws Exception {
+        return new Factory() {
+            private String name;
+            @SuppressWarnings("unused")
+            public void setName(String name) {
+                this.name = name;
+            }
+            public Object getBean() {
+                return registry.getSharedLibrary(name);
+            }
+        };
+    }
+
+    public Class getObjectType() {
+        return Factory.class;
+    }
+
+    public boolean isSingleton() {
+        return false;
+    }
+
+    public Registry getRegistry() {
+        return registry;
+    }
+
+    public void setRegistry(Registry registry) {
+        this.registry = registry;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ComponentLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ComponentLifeCycle.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ComponentLifeCycle.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ComponentLifeCycle.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,68 @@
+package org.apache.servicemix.web.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+public class ComponentLifeCycle implements Controller {
+
+    public static final String START = "start";
+    public static final String STOP = "stop";
+    public static final String SHUTDOWN = "shutdown";
+    public static final String UNINSTALL = "uninstall";
+    
+    private AdminCommandsServiceMBean adminCommandsService;
+    private String name;
+    private String view;
+    private String action;
+    
+    public ComponentLifeCycle(AdminCommandsServiceMBean adminCommandsService, String action) {
+        if (adminCommandsService == null) {
+            throw new IllegalArgumentException("adminCommandsServiceMBean is null");
+        }
+        if (action == null) {
+            throw new IllegalArgumentException("action is null");
+        } else if (!START.equals(action) && 
+                   !STOP.equals(action) && 
+                   !SHUTDOWN.equals(action) &&
+                   !UNINSTALL.equals(action)) {
+            throw new IllegalArgumentException("action must be start, stop or shutdown");
+        }
+        
+        this.adminCommandsService = adminCommandsService;
+        this.action = action;
+    }
+    
+    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        if ("start".equals(action)) {
+            adminCommandsService.startComponent(name);
+        } else if ("stop".equals(action)) {
+            adminCommandsService.stopComponent(name);
+        } else if ("shutdown".equals(action)) {
+            adminCommandsService.shutdownComponent(name);
+        } else if ("uninstall".equals(action)) {
+            adminCommandsService.uninstallComponent(name);
+        }
+        return new ModelAndView(getView());
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getView() {
+        return view;
+    }
+
+    public void setView(String view) {
+        this.view = view;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/DeployServiceAssembly.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/DeployServiceAssembly.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/DeployServiceAssembly.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/DeployServiceAssembly.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.controller;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
+import org.apache.servicemix.jbi.util.FileUtil;
+import org.springframework.validation.BindException;
+import org.springframework.web.bind.ServletRequestDataBinder;
+import org.springframework.web.multipart.support.ByteArrayMultipartFileEditor;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.SimpleFormController;
+
+public class DeployServiceAssembly extends SimpleFormController {
+
+    private final AdminCommandsServiceMBean adminCommandsService;
+    
+    public DeployServiceAssembly(AdminCommandsServiceMBean adminCommandsService) {
+        this.adminCommandsService = adminCommandsService;
+    }
+    
+    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command,
+                    BindException errors) throws Exception {
+        // cast the bean
+        FileUploadBean bean = (FileUploadBean) command;
+        // let's see if there's content there
+        byte[] file = bean.getFile();
+        if (file == null) {
+            // hmm, that's strange, the user did not upload anything
+        }
+        File f = File.createTempFile("smx-sa", ".zip");
+        try {
+            FileUtil.copyInputStream(new ByteArrayInputStream(file), new FileOutputStream(f));
+            String result = adminCommandsService.deployServiceAssembly(f.toURL().toString(), false);
+            System.err.println(result);
+        } finally {
+            f.delete();
+        }
+        // well, let's do nothing with the bean for now and return
+        return super.onSubmit(request, response, command, errors);
+    }
+
+    protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws ServletException {
+        // to actually be able to convert Multipart instance to byte[]
+        // we have to register a custom editor
+        binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor());
+        // now Spring knows how to handle multipart object and convert them
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/FileUploadBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/FileUploadBean.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/FileUploadBean.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/FileUploadBean.java Wed Oct 25 03:59:16 2006
@@ -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.
+ */
+package org.apache.servicemix.web.controller;
+
+public class FileUploadBean {
+
+    private byte[] file;
+
+    public void setFile(byte[] file) {
+        this.file = file;
+    }
+
+    public byte[] getFile() {
+        return file;
+    }
+    
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallComponent.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallComponent.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallComponent.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.controller;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
+import org.apache.servicemix.jbi.util.FileUtil;
+import org.springframework.web.bind.ServletRequestDataBinder;
+import org.springframework.web.multipart.support.ByteArrayMultipartFileEditor;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.SimpleFormController;
+
+public class InstallComponent extends SimpleFormController {
+
+    private final AdminCommandsServiceMBean adminCommandsService;
+    
+    public InstallComponent(AdminCommandsServiceMBean adminCommandsService) {
+        this.adminCommandsService = adminCommandsService;
+    }
+    
+    protected ModelAndView onSubmit(Object command) throws Exception {
+        // cast the bean
+        FileUploadBean bean = (FileUploadBean) command;
+        // let's see if there's content there
+        byte[] file = bean.getFile();
+        if (file == null) {
+            // hmm, that's strange, the user did not upload anything
+        }
+        File f = File.createTempFile("smx-comp", ".zip");
+        try {
+            FileUtil.copyInputStream(new ByteArrayInputStream(file), new FileOutputStream(f));
+            String result = adminCommandsService.installComponent(f.toURL().toString(), false);
+            System.err.println(result);
+        } finally {
+            f.delete();
+        }
+        return new ModelAndView("redirect:components.jsp");
+    }
+    
+    protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws ServletException {
+        // to actually be able to convert Multipart instance to byte[]
+        // we have to register a custom editor
+        binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor());
+        // now Spring knows how to handle multipart object and convert them
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallSharedLibrary.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallSharedLibrary.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallSharedLibrary.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/InstallSharedLibrary.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.controller;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
+import org.apache.servicemix.jbi.util.FileUtil;
+import org.springframework.validation.BindException;
+import org.springframework.web.bind.ServletRequestDataBinder;
+import org.springframework.web.multipart.support.ByteArrayMultipartFileEditor;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.SimpleFormController;
+
+public class InstallSharedLibrary extends SimpleFormController {
+
+    private final AdminCommandsServiceMBean adminCommandsService;
+    
+    public InstallSharedLibrary(AdminCommandsServiceMBean adminCommandsService) {
+        this.adminCommandsService = adminCommandsService;
+    }
+    
+    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command,
+                    BindException errors) throws Exception {
+        // cast the bean
+        FileUploadBean bean = (FileUploadBean) command;
+        // let's see if there's content there
+        byte[] file = bean.getFile();
+        if (file == null) {
+            // hmm, that's strange, the user did not upload anything
+        }
+        File f = File.createTempFile("smx-sl", ".zip");
+        try {
+            FileUtil.copyInputStream(new ByteArrayInputStream(file), new FileOutputStream(f));
+            String result = adminCommandsService.installSharedLibrary(f.toURL().toString(), false);
+            System.err.println(result);
+        } finally {
+            f.delete();
+        }
+        // well, let's do nothing with the bean for now and return
+        return super.onSubmit(request, response, command, errors);
+    }
+
+    protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws ServletException {
+        // to actually be able to convert Multipart instance to byte[]
+        // we have to register a custom editor
+        binder.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor());
+        // now Spring knows how to handle multipart object and convert them
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ServiceAssemblyLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ServiceAssemblyLifeCycle.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ServiceAssemblyLifeCycle.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/controller/ServiceAssemblyLifeCycle.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,68 @@
+package org.apache.servicemix.web.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+public class ServiceAssemblyLifeCycle implements Controller {
+
+    public static final String START = "start";
+    public static final String STOP = "stop";
+    public static final String SHUTDOWN = "shutdown";
+    public static final String UNINSTALL = "uninstall";
+    
+    private AdminCommandsServiceMBean adminCommandsService;
+    private String name;
+    private String view;
+    private String action;
+    
+    public ServiceAssemblyLifeCycle(AdminCommandsServiceMBean adminCommandsService, String action) {
+        if (adminCommandsService == null) {
+            throw new IllegalArgumentException("adminCommandsServiceMBean is null");
+        }
+        if (action == null) {
+            throw new IllegalArgumentException("action is null");
+        } else if (!START.equals(action) && 
+                   !STOP.equals(action) && 
+                   !SHUTDOWN.equals(action) &&
+                   !UNINSTALL.equals(action)) {
+            throw new IllegalArgumentException("action must be start, stop or shutdown");
+        }
+        
+        this.adminCommandsService = adminCommandsService;
+        this.action = action;
+    }
+    
+    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        if ("start".equals(action)) {
+            adminCommandsService.startServiceAssembly(name);
+        } else if ("stop".equals(action)) {
+            adminCommandsService.stopServiceAssembly(name);
+        } else if ("shutdown".equals(action)) {
+            adminCommandsService.shutdownServiceAssembly(name);
+        } else if ("uninstall".equals(action)) {
+            adminCommandsService.undeployServiceAssembly(name);
+        }
+        return new ModelAndView(getView());
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getView() {
+        return view;
+    }
+
+    public void setView(String view) {
+        this.view = view;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/ApplicationContextFilter.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/ApplicationContextFilter.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/ApplicationContextFilter.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/ApplicationContextFilter.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.filter;
+
+import org.springframework.web.bind.ServletRequestDataBinder;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import java.io.IOException;
+import java.util.AbstractMap;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Exposes Spring ApplicationContexts to JSP EL and other view technologies.
+ * Currently a variable is placed in application scope (by default called
+ * 'applicationContext') so that POJOs can be pulled out of Spring in a JSP page
+ * to render things using EL expressions. <br/>
+ * 
+ * e.g. ${applicationContext.cheese} would access the cheese POJO. Or
+ * ${applicationContext.cheese.name} would access the name property of the
+ * cheese POJO. <br/>
+ * 
+ * You can then use JSTL to work with these POJOs such as &lt;c.set var="myfoo"
+ * value="${applicationContext.foo}"/&gt; <br/>
+ * 
+ * In addition to applicationContext a 'requestContext' variable is created
+ * which will automatically bind any request parameters to the POJOs extracted
+ * from the applicationContext - which is ideal for POJOs which implement
+ * queries in view technologies.
+ * 
+ * @version $Revision: 426366 $
+ */
+public class ApplicationContextFilter implements Filter {
+
+    private ServletContext servletContext;
+    private String applicationContextName = "applicationContext";
+    private String requestContextName = "requestContext";
+    private String requestName = "request";
+
+    public void init(FilterConfig config) throws ServletException {
+        this.servletContext = config.getServletContext();
+        this.applicationContextName = getInitParameter(config, "applicationContextName", applicationContextName);
+        this.requestContextName = getInitParameter(config, "requestContextName", requestContextName);
+        this.requestName = getInitParameter(config, "requestName", requestName);
+
+        // register the application context in the applicationScope
+        WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
+        Map wrapper = createApplicationContextWrapper(context);
+        servletContext.setAttribute(applicationContextName, wrapper);
+    }
+
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+        // lets register a requestContext in the requestScope
+        Map requestContextWrapper = createRequestContextWrapper(request);
+        request.setAttribute(requestContextName, requestContextWrapper);
+        request.setAttribute(requestName, request);
+        chain.doFilter(request, response);
+    }
+
+    public void destroy() {
+    }
+
+    public ServletContext getServletContext() {
+        return servletContext;
+    }
+
+    public String getApplicationContextName() {
+        return applicationContextName;
+    }
+
+    public void setApplicationContextName(String variableName) {
+        this.applicationContextName = variableName;
+    }
+
+    public String getRequestContextName() {
+        return requestContextName;
+    }
+
+    public void setRequestContextName(String requestContextName) {
+        this.requestContextName = requestContextName;
+    }
+
+    protected String getInitParameter(FilterConfig config, String key, String defaultValue) {
+        String parameter = config.getInitParameter(key);
+        return (parameter != null) ? parameter : defaultValue;
+    }
+
+    /**
+     * Creates a wrapper around the web application context so that it can be
+     * accessed easily from inside JSP EL (or other expression languages in
+     * other view technologies).
+     */
+    protected Map createApplicationContextWrapper(final WebApplicationContext context) {
+        Map wrapper = new AbstractMap() {
+
+            public WebApplicationContext getContext() {
+                return context;
+            }
+
+            public Object get(Object key) {
+                if (key == null) {
+                    return null;
+                }
+                return context.getBean(key.toString());
+            }
+
+            public Set entrySet() {
+                return Collections.EMPTY_SET;
+            }
+
+        };
+        return wrapper;
+    }
+
+    /**
+     * Creates a wrapper around the request context (e.g. to allow POJOs to be
+     * auto-injected from request parameter values etc) so that it can be
+     * accessed easily from inside JSP EL (or other expression languages in
+     * other view technologies).
+     */
+    protected Map createRequestContextWrapper(final ServletRequest request) {
+        final WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
+        Map wrapper = new AbstractMap() {
+
+            public WebApplicationContext getContext() {
+                return context;
+            }
+
+            public Object get(Object key) {
+                if (key == null) {
+                    return null;
+                }
+                return bindRequestBean(context.getBean(key.toString()), request);
+            }
+
+            public Set entrySet() {
+                return Collections.EMPTY_SET;
+            }
+
+        };
+        return wrapper;
+
+    }
+
+    /**
+     * Binds properties from the request parameters to the given POJO which is
+     * useful for POJOs which are configurable via request parameters such as
+     * for query/view POJOs
+     */
+    protected Object bindRequestBean(Object bean, ServletRequest request) {
+        ServletRequestDataBinder binder = new ServletRequestDataBinder(bean);
+        binder.bind(request);
+        if (bean instanceof Factory) {
+            bean = ((Factory) bean).getBean();
+        }
+        return bean;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/Factory.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/Factory.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/Factory.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/filter/Factory.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.filter;
+
+public interface Factory {
+
+    public Object getBean();
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/handler/BindingBeanNameUrlHandlerMapping.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/handler/BindingBeanNameUrlHandlerMapping.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/handler/BindingBeanNameUrlHandlerMapping.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/handler/BindingBeanNameUrlHandlerMapping.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.handler;
+
+import org.springframework.web.bind.ServletRequestDataBinder;
+import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * 
+ * @version $Revision: 426366 $
+ */
+public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping {
+
+    protected Object getHandlerInternal(HttpServletRequest request) throws Exception {
+        Object object = super.getHandlerInternal(request);
+
+        if (object instanceof String) {
+            String handlerName = (String) object;
+            object = getApplicationContext().getBean(handlerName);
+        }
+
+        ServletRequestDataBinder binder = new ServletRequestDataBinder(object, null);
+        binder.bind(request);
+        return object;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Component.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Component.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Component.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Component.java Wed Oct 25 03:59:16 2006
@@ -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 org.apache.servicemix.web.model;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.apache.servicemix.jbi.framework.ComponentMBean;
+
+public class Component {
+    
+    private final Registry registry;
+    private final ComponentMBean mbean;
+    private final ObjectName objectName;
+
+    public Component(Registry registry, ComponentMBean mbean, ObjectName objectName) {
+        this.registry = registry;
+        this.mbean = mbean;
+        this.objectName = objectName;
+    }
+
+    public ObjectName getObjectName() {
+        return objectName;
+    }
+
+    public String getName() {
+        return mbean.getName();
+    }
+
+    public String getType() {
+        return mbean.getComponentType();
+    }
+    
+    public String getStatus() throws Exception {
+        return mbean.getCurrentState();
+    }
+    
+    public List<ServiceUnit> getServiceUnits() throws Exception {
+        return registry.getServiceUnits(this);
+    }
+    
+    public List<Endpoint> getEndpoints() throws Exception {
+        return registry.getEndpoints(this);
+    }
+    
+    public boolean equals(Object o) {
+        if (o instanceof Component) {
+            return ((Component) o).objectName.equals(objectName);
+        } else {
+            return false;
+        }
+    }
+    
+    public int hashCode() {
+        return objectName.hashCode();
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Endpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Endpoint.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Endpoint.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Endpoint.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.model;
+
+import javax.management.ObjectName;
+
+import org.apache.servicemix.jbi.framework.EndpointMBean;
+
+public class Endpoint {
+
+    private Registry registry;
+    
+    private EndpointMBean mbean;
+
+    private ObjectName objectName;
+
+    public Endpoint(Registry registry, EndpointMBean mbean, ObjectName objectName) {
+        this.registry = registry;
+        this.mbean = mbean;
+        this.objectName = objectName;
+    }
+
+    public String getName() {
+        return mbean.getServiceName() + ":" + mbean.getEndpointName();
+    }
+
+    public ObjectName getObjectName() {
+        return objectName;
+    }
+
+    public String getType() throws Exception {
+        return objectName.getKeyProperty("SubType");
+    }
+
+    public Component getComponent() throws Exception {
+        return registry.getComponent(mbean.getComponentName());
+    }
+
+    public boolean equals(Object o) {
+        if (o instanceof Endpoint) {
+            return ((Endpoint) o).objectName.equals(objectName);
+        } else {
+            return false;
+        }
+    }
+    
+    public int hashCode() {
+        return objectName.hashCode();
+    }
+
+}
\ No newline at end of file

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ProxyManager.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ProxyManager.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ProxyManager.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ProxyManager.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.model;
+
+import java.lang.ref.Reference;
+import java.lang.ref.SoftReference;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import org.springframework.jmx.access.MBeanProxyFactoryBean;
+
+public class ProxyManager {
+
+    private final MBeanServerConnection server;
+    private final Map<ObjectName, Reference<Object>> proxies = new ConcurrentHashMap<ObjectName, Reference<Object>>();
+
+    public ProxyManager(MBeanServerConnection server) {
+        this.server = server;
+    }
+
+    @SuppressWarnings("unchecked")
+    public<T> T getProxy(ObjectName name, Class<T> type) {
+        Reference r = proxies.get(name);
+        T proxy = (r != null) ? (T) r.get() : null;
+        if (proxy == null) {
+            MBeanProxyFactoryBean factory = new MBeanProxyFactoryBean();
+            factory.setServer(server);
+            try {
+                factory.setObjectName(name.toString());
+            } catch (MalformedObjectNameException e) {
+                throw new IllegalStateException(e);
+            }
+            factory.setProxyInterface(type);
+            factory.setUseStrictCasing(false);
+            factory.afterPropertiesSet();
+            proxy = (T) factory.getObject();
+            proxies.put(name, new SoftReference<Object>(proxy));
+        }
+        return proxy;
+    }
+    
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Registry.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Registry.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Registry.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/Registry.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.apache.servicemix.jbi.framework.ComponentMBean;
+import org.apache.servicemix.jbi.framework.EndpointMBean;
+import org.apache.servicemix.jbi.framework.RegistryMBean;
+import org.apache.servicemix.jbi.framework.ServiceAssemblyMBean;
+import org.apache.servicemix.jbi.framework.ServiceUnitMBean;
+import org.apache.servicemix.jbi.framework.SharedLibraryMBean;
+
+public class Registry {
+
+    private final RegistryMBean mbean;
+    private final ProxyManager proxyManager;
+    
+    public Registry(RegistryMBean mbean, ProxyManager proxyManager) {
+        this.mbean = mbean;
+        this.proxyManager = proxyManager;
+    }
+
+    public List<Component> getComponents() {
+        List<Component> components = new ArrayList<Component>();
+        ObjectName[] names = mbean.getComponentNames();
+        for (int i = 0; i < names.length; i++) {
+            ComponentMBean mbean = proxyManager.getProxy(names[i], ComponentMBean.class);
+            if (!"#SubscriptionManager#".equals(mbean.getName())) {
+                components.add(new Component(this, mbean, names[i]));
+            }
+        }
+        return components;
+    }
+    
+    public Component getComponent(String name) {
+        for (Component component : getComponents()) {
+            if (component.getName().equals(name)) {
+                return component;
+            }
+        }
+        return null;
+    }
+    
+    public List<Component> getComponent(SharedLibrary library) {
+        List<Component> components = new ArrayList<Component>();
+        for (Component component : getComponents()) {
+            // TODO
+        }
+        return null;
+    }
+
+    public List<Endpoint> getEndpoints() {
+        List<Endpoint> endpoints = new ArrayList<Endpoint>();
+        ObjectName[] names = mbean.getEndpointNames();
+        for (int i = 0; i < names.length; i++) {
+            EndpointMBean mbean = proxyManager.getProxy(names[i], EndpointMBean.class);
+            endpoints.add(new Endpoint(this, mbean, names[i]));
+        }
+        return endpoints;
+    }
+
+    public Endpoint getEndpoint(String name) {
+        for (Endpoint endpoint : getEndpoints()) {
+            if (endpoint.getName().equals(name)) {
+                return endpoint;
+            }
+        }
+        return null;
+    }
+
+    public List<Endpoint> getEndpoints(Component component) throws Exception {
+        List<Endpoint> endpoints = new ArrayList<Endpoint>();
+        for (Endpoint endpoint : getEndpoints()) {
+            if (endpoint.getComponent().equals(component)) {
+                endpoints.add(endpoint);
+            }
+        }
+        return endpoints;
+    }
+
+    public List<ServiceUnit> getServiceUnits() {
+        List<ServiceUnit> serviceUnits = new ArrayList<ServiceUnit>();
+        ObjectName[] names = mbean.getServiceUnitNames();
+        for (int i = 0; i < names.length; i++) {
+            ServiceUnitMBean mbean = proxyManager.getProxy(names[i], ServiceUnitMBean.class);
+            serviceUnits.add(new ServiceUnit(this, mbean, names[i]));
+        }
+        return serviceUnits;
+    }
+    
+    public ServiceUnit getServiceUnit(String name) {
+        for (ServiceUnit serviceUnit : getServiceUnits()) {
+            if (serviceUnit.getName().equals(name)) {
+                return serviceUnit;
+            }
+        }
+        return null;
+    }
+    
+    public List<ServiceUnit> getServiceUnits(Component component) {
+        List<ServiceUnit> serviceUnits = new ArrayList<ServiceUnit>();
+        for (ServiceUnit serviceUnit : getServiceUnits()) {
+            if (serviceUnit.getComponent().equals(component)) {
+                serviceUnits.add(serviceUnit);
+            }
+        }
+        return serviceUnits;
+    }
+
+    public List<ServiceUnit> getServiceUnits(ServiceAssembly assembly) {
+        List<ServiceUnit> serviceUnits = new ArrayList<ServiceUnit>();
+        for (ServiceUnit serviceUnit : getServiceUnits()) {
+            if (serviceUnit.getServiceAssembly().equals(assembly)) {
+                serviceUnits.add(serviceUnit);
+            }
+        }
+        return serviceUnits;
+    }
+    
+    
+    public List<ServiceAssembly> getServiceAssemblies() {
+        List<ServiceAssembly> serviceAssemblies = new ArrayList<ServiceAssembly>();
+        ObjectName[] names = mbean.getServiceAssemblyNames();
+        for (int i = 0; i < names.length; i++) {
+            ServiceAssemblyMBean mbean = proxyManager.getProxy(names[i], ServiceAssemblyMBean.class);
+            serviceAssemblies.add(new ServiceAssembly(this, mbean, names[i]));
+        }
+        return serviceAssemblies;
+    }
+
+    public ServiceAssembly getServiceAssembly(String name) {
+        List<ServiceAssembly> serviceAssemblies = getServiceAssemblies();
+        for (ServiceAssembly serviceAssembly : serviceAssemblies) {
+            if (serviceAssembly.getName().equals(name)) {
+                return serviceAssembly;
+            }
+        }
+        return null;
+    }
+    
+    public List<SharedLibrary> getSharedLibraries() {
+        List<SharedLibrary> sharedLibraries = new ArrayList<SharedLibrary>();
+        ObjectName[] names = mbean.getSharedLibraryNames();
+        for (int i = 0; i < names.length; i++) {
+            SharedLibraryMBean mbean = proxyManager.getProxy(names[i], SharedLibraryMBean.class);
+            sharedLibraries.add(new SharedLibrary(this, mbean, names[i]));
+        }
+        return sharedLibraries;
+    }
+
+    public SharedLibrary getSharedLibrary(String name) {
+        for (SharedLibrary sharedLibrary : getSharedLibraries()) {
+            if (sharedLibrary.getName().equals(name)) {
+                return sharedLibrary;
+            }
+        }
+        return null;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceAssembly.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceAssembly.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceAssembly.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceAssembly.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.model;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.apache.servicemix.jbi.framework.ServiceAssemblyMBean;
+
+public class ServiceAssembly {
+
+    private final Registry registry;
+    private final ServiceAssemblyMBean mbean;
+    private final ObjectName objectName;
+    
+    public ServiceAssembly(Registry registry, ServiceAssemblyMBean mbean, ObjectName objectName) {
+        this.registry = registry;
+        this.mbean = mbean;
+        this.objectName = objectName;
+    }
+    
+    public ObjectName getObjectName() {
+        return objectName;
+    }
+
+    public String getName() {
+        return mbean.getName();
+    }
+    
+    public String getDescription() {
+        return mbean.getDescription();
+    }
+    
+    public String getStatus() {
+        return mbean.getCurrentState();
+    }
+    
+    public List<ServiceUnit> getServiceUnits() {
+        return registry.getServiceUnits(this);
+    }
+
+    public boolean equals(Object o) {
+        if (o instanceof ServiceAssembly) {
+            return ((ServiceAssembly) o).objectName.equals(objectName);
+        } else {
+            return false;
+        }
+    }
+    
+    public int hashCode() {
+        return objectName.hashCode();
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceUnit.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceUnit.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceUnit.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/ServiceUnit.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.model;
+
+import javax.management.ObjectName;
+
+import org.apache.servicemix.jbi.framework.ServiceUnitMBean;
+
+public class ServiceUnit {
+    
+    private Registry registry;
+    
+    private ServiceUnitMBean mbean;
+
+    private ObjectName objectName;
+
+    public ServiceUnit(Registry registry, ServiceUnitMBean mbean, ObjectName objectName) {
+        this.registry = registry;
+        this.mbean = mbean;
+        this.objectName = objectName;
+    }
+
+    public ObjectName getObjectName() {
+        return objectName;
+    }
+
+    public String getName() {
+        return mbean.getName();
+    }
+    
+    public Component getComponent() {
+        return registry.getComponent(mbean.getComponentName());
+    }
+    
+    public ServiceAssembly getServiceAssembly() {
+        return registry.getServiceAssembly(mbean.getServiceAssembly());
+    }
+    
+    public boolean equals(Object o) {
+        if (o instanceof ServiceUnit) {
+            return ((ServiceUnit) o).objectName.equals(objectName);
+        } else {
+            return false;
+        }
+    }
+    
+    public int hashCode() {
+        return objectName.hashCode();
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/SharedLibrary.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/SharedLibrary.java?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/SharedLibrary.java (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/java/org/apache/servicemix/web/model/SharedLibrary.java Wed Oct 25 03:59:16 2006
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.web.model;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.apache.servicemix.jbi.framework.SharedLibraryMBean;
+
+public class SharedLibrary {
+
+    private final Registry registry;
+    private final SharedLibraryMBean mbean;
+    private final ObjectName objectName;
+    
+    public SharedLibrary(Registry registry, SharedLibraryMBean mbean, ObjectName name) {
+        this.registry = registry;
+        this.mbean = mbean;
+        this.objectName = name;
+    }
+
+    public ObjectName getObjectName() {
+        return objectName;
+    }
+    
+    public String getName() {
+        return mbean.getName();
+    }
+    
+    public String getDescription() {
+        return mbean.getDescription();
+    }
+    
+    public String getVersion() {
+        return mbean.getVersion();
+    }
+    
+    public List<Component> getComponents() {
+        return registry.getComponent(this);
+    }
+    
+}

Added: incubator/servicemix/trunk/servicemix-web-console/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-web-console/src/main/resources/log4j.xml?view=auto&rev=467601
==============================================================================
--- incubator/servicemix/trunk/servicemix-web-console/src/main/resources/log4j.xml (added)
+++ incubator/servicemix/trunk/servicemix-web-console/src/main/resources/log4j.xml Wed Oct 25 03:59:16 2006
@@ -0,0 +1,107 @@
+<?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.
+
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <param name="threshold" value="INFO"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%-5p - %-30c{1} - %m%n"/>
+        </layout>
+    </appender>
+
+    <appender name="FILE" class="org.apache.log4j.FileAppender">
+        <param name="threshold" value="DEBUG"/>
+        <param name="File" value="data/log/servicemix.log"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d{ABSOLUTE} | %-5p | %-10t | %-24.24c{1} | %-30.30C %4L | %m%n"/>
+        </layout>
+    </appender>
+
+    <logger name="org.apache">
+        <level value="WARN"/>
+    </logger>
+    <logger name="org.springframework">
+        <level value="WARN"/>
+    </logger>
+    <logger name="org.jencks">
+        <level value="WARN"/>
+    </logger>
+    <logger name="org.apache.activemq">
+        <level value="WARN"/>
+    </logger>
+    <logger name="org.apache.activemq.transport.discovery">
+        <level value="ERROR"/>
+    </logger>
+    <logger name="org.apache.servicemix">
+        <!-- To enable debug logging, replace the INFO by DEBUG -->
+        <level value="INFO"/>
+    </logger>
+    <logger name="org.apache.servicemix.jbi.config">
+        <level value="WARN"/>
+    </logger>
+    <logger name="org.apache.servicemix.jbi.deployment">
+        <level value="WARN"/>
+    </logger>
+
+    <root>
+        <level value="INFO"/>
+        <appender-ref ref="CONSOLE"/>
+        <appender-ref ref="FILE"/>
+    </root>
+
+</log4j:configuration>
+<!--
+
+Log4J Configuration Quick Reference:
+====================================
+
+Priority order is DEBUG < INFO < WARN < ERROR < FATAL
+
+PatternLayout conversion characters:
+
+%c   Category of the logging event
+%C   Fully qualified class name of the caller
+%d   Date of the logging event  (example: %d{HH:mm:ss,SSS} )
+%F   File name where the logging request was issued (caution: extremely slow)
+%l   Location information of the caller (caution: extremely slow)
+%L   Line number from where the logging request was issued (caution: extremely slow)
+%m   Application-supplied message
+%M   Method name from where the logging request was issued (caution: extremely slow)
+%n   Line separator
+%p   Priority of the logging event
+%r   Number of milliseconds since the start of the application
+%t   Name of the thread that generated the logging event
+%x   Nested diagnotic context associated with the thread
+%%   A single percent sign
+
+Format modifiers examples:
+
+%20c     Left pad with spaces if category is less than 20 characters long
+%-20c    Right pad with spaces if category is less than 20 characters long
+%.30c    Truncate from the beginning if category is more than 30 chars long
+%20.30c  Left pad 20 chars + truncate from beginning if more than 30 chars
+%-20.30c Right pad 20 chars + truncate from beginning if more than 30 chars
+
+Examples:  "%r [%t] %-5p %c %x - %m\n"
+"%-6r [%15.15t] %-5p %30.30c %x - %m\n"
+
+-->