servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r394567 - in /incubator/servicemix/trunk/servicemix-http/src: main/java/org/apache/servicemix/http/processors/ test/java/org/apache/servicemix/http/
Date Sun, 16 Apr 2006 22:13:14 GMT
Author: gnodet
Date: Sun Apr 16 15:13:10 2006
New Revision: 394567

URL: http://svn.apache.org/viewcvs?rev=394567&view=rev
Log:
Use new sendConsumerExchange method instead of deprecated one.
Fix possible problems with xbean kernel (SU were not undeployed)

Modified:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
    incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpProviderTest.java
    incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpWsdlTest.java

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java?rev=394567&r1=394566&r2=394567&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
(original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
Sun Apr 16 15:13:10 2006
@@ -142,7 +142,7 @@
                 inMessage.setProperty(JbiConstants.PROTOCOL_HEADERS, getHeaders(request));
                 locks.put(exchange.getExchangeId(), cont);
                 request.setAttribute(MessageExchange.class.getName(), exchange.getExchangeId());
-                ((BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle()).sendConsumerExchange(exchange,
this);
+                ((BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle()).sendConsumerExchange(exchange,
endpoint);
                 // TODO: make this timeout configurable
                 boolean result = cont.suspend(1000 * 60); // 60 s
                 if (!result) {

Modified: incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpProviderTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpProviderTest.java?rev=394567&r1=394566&r2=394567&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpProviderTest.java
(original)
+++ incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpProviderTest.java
Sun Apr 16 15:13:10 2006
@@ -61,7 +61,7 @@
         // HTTP Component
         HttpComponent component = new HttpComponent();
         ((HttpLifeCycle) component.getLifeCycle()).getConfiguration().setStreamingEnabled(streaming);
-        container.activateComponent(component, "HTTPComponent");
+        container.activateComponent(component, "HttpProviderTest");
         
         // Add a receiver component
         Receiver receiver = new ReceiverComponent();
@@ -100,6 +100,10 @@
         // Check we received the message
         receiver.getMessageList().assertMessagesReceived(1);
         
+        component.getServiceUnitManager().stop("provider");
+        component.getServiceUnitManager().shutDown("provider");
+        component.getServiceUnitManager().undeploy("provider", path.getAbsolutePath());
+        
         return t1 - t0;
     }
         
@@ -147,6 +151,10 @@
         assertNotNull(inout.getOutMessage());
         assertNotNull(inout.getOutMessage().getContent());
         System.out.println(new SourceTransformer().toString(inout.getOutMessage().getContent()));
+
+        component.getServiceUnitManager().stop("provider");
+        component.getServiceUnitManager().shutDown("provider");
+        component.getServiceUnitManager().undeploy("provider", path.getAbsolutePath());
         
         return t1 - t0;
     }

Modified: incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpWsdlTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpWsdlTest.java?rev=394567&r1=394566&r2=394567&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpWsdlTest.java
(original)
+++ incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpWsdlTest.java
Sun Apr 16 15:13:10 2006
@@ -58,7 +58,7 @@
     public void testWithNonStandaloneWsdl() throws Exception {
         // HTTP Component
         HttpComponent component = new HttpComponent();
-        container.activateComponent(component, "HTTPComponent");
+        container.activateComponent(component, "HttpWsdlTest");
         
         // Add a receiver component
         ActivationSpec asEcho = new ActivationSpec("echo", new EchoComponent() {
@@ -99,6 +99,10 @@
         assertNotNull(def);
         assertNotNull(def.getImports());
         assertEquals(1, def.getImports().size());
+
+        component.getServiceUnitManager().stop("xbean");
+        component.getServiceUnitManager().shutDown("xbean");
+        component.getServiceUnitManager().undeploy("xbean", path.getAbsolutePath());
     }
     
 }



Mime
View raw message