servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r727915 - in /servicemix/components/bindings/servicemix-http/trunk: pom.xml src/main/java/org/apache/servicemix/http/HttpManagedServlet.java
Date Fri, 19 Dec 2008 04:04:44 GMT
Author: ffang
Date: Thu Dec 18 20:04:43 2008
New Revision: 727915

URL: http://svn.apache.org/viewvc?rev=727915&view=rev
Log:
[SM-1741]refactor utils to let component get rid of provided dependency of servicemix-core


Modified:
    servicemix/components/bindings/servicemix-http/trunk/pom.xml
    servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java

Modified: servicemix/components/bindings/servicemix-http/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-http/trunk/pom.xml?rev=727915&r1=727914&r2=727915&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-http/trunk/pom.xml (original)
+++ servicemix/components/bindings/servicemix-http/trunk/pom.xml Thu Dec 18 20:04:43 2008
@@ -40,8 +40,9 @@
 
   <properties>
     <previous.releases>3.1.2,3.2,3.2.1</previous.releases>
-    <servicemix-version>3.3</servicemix-version>
+    <servicemix-version>3.3.1-SNAPSHOT</servicemix-version>
     <servicemix-shared-version>2008.02-SNAPSHOT</servicemix-shared-version>
+    <servicemix-utils-version>1.1.0-SNAPSHOT</servicemix-utils-version>
     <jetty-version>6.1.14</jetty-version>
     <activemq-version>5.1.0</activemq-version>
 
@@ -88,8 +89,14 @@
     </dependency>
     <dependency>
       <groupId>org.apache.servicemix</groupId>
-      <artifactId>servicemix-core</artifactId>
+      <artifactId>servicemix-utils</artifactId>
       <scope>provided</scope>
+      <version>${servicemix-utils-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-core</artifactId>
+      <scope>test</scope>
       <version>${servicemix-version}</version>
       <exclusions>
         <exclusion>
@@ -237,18 +244,6 @@
       <artifactId>geronimo-jta_1.1_spec</artifactId>
     </dependency>
     <!-- provided to allow compilation - OSGi imports marked optional for SMX4 -->
-    <dependency>
-      <groupId>org.apache.servicemix</groupId>
-      <artifactId>servicemix-core</artifactId>
-      <version>${servicemix-version}</version>
-      <scope>provided</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.springframework</groupId>
-          <artifactId>spring-jmx</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
 
     <dependency>
       <groupId>org.apache.servicemix</groupId>

Modified: servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java?rev=727915&r1=727914&r2=727915&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java
(original)
+++ servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/HttpManagedServlet.java
Thu Dec 18 20:04:43 2008
@@ -23,8 +23,10 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.servicemix.jbi.container.JBIContainer;
-import org.apache.servicemix.jbi.framework.ComponentMBeanImpl;
+import org.apache.servicemix.jbi.api.ComponentUtil;
+import org.apache.servicemix.jbi.api.Container;
+//import org.apache.servicemix.jbi.container.JBIContainer;
+//import org.apache.servicemix.jbi.framework.ComponentMBeanImpl;
 import org.springframework.context.ApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
@@ -58,7 +60,8 @@
         if (containerName == null) {
             containerName = CONTAINER_DEFAULT;
         }
-        JBIContainer container = (JBIContainer) applicationContext.getBean(containerName);
+//        JBIContainer container = (JBIContainer) applicationContext.getBean(containerName);
+        Container container = (Container) applicationContext.getBean(containerName);
         if (container == null) {
             throw new IllegalStateException("Unable to find jbi container " + containerName);
         }
@@ -66,7 +69,8 @@
         if (componentName == null) {
             componentName = COMPONENT_DEFAULT;
         }
-        ComponentMBeanImpl componentMBean = container.getComponent(componentName);
+//        ComponentMBeanImpl componentMBean = container.getComponent(componentName);
+        ComponentUtil componentMBean = container.getComponentByName(componentName);
         if (componentMBean == null) {
             throw new IllegalStateException("Unable to find component " + componentName);
         }



Mime
View raw message