camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r774256 - /camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java
Date Wed, 13 May 2009 08:53:28 GMT
Author: davsclaus
Date: Wed May 13 08:53:28 2009
New Revision: 774256

URL: http://svn.apache.org/viewvc?rev=774256&view=rev
Log:
CAMEL-1604: First cut for onCompletion DSL.

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java?rev=774256&r1=774255&r2=774256&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java
Wed May 13 08:53:28 2009
@@ -41,13 +41,18 @@
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
+                // START SNIPPET: e1
                 from("direct:start")
+                    // here we qualify onCompletion to only invoke when the exchange failed
(exception or FAULT body)
                     .onCompletion().onFailureOnly()
                         .to("log:sync")
                         .to("mock:sync")
+                    // must use end to denote the end of the onCompletion route
                     .end()
+                    // here the original route contiues
                     .process(new MyProcessor())
                     .to("mock:result");
+                // END SNIPPET: e1
             }
         };
     }



Mime
View raw message