camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r766621 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/processor/ components/camel-spring/src/test/java/org/apache/camel/spring/processor/ components/camel-spring/src/test/resources/org/apache/camel/spring/processor/
Date Mon, 20 Apr 2009 08:43:27 GMT
Author: davsclaus
Date: Mon Apr 20 08:43:27 2009
New Revision: 766621

URL: http://svn.apache.org/viewvc?rev=766621&view=rev
Log:
Added snippets for wiki documentation

Added:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.java
      - copied, changed from r766610, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml
  (contents, props changed)
      - copied, changed from r766610, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.xml
Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorMultipleExceptionTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorMultipleExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorMultipleExceptionTest.java?rev=766621&r1=766620&r2=766621&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorMultipleExceptionTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorMultipleExceptionTest.java
Mon Apr 20 08:43:27 2009
@@ -76,7 +76,8 @@
         };
     }
 
-    private class ProcessorFail implements Processor {
+    public static class ProcessorFail implements Processor {
+
         public void process(Exchange exchange) throws Exception {
             String body = exchange.getIn().getBody(String.class);
             if ("Damn IO".equals(body)) {

Copied: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.java
(from r766610, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.java?p2=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.java&p1=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.java&r1=766610&r2=766621&rev=766621&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.java
Mon Apr 20 08:43:27 2009
@@ -17,13 +17,13 @@
 package org.apache.camel.spring.processor;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.processor.TryProcessorHandledTest;
+import org.apache.camel.processor.TryProcessorMultipleExceptionTest;
 import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
 
-public class SpringTryProcessorHandledTest extends TryProcessorHandledTest {
+public class SpringTryProcessorMultipleExceptionTest extends TryProcessorMultipleExceptionTest
{
 
     protected CamelContext createCamelContext() throws Exception {
-        return createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringTryProcessorHandledTest.xml");
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml");
     }
 
 }
\ No newline at end of file

Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml
(from r766610, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.xml&r1=766610&r2=766621&rev=766621&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorHandledTest.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml
Mon Apr 20 08:43:27 2009
@@ -31,24 +31,19 @@
                 <process ref="processorFail"/>
                 <to uri="mock:result"/>
                 <doCatch>
-                    <!-- catch IOExcption that we do not want to handle, eg the caller
should get the error back -->
+                    <!-- catch multiple exceptions -->
                     <exception>java.io.IOException</exception>
-                    <!-- mark this as NOT handled, eg the caller will also get the exception
-->
-                    <handled>
-                        <constant>false</constant>
-                    </handled>
-                    <to uri="mock:io"/>
-                </doCatch>
-                <doCatch>
-                    <!-- and catch all other exceptions they are handled by default (ie
handled = true) -->
-                    <exception>java.lang.Exception</exception>
-                    <to uri="mock:error"/>
+                    <exception>java.lang.IllegalStateException</exception>
+                    <to uri="mock:catch"/>
                 </doCatch>
+                <doFinally>
+                    <to uri="mock:finally"/>
+                </doFinally>
             </doTry>
         </route>
         <!-- END SNIPPET: e1 -->
     </camelContext>
 
-    <bean id="processorFail" class="org.apache.camel.processor.TryProcessorHandledTest$ProcessorFail"/>
+    <bean id="processorFail" class="org.apache.camel.processor.TryProcessorMultipleExceptionTest$ProcessorFail"/>
 
 </beans>

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTryProcessorMultipleExceptionTest.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message