camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r732393 - in /activemq/camel/branches/camel-1.x: ./ camel-core/src/main/java/org/apache/camel/util/ camel-core/src/test/java/org/apache/camel/processor/
Date Wed, 07 Jan 2009 16:45:53 GMT
Author: davsclaus
Date: Wed Jan  7 08:45:53 2009
New Revision: 732393

URL: http://svn.apache.org/viewvc?rev=732393&view=rev
Log:
Merged revisions 732378 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r732378 | davsclaus | 2009-01-07 17:01:32 +0100 (Wed, 07 Jan 2009) | 1 line
  
  CAMEL:1233: Pipeline shoud honor MEP
........

Added:
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/PipelineMEPTest.java
      - copied unchanged from r732378, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineMEPTest.java
Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan  7 08:45:53 2009
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401,729892,730069,730132,730154,730157,730275,730299,730504-730505,730508,730571,730599,730759,730903,730916,730923,730936,730992,731126,731168-731169,731488,731492,731799,731824,731836,731844,731860,732207,732210,732237,732246-732247
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401,729892,730069,730132,730154,730157,730275,730299,730504-730505,730508,730571,730599,730759,730903,730916,730923,730936,730992,731126,731168-731169,731488,731492,731799,731824,731836,731844,731860,732207,732210,732237,732246-732247,732378

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java?rev=732393&r1=732392&r2=732393&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
Wed Jan  7 08:45:53 2009
@@ -203,7 +203,13 @@
                 // as the final processor on a pipeline might not
                 // have created any OUT; such as a mock:endpoint
                 // so lets assume the last IN is the OUT
-                result.getOut(true).copyFrom(source.getIn());
+                if (result.getPattern().isOutCapable()) {
+                    // only set OUT if its OUT capable
+                    result.getOut(true).copyFrom(source.getIn());
+                } else {
+                    // if not replace IN instead to keep the MEP
+                    result.getIn().copyFrom(source.getIn());
+                }
             }
             result.getProperties().clear();
             result.getProperties().putAll(source.getProperties());

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java?rev=732393&r1=732392&r2=732393&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/MultiCastAggregatorTest.java
Wed Jan  7 08:45:53 2009
@@ -50,7 +50,8 @@
             url = "direct:sequential";
         }
 
-        Exchange exchange = template.send(url, new Processor() {
+        // use InOut
+        Exchange exchange = template.request(url, new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setBody("input");

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java?rev=732393&r1=732392&r2=732393&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
Wed Jan  7 08:45:53 2009
@@ -63,7 +63,7 @@
     public void testSendMessageThroughAPipeline() throws Exception {
         resultEndpoint.expectedBodiesReceived(4);
 
-        Exchange results = template.send("direct:a", new Processor() {
+        Exchange results = template.request("direct:a", new Processor() {
             public void process(Exchange exchange) {
                 // now lets fire in a message
                 Message in = exchange.getIn();
@@ -79,7 +79,7 @@
 
     
     public void testResultsReturned() throws Exception {
-        Exchange exchange = template.send("direct:b", new Processor() {
+        Exchange exchange = template.request("direct:b", new Processor() {
             public void process(Exchange exchange) {
                 exchange.getIn().setBody("Hello World");
             }
@@ -95,7 +95,7 @@
      * @throws Exception
      */
     public void testFaultStopsPipeline() throws Exception {
-        Exchange exchange = template.send("direct:c", new Processor() {
+        Exchange exchange = template.request("direct:c", new Processor() {
             public void process(Exchange exchange) {
                 exchange.getIn().setBody("Fault Message");
             }
@@ -111,7 +111,7 @@
     }
 
     public void testOnlyProperties() {
-        Exchange exchange = template.send("direct:b", new Processor() {
+        Exchange exchange = template.request("direct:b", new Processor() {
             public void process(Exchange exchange) {
                 exchange.getIn().setHeader("header", "headerValue");
             }
@@ -124,7 +124,6 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         resultEndpoint = getMockEndpoint("mock:result");
     }
 
@@ -135,8 +134,6 @@
                 if (number == null) {
                     number = 0;
                 }
-                // todo set the endpoint name we were received from
-                //exchange.setProperty(exchange.get);
                 number = number + 1;
                 exchange.getOut().setBody(number);
             }

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java?rev=732393&r1=732392&r2=732393&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
(original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
Wed Jan  7 08:45:53 2009
@@ -38,6 +38,7 @@
         MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
         resultEndpoint.expectedBodiesReceived("James", "Guillaume", "Hiram", "Rob");
 
+        // InOnly
         template.send("direct:seqential", new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
@@ -61,7 +62,7 @@
         MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
         resultEndpoint.expectedBodiesReceived("James", "Guillaume", "Hiram", "Rob", "Roman");
 
-        Exchange result = template.send("direct:seqential", new Processor() {
+        Exchange result = template.request("direct:seqential", new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setBody("James,Guillaume,Hiram,Rob,Roman");
@@ -77,7 +78,7 @@
     }
 
     public void testEmptyBody() {
-        Exchange result = template.send("direct:seqential", new Processor() {
+        Exchange result = template.request("direct:seqential", new Processor() {
             public void process(Exchange exchange) throws Exception {
                 exchange.getIn().setHeader("foo", "bar");
             }
@@ -92,6 +93,7 @@
         resultEndpoint.expectsNoDuplicates(body());
         resultEndpoint.expectedMessageCount(4);
 
+        // InOnly
         template.send("direct:parallel", new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
@@ -124,7 +126,7 @@
         MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
         resultEndpoint.expectedMessageCount(5);
 
-        Exchange result = template.send("direct:parallel", new Processor() {
+        Exchange result = template.request("direct:parallel", new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setBody("James,Guillaume,Hiram,Rob,Roman");
@@ -144,7 +146,7 @@
         resultEndpoint.expectedMessageCount(5);
         resultEndpoint.expectedBodiesReceivedInAnyOrder("James", "Guillaume", "Hiram", "Rob",
"Roman");
 
-        Exchange result = template.send("direct:parallel-streaming", new Processor() {
+        Exchange result = template.request("direct:parallel-streaming", new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setBody("James,Guillaume,Hiram,Rob,Roman");
@@ -164,7 +166,7 @@
         resultEndpoint.expectedMessageCount(5);
         resultEndpoint.expectedHeaderReceived("foo", "bar");
 
-        Exchange result = template.send("direct:streaming", new Processor() {
+        template.request("direct:streaming", new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setBody("James,Guillaume,Hiram,Rob,Roman");
@@ -190,7 +192,7 @@
         failedEndpoint.expectedMessageCount(1);
         failedEndpoint.expectedHeaderReceived("foo", "bar");
         
-        Exchange result = template.send("direct:exception", new Processor() {
+        Exchange result = template.request("direct:exception", new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setBody("James,Guillaume,Hiram,Rob,Exception");



Mime
View raw message