camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r943561 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/management/mbean/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/processor/ ...
Date Wed, 12 May 2010 15:57:21 GMT
Author: davsclaus
Date: Wed May 12 15:57:20 2010
New Revision: 943561

URL: http://svn.apache.org/viewvc?rev=943561&view=rev
Log:
CAMEL-2253: Added option continued on onException to handle and continue routing. Just like a try .. catch would do.

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnExceptionContinueToRouteTest.java
      - copied, changed from r943471, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java   (with props)
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubSubRouteTest.java   (with props)
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java
      - copied, changed from r943471, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWithRouteAndContinueTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnExceptionContinueToRouteTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubRouteTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubSubRouteTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueTest.java
      - copied, changed from r943471, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionWithRouteAndContinueTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/OnExceptionContinueToRouteTest.xml   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubRouteTest.xml   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubSubRouteTest.xml   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueTest.xml
      - copied, changed from r943471, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionWithRouteAndContinueTest.xml   (with props)
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java Wed May 12 15:57:20 2010
@@ -153,6 +153,7 @@ public class DefaultErrorHandlerBuilder 
      * @param handled  handled or not
      * @return the builder
      */
+    @Deprecated
     public DefaultErrorHandlerBuilder handled(boolean handled) {
         Expression expression = ExpressionBuilder.constantExpression(Boolean.toString(handled));
         return handled(expression);
@@ -164,6 +165,7 @@ public class DefaultErrorHandlerBuilder 
      * @param handled  predicate that determines true or false
      * @return the builder
      */
+    @Deprecated
     public DefaultErrorHandlerBuilder handled(Predicate handled) {
         this.setHandledPolicy(handled);
         return this;
@@ -175,6 +177,7 @@ public class DefaultErrorHandlerBuilder 
      * @param handled  expression that determines true or false
      * @return the builder
      */
+    @Deprecated
     public DefaultErrorHandlerBuilder handled(Expression handled) {
         this.setHandledPolicy(toPredicate(handled));
         return this;
@@ -335,6 +338,7 @@ public class DefaultErrorHandlerBuilder 
         this.onRedelivery = onRedelivery;
     }
 
+    @Deprecated
     public Predicate getHandledPolicy() {
         if (handledPolicy == null) {
             handledPolicy = createHandledPolicy();
@@ -342,6 +346,7 @@ public class DefaultErrorHandlerBuilder 
         return handledPolicy;
     }
 
+    @Deprecated
     public void setHandledPolicy(Predicate handled) {
         this.handledPolicy = handled;
     }
@@ -349,6 +354,7 @@ public class DefaultErrorHandlerBuilder 
     /**
      * Sets the handled using a boolean and thus easier to use for Spring XML configuration as well
      */
+    @Deprecated
     public void setHandled(boolean handled) {
         handled(handled);
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java Wed May 12 15:57:20 2010
@@ -328,6 +328,66 @@ public class ManagedErrorHandler {
         redelivery.getRedeliveryPolicy().setLogRetryStackTrace(log);
     }
 
+    @ManagedAttribute(description = "RedeliveryPolicy for logging handled exceptions")
+    public Boolean getLogHandled() {
+        if (!isSupportRedelivery()) {
+            return null;
+        }
+
+        RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
+        return redelivery.getRedeliveryPolicy().isLogHandled();
+    }
+
+    @ManagedAttribute(description = "RedeliveryPolicy for logging handled exceptions")
+    public void setLogHandled(Boolean log) {
+        if (!isSupportRedelivery()) {
+            throw new IllegalArgumentException("This error handler does not support redelivery");
+        }
+
+        RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
+        redelivery.getRedeliveryPolicy().setLogHandled(log);
+    }
+
+    @ManagedAttribute(description = "RedeliveryPolicy for logging handled and continued exceptions")
+    public Boolean getLogContinued() {
+        if (!isSupportRedelivery()) {
+            return null;
+        }
+
+        RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
+        return redelivery.getRedeliveryPolicy().isLogHandled();
+    }
+
+    @ManagedAttribute(description = "RedeliveryPolicy for logging handled and continued exceptions")
+    public void setLogContinued(Boolean log) {
+        if (!isSupportRedelivery()) {
+            throw new IllegalArgumentException("This error handler does not support redelivery");
+        }
+
+        RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
+        redelivery.getRedeliveryPolicy().setLogContinued(log);
+    }
+
+    @ManagedAttribute(description = "RedeliveryPolicy for logging exhausted exceptions")
+    public Boolean getLogExhausted() {
+        if (!isSupportRedelivery()) {
+            return null;
+        }
+
+        RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
+        return redelivery.getRedeliveryPolicy().isLogExhausted();
+    }
+
+    @ManagedAttribute(description = "RedeliveryPolicy for logging exhausted exceptions")
+    public void setLogExhausted(Boolean log) {
+        if (!isSupportRedelivery()) {
+            throw new IllegalArgumentException("This error handler does not support redelivery");
+        }
+
+        RedeliveryErrorHandler redelivery = (RedeliveryErrorHandler) errorHandler;
+        redelivery.getRedeliveryPolicy().setLogExhausted(log);
+    }
+
     @ManagedAttribute(description = "RedeliveryPolicy for using collision avoidance")
     public Boolean getUseCollisionAvoidance() {
         if (!isSupportRedelivery()) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java Wed May 12 15:57:20 2010
@@ -64,6 +64,8 @@ public class OnExceptionDefinition exten
     private RedeliveryPolicyDefinition redeliveryPolicy;
     @XmlElement(name = "handled", required = false)
     private ExpressionSubElementDefinition handled;
+    @XmlElement(name = "continued", required = false)
+    private ExpressionSubElementDefinition continued;
     @XmlAttribute(name = "onRedeliveryRef", required = false)
     private String onRedeliveryRef;
     @XmlAttribute(name = "useOriginalMessage", required = false)
@@ -77,6 +79,8 @@ public class OnExceptionDefinition exten
     @XmlTransient
     private Predicate handledPolicy;
     @XmlTransient
+    private Predicate continuedPolicy;
+    @XmlTransient
     private Predicate retryUntilPolicy;
     @XmlTransient
     private Processor onRedelivery;
@@ -130,6 +134,7 @@ public class OnExceptionDefinition exten
 
     public void addRoutes(RouteContext routeContext, Collection<Route> routes) throws Exception {
         setHandledFromExpressionType(routeContext);
+        setContinuedFromExpressionType(routeContext);
         setRetryUntilFromExpressionType(routeContext);
         // lookup onRedelivery if ref is provided
         if (ObjectHelper.isNotEmpty(onRedeliveryRef)) {
@@ -202,6 +207,45 @@ public class OnExceptionDefinition exten
     }
 
     /**
+     * Sets whether the exchange should handle and continue routing from the point of failure.
+     * <p/>
+     * If this option is enabled then its considered handled as well.
+     *
+     * @param continued continued or not
+     * @return the builder
+     */
+    public OnExceptionDefinition continued(boolean continued) {
+        Expression expression = ExpressionBuilder.constantExpression(Boolean.toString(continued));
+        return continued(expression);
+    }
+
+    /**
+     * Sets whether the exchange should be marked as handled or not.
+     * <p/>
+     * If this option is enabled then its considered handled as well.
+     *
+     * @param continued predicate that determines true or false
+     * @return the builder
+     */
+    public OnExceptionDefinition continued(Predicate continued) {
+        setContinuedPolicy(continued);
+        return this;
+    }
+
+    /**
+     * Sets whether the exchange should be marked as handled or not.
+     * <p/>
+     * If this option is enabled then its considered handled as well.
+     *
+     * @param continued expression that determines true or false
+     * @return the builder
+     */
+    public OnExceptionDefinition continued(Expression continued) {
+        setContinuedPolicy(toPredicate(continued));
+        return this;
+    }
+
+    /**
      * Sets an additional predicate that should be true before the onException is triggered.
      * <p/>
      * To be used for fine grained controlling whether a thrown exception should be intercepted
@@ -357,6 +401,14 @@ public class OnExceptionDefinition exten
     }
 
     /**
+     * Sets whether to log errors even if its continued
+     */
+    public OnExceptionDefinition logContinued(boolean logContinued) {
+        getOrCreateRedeliveryPolicy().setLogContinued(logContinued);
+        return this;
+    }
+
+    /**
      * Sets whether to log retry attempts
      */
     public OnExceptionDefinition logRetryAttempted(boolean logRetryAttempted) {
@@ -521,6 +573,14 @@ public class OnExceptionDefinition exten
         this.handled = handled;
     }
 
+    public ExpressionSubElementDefinition getContinued() {
+        return continued;
+    }
+
+    public void setContinued(ExpressionSubElementDefinition continued) {
+        this.continued = continued;
+    }
+
     public ExpressionSubElementDefinition getHandled() {
         return handled;
     }
@@ -529,6 +589,14 @@ public class OnExceptionDefinition exten
         this.handledPolicy = handledPolicy;
     }
 
+    public Predicate getContinuedPolicy() {
+        return continuedPolicy;
+    }
+
+    public void setContinuedPolicy(Predicate continuedPolicy) {
+        this.continuedPolicy = continuedPolicy;
+    }
+
     public WhenDefinition getOnWhen() {
         return onWhen;
     }
@@ -603,6 +671,12 @@ public class OnExceptionDefinition exten
         }
     }
 
+    private void setContinuedFromExpressionType(RouteContext routeContext) {
+        if (getContinued() != null && continuedPolicy == null && routeContext != null) {
+            continued(getContinued().createPredicate(routeContext));
+        }
+    }
+
     private void setRetryUntilFromExpressionType(RouteContext routeContext) {
         if (getRetryUntil() != null && retryUntilPolicy == null && routeContext != null) {
             retryUntil(getRetryUntil().createPredicate(routeContext));

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java Wed May 12 15:57:20 2010
@@ -63,6 +63,8 @@ public class RedeliveryPolicyDefinition 
     @XmlAttribute
     private Boolean logHandled;
     @XmlAttribute
+    private Boolean logContinued;
+    @XmlAttribute
     private Boolean logExhausted;
     @XmlAttribute
     private Boolean disableRedelivery;
@@ -119,6 +121,9 @@ public class RedeliveryPolicyDefinition 
         if (logHandled != null) {
             answer.setLogHandled(logHandled);
         }
+        if (logContinued != null) {
+            answer.setLogContinued(logContinued);
+        }
         if (logRetryAttempted != null) {
             answer.setLogRetryAttempted(logRetryAttempted);
         }
@@ -256,6 +261,18 @@ public class RedeliveryPolicyDefinition 
     }
 
     /**
+     * Sets whether continued exceptions should be logged or not
+     * Can be used to include or reduce verbose.
+     *
+     * @param logContinued  whether continued exceptions should be logged or not
+     * @return the builder
+     */
+    public RedeliveryPolicyDefinition logContinued(boolean logContinued) {
+        setLogContinued(logContinued);
+        return this;
+    }
+
+    /**
      * Sets whether exhausted exceptions should be logged or not
      * Can be used to include or reduce verbose.
      *
@@ -451,6 +468,14 @@ public class RedeliveryPolicyDefinition 
         this.logHandled = logHandled;
     }
 
+    public Boolean getLogContinued() {
+        return logContinued;
+    }
+
+    public void setLogContinued(Boolean logContinued) {
+        this.logContinued = logContinued;
+    }
+
     public Boolean isLogRetryAttempted() {
         return logRetryAttempted;
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java Wed May 12 15:57:20 2010
@@ -79,7 +79,7 @@ public class Pipeline extends MulticastP
 
             // check for error if so we should break out
             boolean exceptionHandled = hasExceptionBeenHandledByErrorHandler(nextExchange);
-            if (nextExchange.isFailed() || nextExchange.isRollbackOnly() ||  exceptionHandled) {
+            if (nextExchange.isFailed() || nextExchange.isRollbackOnly() || exceptionHandled) {
                 // The Exchange.ERRORHANDLED_HANDLED property is only set if satisfactory handling was done
                 // by the error handler. It's still an exception, the exchange still failed.
                 if (LOG.isDebugEnabled()) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java Wed May 12 15:57:20 2010
@@ -59,6 +59,7 @@ public abstract class RedeliveryErrorHan
         Processor failureProcessor;
         Processor onRedeliveryProcessor = redeliveryProcessor;
         Predicate handledPredicate = handledPolicy;
+        Predicate continuedPredicate = null;
         boolean useOriginalInMessage = useOriginalMessagePolicy;
     }
 
@@ -115,14 +116,21 @@ public abstract class RedeliveryErrorHan
                     boolean deadLetterChannel = target == data.deadLetterProcessor && data.deadLetterProcessor != null;
                     EventHelper.notifyExchangeFailureHandled(exchange.getContext(), exchange, target, deadLetterChannel);
                 }
+
+                boolean shouldContinue = shouldContinue(exchange, data);
+                if (shouldContinue) {
+                    // okay we want to continue then prepare the exchange for that as well
+                    prepareExchangeForContinue(exchange, data);
+                }
                 // and then return
                 return;
             }
 
-            // if we are redelivering then sleep before trying again
             if (shouldRedeliver && data.redeliveryCounter > 0) {
+                // prepare for redelivery
                 prepareExchangeForRedelivery(exchange);
 
+                // if we are redelivering then sleep before trying again
                 // wait until we should redeliver
                 try {
                     data.redeliveryDelay = data.currentRedeliveryPolicy.sleep(data.redeliveryDelay, data.redeliveryCounter);
@@ -186,7 +194,7 @@ public abstract class RedeliveryErrorHan
         // or we are exhausted
         return exchange.getException() == null
             || ExchangeHelper.isFailureHandled(exchange)
-            || ExchangeHelper.isRedelieryExhausted(exchange);
+            || ExchangeHelper.isRedeliveryExhausted(exchange);
     }
 
     /**
@@ -220,6 +228,25 @@ public abstract class RedeliveryErrorHan
         return logger;
     }
 
+    protected void prepareExchangeForContinue(Exchange exchange, RedeliveryData data) {
+        Exception caught = exchange.getException();
+
+        // continue is a kind of redelivery so reuse the logic to prepare
+        prepareExchangeForRedelivery(exchange);
+        // its continued then remove traces of redelivery attempted and caught exception
+        exchange.getIn().removeHeader(Exchange.REDELIVERED);
+        exchange.getIn().removeHeader(Exchange.REDELIVERY_COUNTER);
+        // keep the Exchange.EXCEPTION_CAUGHT as property so end user knows the caused exception
+
+        // create log message
+        String msg = "Failed delivery for exchangeId: " + exchange.getExchangeId();
+        msg = msg + ". Exhausted after delivery attempt: " + data.redeliveryCounter + " caught: " + caught;
+        msg = msg + ". Handled and continue routing.";
+
+        // log that we failed but want to continue
+        logFailedDelivery(false, false, true, exchange, msg, data, null);
+    }
+
     protected void prepareExchangeForRedelivery(Exchange exchange) {
         // okay we will give it another go so clear the exception so we can try again
         if (exchange.getException() != null) {
@@ -244,6 +271,7 @@ public abstract class RedeliveryErrorHan
         if (exceptionPolicy != null) {
             data.currentRedeliveryPolicy = exceptionPolicy.createRedeliveryPolicy(exchange.getContext(), data.currentRedeliveryPolicy);
             data.handledPredicate = exceptionPolicy.getHandledPolicy();
+            data.continuedPredicate = exceptionPolicy.getContinuedPolicy();
             data.retryUntilPredicate = exceptionPolicy.getRetryUntilPolicy();
             data.useOriginalInMessage = exceptionPolicy.getUseOriginalMessagePolicy();
 
@@ -261,7 +289,7 @@ public abstract class RedeliveryErrorHan
 
         String msg = "Failed delivery for exchangeId: " + exchange.getExchangeId()
                 + ". On delivery attempt: " + data.redeliveryCounter + " caught: " + e;
-        logFailedDelivery(true, false, exchange, msg, data, e);
+        logFailedDelivery(true, false, false, exchange, msg, data, e);
 
         data.redeliveryCounter = incrementRedeliveryCounter(exchange, e);
     }
@@ -347,7 +375,7 @@ public abstract class RedeliveryErrorHan
         }
 
         // log that we failed delivery as we are exhausted
-        logFailedDelivery(false, handled, exchange, msg, data, null);
+        logFailedDelivery(false, handled, false, exchange, msg, data, null);
     }
 
     protected void prepareExchangeAfterFailure(final Exchange exchange, final RedeliveryData data) {
@@ -391,7 +419,7 @@ public abstract class RedeliveryErrorHan
         }
     }
 
-    private void logFailedDelivery(boolean shouldRedeliver, boolean handled, Exchange exchange, String message, RedeliveryData data, Throwable e) {
+    private void logFailedDelivery(boolean shouldRedeliver, boolean handled, boolean continued, Exchange exchange, String message, RedeliveryData data, Throwable e) {
         if (logger == null) {
             return;
         }
@@ -401,6 +429,11 @@ public abstract class RedeliveryErrorHan
             return;
         }
 
+        if (continued && !data.currentRedeliveryPolicy.isLogContinued()) {
+            // do not log handled
+            return;
+        }
+
         if (shouldRedeliver && !data.currentRedeliveryPolicy.isLogRetryAttempted()) {
             // do not log retry attempts
             return;
@@ -443,6 +476,13 @@ public abstract class RedeliveryErrorHan
         }
     }
 
+    /**
+     * Determines whether or not to we should try to redeliver
+     *
+     * @param exchange the current exchange
+     * @param data     the redelivery data
+     * @return <tt>true</tt> to redeliver, or <tt>false</tt> to exhaust.
+     */
     private boolean shouldRedeliver(Exchange exchange, RedeliveryData data) {
         // if marked as rollback only then do not redeliver
         boolean rollbackOnly = exchange.getProperty(Exchange.ROLLBACK_ONLY, false, Boolean.class);
@@ -456,6 +496,21 @@ public abstract class RedeliveryErrorHan
     }
 
     /**
+     * Determines whether or not to continue if we are exhausted.
+     *
+     * @param exchange the current exchange
+     * @param data     the redelivery data
+     * @return <tt>true</tt> to continue, or <tt>false</tt> to exhaust.
+     */
+    private boolean shouldContinue(Exchange exchange, RedeliveryData data) {
+        if (data.continuedPredicate != null) {
+            return data.continuedPredicate.matches(exchange);
+        }
+        // do not continue by default
+        return false;
+    }
+
+    /**
      * Increments the redelivery counter and adds the redelivered flag if the
      * message has been redelivered
      */

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java Wed May 12 15:57:20 2010
@@ -90,6 +90,7 @@ public class RedeliveryPolicy implements
     protected boolean logStackTrace = true;
     protected boolean logRetryStackTrace;
     protected boolean logHandled;
+    protected boolean logContinued;
     protected boolean logExhausted = true;
     protected boolean logRetryAttempted = true;
     protected String delayPattern;
@@ -108,6 +109,7 @@ public class RedeliveryPolicy implements
             + ", logStackTrace=" + logStackTrace
             + ", logRetryStackTrace=" + logRetryStackTrace
             + ", logHandled=" + logHandled
+            + ", logContinued=" + logContinued
             + ", logExhausted=" + logExhausted
             + ", useExponentialBackOff="  + useExponentialBackOff
             + ", backOffMultiplier=" + backOffMultiplier
@@ -564,6 +566,17 @@ public class RedeliveryPolicy implements
         this.logHandled = logHandled;
     }
 
+    public boolean isLogContinued() {
+        return logContinued;
+    }
+
+    /**
+     * Sets whether errors should be logged even if its continued
+     */
+    public void setLogContinued(boolean logContinued) {
+        this.logContinued = logContinued;
+    }
+
     public boolean isLogRetryAttempted() {
         return logRetryAttempted;
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java?rev=943561&r1=943560&r2=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java Wed May 12 15:57:20 2010
@@ -425,14 +425,14 @@ public final class ExchangeHelper {
         exchange.setException(null);
     }
 
-    public static boolean isRedelieryExhausted(Exchange exchange) {
+    public static boolean isRedeliveryExhausted(Exchange exchange) {
         return exchange.getProperty(Exchange.REDELIVERY_EXHAUSTED, false, Boolean.class);
     }
 
     /**
      * Extracts the body from the given exchange.
      * <p/>
-     * If the exchange pattern is provided it will try to honor it and retrive the body
+     * If the exchange pattern is provided it will try to honor it and retrieve the body
      * from either IN or OUT according to the pattern.
      *
      * @param exchange   the exchange

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnExceptionContinueToRouteTest.java (from r943471, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnExceptionContinueToRouteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnExceptionContinueToRouteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java&r1=943471&r2=943561&rev=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnExceptionContinueToRouteTest.java Wed May 12 15:57:20 2010
@@ -23,9 +23,9 @@ import org.apache.camel.builder.RouteBui
 /**
  * @version $Revision$
  */
-public class TryCatchContinueToRouteTest extends ContextTestSupport {
+public class OnExceptionContinueToRouteTest extends ContextTestSupport {
 
-    public void testTryCatchContinueToRoute() throws Exception {
+    public void testOnExceptionContinueToRoute() throws Exception {
         getMockEndpoint("mock:a").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:b").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:catch").expectedBodiesReceived("Hello World");
@@ -43,22 +43,20 @@ public class TryCatchContinueToRouteTest
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
+                onException(IllegalArgumentException.class).continued(true).to("mock:catch");
+
                 from("direct:a")
                     .to("mock:a")
                     .to("direct:b")
                     .to("direct:c");
 
                 from("direct:b")
-                    .doTry()
-                        .to("mock:b")
-                        .throwException(new IllegalArgumentException("Damn"))
-                    .doCatch(Exception.class)
-                        .to("mock:catch")
-                    .end();
+                    .to("mock:b")
+                    .throwException(new IllegalArgumentException("Damn"));
 
                 from("direct:c")
                     .to("mock:c");
             }
         };
     }
-}
+}
\ No newline at end of file

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java?rev=943561&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java Wed May 12 15:57:20 2010
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor.onexception;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+/**
+ * @version $Revision$
+ */
+public class OnExceptionContinueSubRouteTest extends ContextTestSupport {
+
+    public void testContinued() throws Exception {
+        getMockEndpoint("mock:start").expectedMessageCount(1);
+        getMockEndpoint("mock:b").expectedMessageCount(1);
+        getMockEndpoint("mock:c").expectedMessageCount(1);
+
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedBodiesReceived("Hello World");
+        // and we should keep the exception so we know what caused the failure
+        mock.message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                onException(IllegalArgumentException.class).continued(true).logContinued(true);
+
+                from("direct:start")
+                    .to("mock:start")
+                    .to("direct:b")
+                    .to("direct:c")
+                    .to("mock:result");
+
+                from("direct:b")
+                    .to("mock:b")
+                    .throwException(new IllegalArgumentException("Forced"));
+
+                from("direct:c")
+                    .to("mock:c");
+            }
+        };
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubSubRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubSubRouteTest.java?rev=943561&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubSubRouteTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubSubRouteTest.java Wed May 12 15:57:20 2010
@@ -0,0 +1,71 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor.onexception;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+/**
+ * @version $Revision$
+ */
+public class OnExceptionContinueSubSubRouteTest extends ContextTestSupport {
+
+    public void testContinued() throws Exception {
+        getMockEndpoint("mock:start").expectedMessageCount(1);
+        getMockEndpoint("mock:b").expectedMessageCount(1);
+        getMockEndpoint("mock:c").expectedMessageCount(1);
+        getMockEndpoint("mock:d").expectedMessageCount(1);
+
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedBodiesReceived("Hello World");
+        // and we should keep the exception so we know what caused the failure
+        mock.message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                onException(IllegalArgumentException.class).continued(true).logContinued(true);
+
+                from("direct:start")
+                    .to("mock:start")
+                    .to("direct:b")
+                    .to("direct:d")
+                    .to("mock:result");
+
+                from("direct:b")
+                    .to("mock:b")
+                    .throwException(new IllegalArgumentException("Forced"))
+                    .to("direct:c");
+
+                from("direct:c")
+                    .to("mock:c");
+
+                from("direct:d")
+                    .to("mock:d");
+            }
+        };
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubSubRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubSubRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java (from r943471, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java&r1=943471&r2=943561&rev=943561&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java Wed May 12 15:57:20 2010
@@ -24,14 +24,15 @@ import org.apache.camel.component.mock.M
 /**
  * @version $Revision$
  */
-public class OnExceptionHandledTest extends ContextTestSupport {
+public class OnExceptionContinueTest extends ContextTestSupport {
 
-    public void testHandled() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:handled");
+    public void testContinued() throws Exception {
+        getMockEndpoint("mock:start").expectedMessageCount(1);
+
+        MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello World");
-        mock.message(0).property(Exchange.EXCEPTION_CAUGHT).isNotNull();
+        // and we should keep the exception so we know what caused the failure
         mock.message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
-        mock.message(0).property(Exchange.EXCEPTION_CAUGHT).convertTo(String.class).isEqualTo("Forced");
 
         template.sendBody("direct:start", "Hello World");
 
@@ -42,12 +43,17 @@ public class OnExceptionHandledTest exte
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             @Override
+            // START SNIPPET: e1
             public void configure() throws Exception {
-                onException(IllegalArgumentException.class).handled(true)
-                    .to("log:foo?showAll=true").to("mock:handled");
+                // tell Camel to handle and continue when this exception is thrown
+                onException(IllegalArgumentException.class).continued(true);
 
-                from("direct:start").throwException(new IllegalArgumentException("Forced"));
+                from("direct:start")
+                    .to("mock:start")
+                    .throwException(new IllegalArgumentException("Forced"))
+                    .to("mock:result");
             }
+            // END SNIPPET: e1
         };
     }
-}
+}
\ No newline at end of file

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWithRouteAndContinueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWithRouteAndContinueTest.java?rev=943561&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWithRouteAndContinueTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWithRouteAndContinueTest.java Wed May 12 15:57:20 2010
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor.onexception;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+/**
+ * @version $Revision$
+ */
+public class OnExceptionWithRouteAndContinueTest extends ContextTestSupport {
+
+    public void testContinued() throws Exception {
+        getMockEndpoint("mock:start").expectedMessageCount(1);
+
+        // catch should see the exception also
+        MockEndpoint mock = getMockEndpoint("mock:catch");
+        mock.message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
+
+        MockEndpoint result = getMockEndpoint("mock:result");
+        result.expectedBodiesReceived("Hello World");
+        // and we should keep the exception so we know what caused the failure
+        result.message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                onException(IllegalArgumentException.class).continued(true).to("mock:catch");
+
+                from("direct:start")
+                    .to("mock:start")
+                    .throwException(new IllegalArgumentException("Forced"))
+                    .to("mock:result");
+            }
+        };
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWithRouteAndContinueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWithRouteAndContinueTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnExceptionContinueToRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnExceptionContinueToRouteTest.java?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnExceptionContinueToRouteTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnExceptionContinueToRouteTest.java Wed May 12 15:57:20 2010
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.OnExceptionContinueToRouteTest;
+
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringOnExceptionContinueToRouteTest extends OnExceptionContinueToRouteTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/OnExceptionContinueToRouteTest.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnExceptionContinueToRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnExceptionContinueToRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubRouteTest.java?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubRouteTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubRouteTest.java Wed May 12 15:57:20 2010
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.processor.onexception;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.onexception.OnExceptionContinueSubRouteTest;
+
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringOnExceptionContinueSubRouteTest extends OnExceptionContinueSubRouteTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/onexception/OnExceptionContinueSubRouteTest.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubSubRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubSubRouteTest.java?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubSubRouteTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubSubRouteTest.java Wed May 12 15:57:20 2010
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.processor.onexception;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.onexception.OnExceptionContinueSubSubRouteTest;
+
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringOnExceptionContinueSubSubRouteTest extends OnExceptionContinueSubSubRouteTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/onexception/OnExceptionContinueSubSubRouteTest.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubSubRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueSubSubRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueTest.java (from r943471, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueTest.java?p2=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueTest.java&p1=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.java&r1=943471&r2=943561&rev=943561&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionContinueTest.java Wed May 12 15:57:20 2010
@@ -17,16 +17,17 @@
 package org.apache.camel.spring.processor.onexception;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.processor.onexception.OnExceptionUseOriginalBodyTest;
+import org.apache.camel.processor.onexception.OnExceptionContinueTest;
+
 import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
 
 /**
  * @version $Revision$
  */
-public class SpringOnExceptionUseOriginalBodyTest extends OnExceptionUseOriginalBodyTest {
+public class SpringOnExceptionContinueTest extends OnExceptionContinueTest {
 
     protected CamelContext createCamelContext() throws Exception {
-        return createSpringCamelContext(this, "org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.xml");
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/onexception/OnExceptionContinueTest.xml");
     }
 
 }
\ No newline at end of file

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionWithRouteAndContinueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionWithRouteAndContinueTest.java?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionWithRouteAndContinueTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionWithRouteAndContinueTest.java Wed May 12 15:57:20 2010
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.processor.onexception;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.onexception.OnExceptionWithRouteAndContinueTest;
+
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringOnExceptionWithRouteAndContinueTest extends OnExceptionWithRouteAndContinueTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/onexception/OnExceptionWithRouteAndContinueTest.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionWithRouteAndContinueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionWithRouteAndContinueTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/OnExceptionContinueToRouteTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/OnExceptionContinueToRouteTest.xml?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/OnExceptionContinueToRouteTest.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/OnExceptionContinueToRouteTest.xml Wed May 12 15:57:20 2010
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <bean id="forced" class="java.lang.IllegalArgumentException">
+        <constructor-arg index="0" value="Forced"/>
+    </bean>
+
+    <!-- START SNIPPET: e1 -->
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+        <onException>
+            <exception>java.lang.IllegalArgumentException</exception>
+            <!-- tell Camel to handle and continue when this exception was thrown -->
+            <continued><constant>true</constant></continued>
+            <!-- but route it to this mock before we continue -->
+            <to uri="mock:catch"/>
+        </onException>
+
+        <route>
+            <from uri="direct:a"/>
+            <to uri="mock:a"/>
+            <to uri="direct:b"/>
+            <to uri="direct:c"/>
+        </route>
+
+        <route>
+            <from uri="direct:b"/>
+            <to uri="mock:b"/>
+            <throwException ref="forced"/>
+        </route>
+
+        <route>
+            <from uri="direct:c"/>
+            <to uri="mock:c"/>
+        </route>
+
+    </camelContext>
+    <!-- END SNIPPET: e1 -->
+
+</beans>

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

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

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

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubRouteTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubRouteTest.xml?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubRouteTest.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubRouteTest.xml Wed May 12 15:57:20 2010
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <bean id="forced" class="java.lang.IllegalArgumentException">
+        <constructor-arg index="0" value="Forced"/>
+    </bean>
+
+    <!-- START SNIPPET: e1 -->
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+        <onException>
+            <exception>java.lang.IllegalArgumentException</exception>
+            <!-- tell Camel to handle and continue when this exception was thrown -->
+            <continued><constant>true</constant></continued>
+        </onException>
+
+        <route>
+            <from uri="direct:start"/>
+            <to uri="mock:start"/>
+            <to uri="direct:b"/>
+            <to uri="direct:c"/>
+            <to uri="mock:result"/>
+        </route>
+
+        <route>
+            <from uri="direct:b"/>
+            <to uri="mock:b"/>
+            <throwException ref="forced"/>
+        </route>
+
+        <route>
+            <from uri="direct:c"/>
+            <to uri="mock:c"/>
+        </route>
+
+    </camelContext>
+    <!-- END SNIPPET: e1 -->
+
+</beans>

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

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

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

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubSubRouteTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubSubRouteTest.xml?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubSubRouteTest.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueSubSubRouteTest.xml Wed May 12 15:57:20 2010
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <bean id="forced" class="java.lang.IllegalArgumentException">
+        <constructor-arg index="0" value="Forced"/>
+    </bean>
+
+    <!-- START SNIPPET: e1 -->
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+        <onException>
+            <exception>java.lang.IllegalArgumentException</exception>
+            <!-- tell Camel to handle and continue when this exception was thrown -->
+            <continued><constant>true</constant></continued>
+        </onException>
+
+        <route>
+            <from uri="direct:start"/>
+            <to uri="mock:start"/>
+            <to uri="direct:b"/>
+            <to uri="direct:d"/>
+            <to uri="mock:result"/>
+        </route>
+
+        <route>
+            <from uri="direct:b"/>
+            <to uri="mock:b"/>
+            <throwException ref="forced"/>
+            <to uri="direct:c"/>
+        </route>
+
+        <route>
+            <from uri="direct:c"/>
+            <to uri="mock:c"/>
+        </route>
+
+        <route>
+            <from uri="direct:d"/>
+            <to uri="mock:d"/>
+        </route>
+
+    </camelContext>
+    <!-- END SNIPPET: e1 -->
+
+</beans>

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

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

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

Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueTest.xml (from r943471, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueTest.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueTest.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.xml&r1=943471&r2=943561&rev=943561&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalBodyTest.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionContinueTest.xml Wed May 12 15:57:20 2010
@@ -22,47 +22,27 @@
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
 
-    <bean id="deadLetter" class="org.apache.camel.builder.DeadLetterChannelBuilder">
-        <property name="deadLetterUri" value="mock:dead"/>
-        <property name="redeliveryPolicy" ref="myRedeliveryPolicy"/>
-        <property name="handled" value="false"/>
+    <bean id="forced" class="java.lang.IllegalArgumentException">
+        <constructor-arg index="0" value="Forced"/>
     </bean>
 
-    <bean id="myRedeliveryPolicy" class="org.apache.camel.processor.RedeliveryPolicy">
-        <property name="redeliveryDelay" value="0"/>
-        <property name="logStackTrace" value="false"/>
-        <property name="maximumRedeliveries" value="0"/>
-    </bean>
-
-    <bean id="procA" class="org.apache.camel.processor.onexception.OnExceptionUseOriginalBodyTest$MyThrowProcessor">
-        <property name="camelException" value="false"/>
-    </bean>
-
-    <bean id="procB" class="org.apache.camel.processor.onexception.OnExceptionUseOriginalBodyTest$MyThrowProcessor">
-        <property name="camelException" value="true"/>
-    </bean>
+    <!-- START SNIPPET: e1 -->
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
 
-    <camelContext errorHandlerRef="deadLetter" xmlns="http://camel.apache.org/schema/spring">
-
-        <onException useOriginalMessage="true">
+        <onException>
             <exception>java.lang.IllegalArgumentException</exception>
-            <redeliveryPolicy maximumRedeliveries="2"/>
-            <handled><constant>true</constant></handled>
-            <to uri="mock:a"/>
+            <!-- tell Camel to handle and continue when this exception was thrown -->
+            <continued><constant>true</constant></continued>
         </onException>
 
         <route>
-            <from uri="direct:a"/>
-            <setBody><simple>${in.body} World</simple></setBody>
-            <process ref="procA"/>
-        </route>
-
-        <route>
-            <from uri="direct:b"/>
-            <setBody><simple>${in.body} World</simple></setBody>
-            <process ref="procB"/>
+            <from uri="direct:start"/>
+            <to uri="mock:start"/>
+            <throwException ref="forced"/>
+            <to uri="mock:result"/>
         </route>
 
     </camelContext>
+    <!-- END SNIPPET: e1 -->
 
 </beans>

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionWithRouteAndContinueTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionWithRouteAndContinueTest.xml?rev=943561&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionWithRouteAndContinueTest.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/OnExceptionWithRouteAndContinueTest.xml Wed May 12 15:57:20 2010
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <bean id="forced" class="java.lang.IllegalArgumentException">
+        <constructor-arg index="0" value="Forced"/>
+    </bean>
+
+    <!-- START SNIPPET: e1 -->
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+        <onException>
+            <exception>java.lang.IllegalArgumentException</exception>
+            <!-- tell Camel to handle and continue when this exception was thrown -->
+            <continued><constant>true</constant></continued>
+            <!-- but route it to this mock before we continue -->
+            <to uri="mock:catch"/>
+        </onException>
+
+        <route>
+            <from uri="direct:start"/>
+            <to uri="mock:start"/>
+            <throwException ref="forced"/>
+            <to uri="mock:result"/>
+        </route>
+
+    </camelContext>
+    <!-- END SNIPPET: e1 -->
+
+</beans>

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

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

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



Mime
View raw message