servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r949267 - in /servicemix/components/engines/servicemix-camel/trunk: pom.xml src/main/java/org/apache/servicemix/camel/CamelSpringDeployer.java src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
Date Fri, 28 May 2010 19:24:32 GMT
Author: gertv
Date: Fri May 28 19:24:32 2010
New Revision: 949267

URL: http://svn.apache.org/viewvc?rev=949267&view=rev
Log:
SMXCOMP-750: Upgrade servicemix-camel to Camel 2.3.0

Modified:
    servicemix/components/engines/servicemix-camel/trunk/pom.xml
    servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelSpringDeployer.java
    servicemix/components/engines/servicemix-camel/trunk/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java

Modified: servicemix/components/engines/servicemix-camel/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-camel/trunk/pom.xml?rev=949267&r1=949266&r2=949267&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-camel/trunk/pom.xml (original)
+++ servicemix/components/engines/servicemix-camel/trunk/pom.xml Fri May 28 19:24:32 2010
@@ -37,7 +37,7 @@
   </scm>
 
   <properties>
-    <camel-version>2.2.0</camel-version>
+    <camel-version>2.3.0</camel-version>
     <servicemix.osgi.import>
       !org.apache.servicemix.camel*,  
       org.apache.camel.converter,

Modified: servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelSpringDeployer.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelSpringDeployer.java?rev=949267&r1=949266&r2=949267&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelSpringDeployer.java
(original)
+++ servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/CamelSpringDeployer.java
Fri May 28 19:24:32 2010
@@ -92,7 +92,7 @@ public class CamelSpringDeployer extends
 
         JbiComponent jbiComponent = camelContext.getComponent("jbi", JbiComponent.class);
         // now lets iterate through all the endpoints
-        Collection<Endpoint> endpoints = camelContext.getSingletonEndpoints();
+        Collection<Endpoint> endpoints = camelContext.getEndpoints();
 
         if (jbiComponent != null) {
             // set the SU Name

Modified: servicemix/components/engines/servicemix-camel/trunk/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-camel/trunk/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java?rev=949267&r1=949266&r2=949267&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-camel/trunk/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
(original)
+++ servicemix/components/engines/servicemix-camel/trunk/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
Fri May 28 19:24:32 2010
@@ -27,6 +27,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.processor.aggregate.UseLatestAggregationStrategy;
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.client.ServiceMixClient;
 import org.apache.servicemix.jbi.container.ActivationSpec;
@@ -38,6 +39,7 @@ import org.apache.servicemix.jbi.jaxp.St
 public class JbiInOnlyTest extends JbiTestSupport {
     
     private static final String MESSAGE = "<just><a>test</a></just>";
+    private static final int COUNT = 50;
 
     public void testInOnlyExchangeConvertBody() throws Exception {
         MockEndpoint done = getMockEndpoint("mock:done");
@@ -87,7 +89,7 @@ public class JbiInOnlyTest extends JbiTe
     public void testInOnlyToAggregator() throws Exception {
         ServiceMixClient smxClient = getServicemixClient();
         getMockEndpoint("mock:aggregated").expectedMessageCount(1);
-        for (int i = 0; i < 50; i++) {
+        for (int i = 0; i < COUNT; i++) {
             InOnly exchange = smxClient.createInOnlyExchange();
             exchange.setService(new QName("urn:test", "in-only-aggregator"));
             exchange.getInMessage().setProperty("key", "aggregate-this");
@@ -95,6 +97,9 @@ public class JbiInOnlyTest extends JbiTe
             smxClient.send(exchange);
         }
         getMockEndpoint("mock:aggregated").assertIsSatisfied();
+
+        // give the DONE exchanges a few moments to be delivered
+        Thread.sleep(1000);
     }
 
 
@@ -121,7 +126,7 @@ public class JbiInOnlyTest extends JbiTe
                 });
                 from("jbi:service:urn:test:in-only-aggregator")
                     .to("log:info")
-                    .aggregate(header("key"))
+                    .aggregate(header("key"), new UseLatestAggregationStrategy()).completionSize(COUNT)
                     .setHeader("aggregated").constant(true)
                     .to("log:info")
                     .to("mock:aggregated");



Mime
View raw message