camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r710133 - in /activemq/camel/branches/camel-1.x: ./ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/component/log/ camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/main/java/org/apa...
Date Mon, 03 Nov 2008 19:14:32 GMT
Author: janstey
Date: Mon Nov  3 11:14:30 2008
New Revision: 710133

URL: http://svn.apache.org/viewvc?rev=710133&view=rev
Log:
Merged revisions 708553-709447,709449-709612,709614-709634,709636-709849,709851-710013 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r708553 | janstey | 2008-10-28 09:50:41 -0230 (Tue, 28 Oct 2008) | 1 line
  
  Changing test port that conflicts on some systems
........
  r708581 | gertv | 2008-10-28 11:56:44 -0230 (Tue, 28 Oct 2008) | 1 line
  
  CAMEL-122: Enabling Spring tests for Camel error handling
........
  r708585 | hadrian | 2008-10-28 12:04:04 -0230 (Tue, 28 Oct 2008) | 2 lines
  
  Remove println call.
........
  r708879 | jstrachan | 2008-10-29 08:53:27 -0230 (Wed, 29 Oct 2008) | 1 line
  
  added a fix for CAMEL-1033 making it easy to create a JMS MessageListener for processing by Camel - along with helper methods to make a Processor from a ProducerTemplate
........
  r709164 | janstey | 2008-10-30 11:45:53 -0230 (Thu, 30 Oct 2008) | 3 lines
  
  CAMEL-1036 - Adding retriesExhaustedLogLevel and retryAttemptedLogLevel methods on onException.
........
  r709173 | janstey | 2008-10-30 12:02:55 -0230 (Thu, 30 Oct 2008) | 3 lines
  
  CAMEL-1034 - Fix issue with the StreamResequencer. Many thanks to Martin Krasser for providing the patch for this!
........
  r709209 | janstey | 2008-10-30 14:32:37 -0230 (Thu, 30 Oct 2008) | 1 line
  
  CAMEL-1036 - Adding Spring test case and improving some javadoc
........
  r709214 | davsclaus | 2008-10-30 14:50:37 -0230 (Thu, 30 Oct 2008) | 1 line
  
  Polished javadoc and removed unused import
........
  r709512 | janstey | 2008-10-31 15:33:54 -0230 (Fri, 31 Oct 2008) | 3 lines
  
  CAMEL-1039 - Adding support to trace out messages.
........
  r709518 | janstey | 2008-10-31 15:43:15 -0230 (Fri, 31 Oct 2008) | 1 line
  
  CAMEL-1039 - Fix wiki snippet tag
........
  r709522 | janstey | 2008-10-31 15:58:40 -0230 (Fri, 31 Oct 2008) | 1 line
  
  CAMEL-1039 - Adding Spring test case for the new tracer configuration options
........
  r710013 | davsclaus | 2008-11-03 02:33:32 -0330 (Mon, 03 Nov 2008) | 1 line
  
  Align trace formatter
........

Added:
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/ProducerTemplateProcessor.java
      - copied unchanged from r709214, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ProducerTemplateProcessor.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/LoggingLevel.java
      - copied unchanged from r709214, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoggingLevel.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/CustomLog.java
      - copied unchanged from r709214, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/CustomLog.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderWithRetryLoggingLevelSetTest.java
      - copied unchanged from r709214, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderWithRetryLoggingLevelSetTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/builder/MyExceptionThrowingProcessor.java
      - copied unchanged from r709214, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyExceptionThrowingProcessor.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorWithOutBodyTraceTest.java
      - copied unchanged from r709522, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorWithOutBodyTraceTest.java
    activemq/camel/branches/camel-1.x/components/camel-jms/src/main/java/org/apache/camel/component/jms/CamelMessageListener.java
      - copied unchanged from r709214, activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/CamelMessageListener.java
    activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceInterceptorWithOutBodyTraceTest.java
      - copied unchanged from r709522, activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceInterceptorWithOutBodyTraceTest.java
    activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringExceptionBuilderWithRetryLoggingLevelSetTest.java
      - copied unchanged from r709214, activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringExceptionBuilderWithRetryLoggingLevelSetTest.java
    activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/exceptionBuilderWithRetryLoggingLevelSet.xml
      - copied unchanged from r709214, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/exceptionBuilderWithRetryLoggingLevelSet.xml
    activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/traceInterceptorWithOutBodyTrace.xml
      - copied unchanged from r709522, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/traceInterceptorWithOutBodyTrace.xml
Removed:
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/LoggingLevel.java
    activemq/camel/branches/camel-1.x/components/camel-jms/src/main/java/org/apache/camel/component/jms/MessageListenerProcessor.java
Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RoutesType.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/Logger.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/LoggingErrorHandler.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/StreamResequencer.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java
    activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/TracerConfigurationTest.java
    activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/aggregator/PredicateAggregatorCollectionTest.java
    activemq/camel/branches/camel-1.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
    activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java
    activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java
    activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov  3 11:14:30 2008
@@ -1 +1 @@
-/activemq/camel/trunk:1-708421
+/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-709849,709851-710013

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java Mon Nov  3 11:14:30 2008
@@ -23,7 +23,7 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.NoSuchEndpointException;
-import org.apache.camel.processor.LoggingLevel;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.SendProcessor;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java Mon Nov  3 11:14:30 2008
@@ -18,10 +18,10 @@
 
 import org.apache.camel.Expression;
 import org.apache.camel.Processor;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.DeadLetterChannel;
 import org.apache.camel.processor.ErrorHandlerSupport;
 import org.apache.camel.processor.Logger;
-import org.apache.camel.processor.LoggingLevel;
 import org.apache.camel.processor.RecipientList;
 import org.apache.camel.processor.RedeliveryPolicy;
 import org.apache.camel.processor.exceptionpolicy.ExceptionPolicyStrategy;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java Mon Nov  3 11:14:30 2008
@@ -17,9 +17,9 @@
 package org.apache.camel.builder;
 
 import org.apache.camel.Processor;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.Logger;
 import org.apache.camel.processor.LoggingErrorHandler;
-import org.apache.camel.processor.LoggingLevel;
 import org.apache.camel.spi.RouteContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java Mon Nov  3 11:14:30 2008
@@ -134,7 +134,7 @@
      * Adds an exception handler route for the given exception type
      */
     public ExceptionType onException(Class exceptionType) {
-        return routeCollection.exception(exceptionType);
+        return routeCollection.onException(exceptionType);
     }
 
     /**

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java Mon Nov  3 11:14:30 2008
@@ -23,8 +23,8 @@
 import org.apache.camel.converter.ObjectConverter;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.impl.ProcessorEndpoint;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.Logger;
-import org.apache.camel.processor.LoggingLevel;
 import org.apache.camel.processor.ThroughputLogger;
 import org.apache.camel.util.IntrospectionSupport;
 

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java Mon Nov  3 11:14:30 2008
@@ -30,6 +30,7 @@
 import org.apache.camel.Producer;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.CamelContextHelper;
 import static org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException;
 
 /**
@@ -46,6 +47,11 @@
     private final Map<String, Endpoint<E>> endpointCache = new HashMap<String, Endpoint<E>>();
     private Endpoint<E> defaultEndpoint;
 
+    public static DefaultProducerTemplate newInstance(CamelContext camelContext, String defaultEndpointUri) {
+        Endpoint endpoint = CamelContextHelper.getMandatoryEndpoint(camelContext, defaultEndpointUri);
+        return new DefaultProducerTemplate(camelContext, endpoint);
+    }
+
     public DefaultProducerTemplate(CamelContext context) {
         this.context = context;
     }

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java Mon Nov  3 11:14:30 2008
@@ -16,8 +16,8 @@
  */
 package org.apache.camel.impl;
 
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.Logger;
-import org.apache.camel.processor.LoggingLevel;
 import org.apache.camel.spi.ExceptionHandler;
 import org.apache.commons.logging.LogFactory;
 

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java Mon Nov  3 11:14:30 2008
@@ -29,7 +29,6 @@
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.ExpressionClause;
-import org.apache.camel.impl.converter.DefaultTypeConverter;
 import org.apache.camel.processor.ChoiceProcessor;
 import org.apache.camel.processor.FilterProcessor;
 import org.apache.camel.spi.RouteContext;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java Mon Nov  3 11:14:30 2008
@@ -159,7 +159,17 @@
         getOrCreateRedeliveryPolicy().initialRedeliveryDelay(initialRedeliveryDelay);
         return this;
     }
+    
+    public ExceptionType retriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
+        getOrCreateRedeliveryPolicy().retriesExhaustedLogLevel(retriesExhaustedLogLevel);
+        return this;
+    }
 
+    public ExceptionType retryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel) {
+        getOrCreateRedeliveryPolicy().retryAttemptedLogLevel(retryAttemptedLogLevel);
+        return this;
+    }
+    
     public ExceptionType maximumRedeliveries(int maximumRedeliveries) {
         getOrCreateRedeliveryPolicy().maximumRedeliveries(maximumRedeliveries);
         return this;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java Mon Nov  3 11:14:30 2008
@@ -131,8 +131,7 @@
     }
 
     /**
-     * Sends the exchange to a list of endpoints using the
-     * {@link org.apache.camel.processor.MulticastProcessor} pattern
+     * Sends the exchange to a list of endpoints
      */
     public Type to(String... uris) {
         for (String uri : uris) {
@@ -142,8 +141,7 @@
     }
 
     /**
-     * Sends the exchange to a list of endpoints using the
-     * {@link org.apache.camel.processor.MulticastProcessor} pattern
+     * Sends the exchange to a list of endpoints
      */
     public Type to(Endpoint... endpoints) {
         for (Endpoint endpoint : endpoints) {
@@ -153,8 +151,7 @@
     }
 
     /**
-     * Sends the exchange to a list of endpoint using the
-     * {@link org.apache.camel.processor.MulticastProcessor} pattern
+     * Sends the exchange to a list of endpoint
      */
     public Type to(Collection<Endpoint> endpoints) {
         for (Endpoint endpoint : endpoints) {

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java Mon Nov  3 11:14:30 2008
@@ -45,6 +45,10 @@
     private Boolean useCollisionAvoidance;
     @XmlAttribute
     private Long maximumRedeliveryDelay;
+    @XmlAttribute
+    private LoggingLevel retriesExhaustedLogLevel;
+    @XmlAttribute
+    private LoggingLevel retryAttemptedLogLevel;
 
     public RedeliveryPolicy createRedeliveryPolicy(RedeliveryPolicy parentPolicy) {
         RedeliveryPolicy answer =  parentPolicy.copy();
@@ -56,6 +60,12 @@
         if (initialRedeliveryDelay != null) {
             answer.setDelay(initialRedeliveryDelay);
         }
+        if (retriesExhaustedLogLevel != null) {
+            answer.setRetriesExhaustedLogLevel(retriesExhaustedLogLevel);
+        }
+        if (retryAttemptedLogLevel != null) {
+            answer.setRetryAttemptedLogLevel(retryAttemptedLogLevel);
+        }
         if (backOffMultiplier != null) {
             answer.setBackOffMultiplier(backOffMultiplier);
         }
@@ -100,6 +110,16 @@
         return this;
     }
 
+    public RedeliveryPolicyType retriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
+        setRetriesExhaustedLogLevel(retriesExhaustedLogLevel);
+        return this;
+    }    
+    
+    public RedeliveryPolicyType retryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel) {
+        setRetryAttemptedLogLevel(retryAttemptedLogLevel);
+        return this;
+    }
+        
     public RedeliveryPolicyType maximumRedeliveries(int maximumRedeliveries) {
         setMaximumRedeliveries(maximumRedeliveries);
         return this;
@@ -178,4 +198,21 @@
     public void setMaximumRedeliveryDelay(Long maximumRedeliveryDelay) {
         this.maximumRedeliveryDelay = maximumRedeliveryDelay;
     }
+
+    private void setRetriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
+        this.retriesExhaustedLogLevel = retriesExhaustedLogLevel;
+    }
+
+    private LoggingLevel getRetriesExhaustedLogLevel() {
+        return retriesExhaustedLogLevel;
+    } 
+
+    private void setRetryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel) {
+        this.retryAttemptedLogLevel = retryAttemptedLogLevel;
+    }
+
+    private LoggingLevel getRetryAttemptedLogLevel() {
+        return retryAttemptedLogLevel;
+    }     
+   
 }

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RoutesType.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RoutesType.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RoutesType.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/model/RoutesType.java Mon Nov  3 11:14:30 2008
@@ -192,7 +192,7 @@
         return answer.when(predicate);
     }
 
-    public ExceptionType exception(Class exceptionType) {
+    public ExceptionType onException(Class exceptionType) {
         ExceptionType answer = new ExceptionType(exceptionType);
         getExceptions().add(answer);
         return answer;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java Mon Nov  3 11:14:30 2008
@@ -26,6 +26,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.impl.converter.AsyncProcessorTypeConverter;
 import org.apache.camel.model.ExceptionType;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.exceptionpolicy.ExceptionPolicyStrategy;
 import org.apache.camel.util.AsyncProcessorHelper;
 import org.apache.camel.util.ServiceHelper;
@@ -120,9 +121,6 @@
                 // set the original caused exception
                 exchange.setProperty(EXCEPTION_CAUSE_PROPERTY, e);
 
-                logger.log("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". On delivery attempt: " + data.redeliveryCounter + " caught: " + e, e);
-                data.redeliveryCounter = incrementRedeliveryCounter(exchange, e);
-
                 // find the error handler to use (if any)
                 ExceptionType exceptionPolicy = getExceptionPolicy(exchange, e);
                 if (exceptionPolicy != null) {
@@ -131,8 +129,11 @@
                     Processor processor = exceptionPolicy.getErrorHandler();
                     if (processor != null) {
                         data.failureProcessor = processor;
-                    }
+                    }                    
                 }
+                
+                logFailedDelivery("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". On delivery attempt: " + data.redeliveryCounter + " caught: " + e, data, e);
+                data.redeliveryCounter = incrementRedeliveryCounter(exchange, e);
             }
 
             // should we redeliver or not?
@@ -153,7 +154,7 @@
 
                 // The line below shouldn't be needed, it is invoked by the AsyncCallback above
                 //restoreExceptionOnExchange(exchange, data.handledPredicate);
-                logger.log("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". Handled by the failure processor: " + data.failureProcessor);
+                logFailedDelivery("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". Handled by the failure processor: " + data.failureProcessor, data, null);
                 return sync;
             }
 
@@ -199,6 +200,20 @@
 
     }
 
+    private void logFailedDelivery(String message, RedeliveryData data, Throwable e) {
+        LoggingLevel newLogLevel = null;
+        if (data.currentRedeliveryPolicy.shouldRedeliver(data.redeliveryCounter)) {
+            newLogLevel = data.currentRedeliveryPolicy.getRetryAttemptedLogLevel();
+        } else {
+            newLogLevel = data.currentRedeliveryPolicy.getRetriesExhaustedLogLevel();
+        }
+        if (e != null) {
+            logger.log(message, e, newLogLevel);
+        } else {
+            logger.log(message, newLogLevel);
+        }
+    }
+
     public static boolean isFailureHandled(Exchange exchange) {
         return exchange.getProperty(FAILURE_HANDLED_PROPERTY) != null;
     }

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/Logger.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/Logger.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/Logger.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/Logger.java Mon Nov  3 11:14:30 2008
@@ -19,6 +19,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.impl.DefaultExchangeFormatter;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.interceptor.ExchangeFormatter;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -139,6 +140,13 @@
         }
     }
 
+    public void log(String message, LoggingLevel loggingLevel) {
+        LoggingLevel oldLogLevel = getLevel();
+        setLevel(loggingLevel);
+        log(message);
+        setLevel(oldLogLevel);
+    }
+    
     public void log(String message) {
         switch (level) {
         case DEBUG:
@@ -176,6 +184,13 @@
         }
     }
 
+    public void log(String message, Throwable exception, LoggingLevel loggingLevel) {
+        LoggingLevel oldLogLevel = getLevel();
+        setLevel(loggingLevel);
+        log(message, exception);
+        setLevel(oldLogLevel);
+    }   
+    
     public void log(String message, Throwable exception) {
         switch (level) {
         case DEBUG:

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/LoggingErrorHandler.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/LoggingErrorHandler.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/LoggingErrorHandler.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/LoggingErrorHandler.java Mon Nov  3 11:14:30 2008
@@ -18,6 +18,7 @@
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.util.ServiceHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/RedeliveryPolicy.java Mon Nov  3 11:14:30 2008
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 import java.util.Random;
 
+import org.apache.camel.model.LoggingLevel;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -30,7 +31,7 @@
  * href="http://activemq.apache.org/camel/dead-letter-channel.html">Dead Letter
  * Channel</a>
  * <p>
- * The default values is:
+ * The default values are:
  * <ul>
  *   <li>maximumRedeliveries = 5</li>
  *   <li>delay = 1000L (the initial delay)</li>
@@ -39,6 +40,8 @@
  *   <li>useExponentialBackOff = false</li>
  *   <li>collisionAvoidanceFactor = 0.15d</li>
  *   <li>useCollisionAvoidance = false</li>
+ *   <li>retriesExhaustedLogLevel = LoggingLevel.ERROR</li>
+ *   <li>retryAttemptedLogLevel = LoggingLevel.ERROR</li>
  * </ul>
  * <p/>
  * Setting the maximumRedeliveries to a negative value such as -1 will then always redeliver (unlimited).
@@ -57,6 +60,8 @@
     // +/-15% for a 30% spread -cgs
     protected double collisionAvoidanceFactor = 0.15d;
     protected boolean useCollisionAvoidance;
+    protected LoggingLevel retriesExhaustedLogLevel = LoggingLevel.ERROR;
+    protected LoggingLevel retryAttemptedLogLevel = LoggingLevel.ERROR;
 
     public RedeliveryPolicy() {
     }
@@ -66,6 +71,8 @@
         return "RedeliveryPolicy[maximumRedeliveries=" + maximumRedeliveries
             + ", initialRedeliveryDelay=" + delay
             + ", maximumRedeliveryDelay=" + maximumRedeliveryDelay
+            + ", retriesExhaustedLogLevel=" + retriesExhaustedLogLevel
+            + ", retryAttemptedLogLevel=" + retryAttemptedLogLevel
             + ", useExponentialBackOff="  + useExponentialBackOff
             + ", backOffMultiplier=" + backOffMultiplier
             + ", useCollisionAvoidance=" + useCollisionAvoidance
@@ -88,7 +95,7 @@
         if (getMaximumRedeliveries() < 0) {
             return true;
         }
-        // redeliver until we hitted the max
+        // redeliver until we hit the max
         return redeliveryCounter <= getMaximumRedeliveries();
     }
 
@@ -213,6 +220,22 @@
         return this;
     }
 
+    /**
+     * Sets the logging level to use for log messages when retries have been exhausted.
+     */
+    public RedeliveryPolicy retriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
+        setRetriesExhaustedLogLevel(retriesExhaustedLogLevel);
+        return this;
+    }    
+
+    /**
+     * Sets the logging level to use for log messages when retries are attempted.
+     */    
+    public RedeliveryPolicy retryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel) {
+        setRetryAttemptedLogLevel(retryAttemptedLogLevel);
+        return this;
+    }    
+    
     // Properties
     // -------------------------------------------------------------------------
     public double getBackOffMultiplier() {
@@ -321,4 +344,26 @@
         }
         return randomNumberGenerator;
     }
+
+    /**
+     * Sets the logging level to use for log messages when retries have been exhausted.
+     */    
+    public void setRetriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
+        this.retriesExhaustedLogLevel = retriesExhaustedLogLevel;        
+    }
+    
+    public LoggingLevel getRetriesExhaustedLogLevel() {
+        return retriesExhaustedLogLevel;
+    }
+
+    /**
+     * Sets the logging level to use for log messages when retries are attempted.
+     */    
+    public void setRetryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel) {
+        this.retryAttemptedLogLevel = retryAttemptedLogLevel;
+    }
+
+    public LoggingLevel getRetryAttemptedLogLevel() {
+        return retryAttemptedLogLevel;
+    }
 }

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/StreamResequencer.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/StreamResequencer.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/StreamResequencer.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/StreamResequencer.java Mon Nov  3 11:14:30 2008
@@ -200,7 +200,7 @@
     }
 
     public void process(Exchange exchange) throws Exception {
-        // empty since exchanges come from endpoint's polling consumer
+        engine.insert(exchange);
     }
 
 }
\ No newline at end of file

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java Mon Nov  3 11:14:30 2008
@@ -20,6 +20,7 @@
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.Exchange;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.commons.logging.Log;
 
 /**

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java Mon Nov  3 11:14:30 2008
@@ -33,20 +33,22 @@
     private boolean showExchangePattern = true;
     private boolean showProperties = true;
     private boolean showHeaders = true;
-    private boolean showBody = true;
+    private boolean showBody = true;    
     private boolean showBodyType = true;
+    private boolean showOutBody = false;    
+    private boolean showOutBodyType = false;
     private boolean showException = true;
 
     public Object format(TraceInterceptor interceptor, Exchange exchange) {
         Message in = exchange.getIn();
+       
+        // false because we don't want to introduce side effects
+        Message out = exchange.getOut(false); 
+        
         Throwable exception = exchange.getException();
         StringBuilder sb = new StringBuilder();
-        if (showBreadCrumb || showExchangeId) {
-            sb.append(getBreadCrumbID(exchange)).append(" ");
-        }
-        if (showNode) {
-            sb.append("-> ").append(getNodeMessage(interceptor)).append(" ");
-        }
+        sb.append(getExchangeAndNode(interceptor, exchange));
+        
         if (showExchangePattern) {
             sb.append(", Pattern:").append(exchange.getPattern()).append(" ");
         }
@@ -64,6 +66,12 @@
         if (showBody) {
             sb.append(", Body:").append(getBodyAsString(in)).append(" ");
         }
+        if (showOutBodyType && out != null) {
+            sb.append(", OutBodyType:").append(getBodyTypeAsString(out)).append(" ");
+        }
+        if (showOutBody && out != null) {
+            sb.append(", OutBody:").append(getBodyAsString(out)).append(" ");
+        }        
         if (showException && exception != null) {
             sb.append(", Exception:").append(exception);
         }
@@ -87,6 +95,22 @@
         this.showBodyType = showBodyType;
     }
 
+    public void setShowOutBody(boolean showOutBody) {
+        this.showOutBody = showOutBody;
+    }
+
+    public boolean isShowOutBody() {
+        return showOutBody;
+    }    
+    
+    public void setShowOutBodyType(boolean showOutBodyType) {
+        this.showOutBodyType = showOutBodyType;
+    }
+
+    public boolean isShowOutBodyType() {
+        return showOutBodyType;
+    }    
+    
     public boolean isShowBreadCrumb() {
         return showBreadCrumb;
     }
@@ -151,6 +175,10 @@
     }
 
     protected Object getBodyAsString(Message in) {
+        if (in == null) {
+            return null;
+        }
+        
         StreamCache newBody = null;
         try {
             newBody = in.getBody(StreamCache.class);
@@ -176,6 +204,9 @@
     }
 
     protected Object getBodyTypeAsString(Message message) {
+        if (message == null) {
+            return null;
+        }
         String answer = ObjectHelper.classCanonicalName(message.getBody());
         if (answer != null && answer.startsWith("java.lang.")) {
             return answer.substring(10);
@@ -185,7 +216,34 @@
 
     protected String getNodeMessage(TraceInterceptor interceptor) {
         String message = interceptor.getNode().getShortName() + "(" + interceptor.getNode().getLabel() + ")";
-        return String.format("%1$-25s", message);
+        return String.format("%1$-25.25s", message);
+    }
+    
+    /**
+     * Returns the exchange id and node, ordered based on whether this was a trace of
+     * an exchange coming out of or into a processing step. For example, 
+     * <br/><tt>transform(body) -> ID-mojo/39713-1225468755256/2-0</tt>
+     * <br/>or
+     * <br/><tt>ID-mojo/39713-1225468755256/2-0 -> transform(body)</tt>
+     */
+    protected String getExchangeAndNode(TraceInterceptor interceptor, Exchange exchange) {
+        String id = "";
+        String node = "";
+        String result;
+        
+        if (showBreadCrumb || showExchangeId) {
+            id = getBreadCrumbID(exchange).toString();
+        }
+        if (showNode) {
+            node = getNodeMessage(interceptor);
+        }
+        if (interceptor.shouldTraceOutExchanges() && exchange.getOut(false) != null) {
+            result = node.trim() + " -> " + id.trim();
+        } else {
+            result = id.trim() + " -> " + node.trim();
+        }
+        
+        // we want to ensure text coming after this is aligned for readability
+        return String.format("%1$-65.65s", result);
     }
-
 }

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java Mon Nov  3 11:14:30 2008
@@ -82,6 +82,9 @@
                 logExchange(exchange);
             }
             super.proceed(exchange);
+            if (tracer.isTraceOutExchanges() && shouldLogNode(node) && shouldLogExchange(exchange)) {
+                logExchange(exchange);
+            }            
         } catch (Exception e) {
             if (shouldLogException(exchange)) {
                 logException(exchange, e);
@@ -135,7 +138,13 @@
         return tracer.isTraceExceptions();
     }
 
-
+    /**
+     * Returns whether exchanges coming out of processors should be traced
+     */   
+    public boolean shouldTraceOutExchanges() {
+        return tracer.isTraceOutExchanges();
+    }
+    
     /**
      * Returns true if the given node should be logged in the trace list
      */

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/Tracer.java Mon Nov  3 11:14:30 2008
@@ -23,8 +23,8 @@
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.model.ProcessorType;
-import org.apache.camel.processor.LoggingLevel;
 import org.apache.camel.spi.InterceptStrategy;
 
 /**
@@ -41,7 +41,8 @@
     private Predicate<Exchange> traceFilter;
     private boolean traceInterceptors;
     private boolean traceExceptions = true;
-
+    private boolean traceOutExchanges = false;
+    
     /**
      * A helper method to return the Tracer instance for a given {@link CamelContext} if one is enabled
      *
@@ -89,7 +90,7 @@
     }
 
     /**
-     * Sets wether interceptors should be traced or not
+     * Sets whether interceptors should be traced or not
      */
     public void setTraceInterceptors(boolean traceInterceptors) {
         this.traceInterceptors = traceInterceptors;
@@ -111,7 +112,7 @@
     }
 
     /**
-     * Sets the logging level to ouput tracing. Will default use <tt>INFO</tt> level.
+     * Sets the logging level to output tracing. Will use <tt>INFO</tt> level by default.
      */
     public void setLogLevel(LoggingLevel logLevel) {
         this.logLevel = logLevel;
@@ -122,7 +123,7 @@
     }
 
     /**
-     * Sets wether thrown exceptions should be traced
+     * Sets whether thrown exceptions should be traced
      */
     public void setTraceExceptions(boolean traceExceptions) {
         this.traceExceptions = traceExceptions;
@@ -139,4 +140,15 @@
     public void setLogName(String logName) {
         this.logName = logName;
     }
+
+    /**
+     * Sets whether exchanges coming out of processors should be traced
+     */    
+    public void setTraceOutExchanges(boolean traceOutExchanges) {
+        this.traceOutExchanges = traceOutExchanges;
+    }
+    
+    public boolean isTraceOutExchanges() {
+        return traceOutExchanges;
+    }
 }
\ No newline at end of file

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java Mon Nov  3 11:14:30 2008
@@ -53,9 +53,6 @@
  * element needs <code>timeout</code> milliseconds in any case for becoming
  * <i>ready-for-delivery</i>.
  * <p>
- * <strong>Note:</strong> Instances of this class are not thread-safe.
- * Resequencing should be done by calling {@link #insert(Object)} and
- * {@link #deliver()} or {@link #deliverNext()} from a single thread.
  *
  * @author Martin Krasser
  *
@@ -117,7 +114,7 @@
      *
      * @return the number of elements currently maintained by this resequencer.
      */
-    public int size() {
+    public synchronized int size() {
         return sequence.size();
     }
 
@@ -186,7 +183,7 @@
      *
      * @param o an element.
      */
-    public void insert(E o) {
+    public synchronized void insert(E o) {
         // wrap object into internal element
         Element<E> element = new Element<E>(o);
         // add element to sequence in proper order
@@ -217,7 +214,7 @@
      *
      * @see ResequencerEngine#deliverNext() 
      */
-    public void deliver() throws Exception {
+    public synchronized void deliver() throws Exception {
         while (deliverNext()) {
             // do nothing here
         }

Modified: activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/main/resources/org/apache/camel/model/jaxb.index Mon Nov  3 11:14:30 2008
@@ -31,6 +31,7 @@
 InterceptorRef
 InterceptorType
 LoadBalanceType
+LoggingLevel
 LoopType
 MarshalType
 MulticastType

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java Mon Nov  3 11:14:30 2008
@@ -28,7 +28,7 @@
 import org.apache.camel.util.jndi.JndiContext;
 
 /**
- * Unit test of bean can propogate headers in a pipleline
+ * Unit test of bean can propagate headers in a pipeline
  */
 public class BeanPipelineTest extends ContextTestSupport {
 

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java Mon Nov  3 11:14:30 2008
@@ -22,6 +22,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.LoggingLevel;
 
 /**
  * @version $Revision$

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java Mon Nov  3 11:14:30 2008
@@ -23,6 +23,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.LoggingLevel;
 
 public class FaultRetryRouteTest extends ContextTestSupport {
     protected MockEndpoint a;

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java Mon Nov  3 11:14:30 2008
@@ -26,6 +26,7 @@
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.LoggingLevel;
 
 /**
  * @version $Revision$

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/TracerConfigurationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/TracerConfigurationTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/TracerConfigurationTest.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/TracerConfigurationTest.java Mon Nov  3 11:14:30 2008
@@ -19,6 +19,7 @@
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.LoggingLevel;
 import org.apache.camel.processor.interceptor.Tracer;
 
 /**

Modified: activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/aggregator/PredicateAggregatorCollectionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/aggregator/PredicateAggregatorCollectionTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/aggregator/PredicateAggregatorCollectionTest.java (original)
+++ activemq/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/aggregator/PredicateAggregatorCollectionTest.java Mon Nov  3 11:14:30 2008
@@ -70,7 +70,7 @@
 
                 // our route is aggregating from the direct queue and sending the response to the mock
                 from("direct:start")
-                    // we use the collection based aggregator we already have configued
+                    // we use the collection based aggregator we already have configured
                     .aggregator(ag)
                     // wait for 0.5 seconds to aggregate
                     .batchTimeout(500L)

Modified: activemq/camel/branches/camel-1.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java Mon Nov  3 11:14:30 2008
@@ -40,7 +40,7 @@
         }
 
         // Boot up a local RMI registry
-        LocateRegistry.createRegistry(9876);
+        LocateRegistry.createRegistry(37541);
 
         // START SNIPPET: register
         JndiContext context = new JndiContext();
@@ -53,11 +53,11 @@
         // lets add simple route
         camelContext.addRoutes(new RouteBuilder() {
             public void configure() {
-                from("direct:hello").to("rmi://localhost:9876/bye");
+                from("direct:hello").to("rmi://localhost:37541/bye");
 
                 // When exposing an RMI endpoint, the interfaces it exposes must
                 // be configured.
-                RmiEndpoint bye = (RmiEndpoint)endpoint("rmi://localhost:9876/bye");
+                RmiEndpoint bye = (RmiEndpoint)endpoint("rmi://localhost:37541/bye");
                 bye.setRemoteInterfaces(ISay.class);
                 from(bye).to("pojo:bye");
             }

Modified: activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java Mon Nov  3 11:14:30 2008
@@ -44,8 +44,5 @@
         template.sendBody("direct:start", body);
 
         MockEndpoint.assertIsSatisfied(a, b);
-
-        System.out.println(a.getReceivedExchanges());
     }
-
 }
\ No newline at end of file

Modified: activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java Mon Nov  3 11:14:30 2008
@@ -29,16 +29,4 @@
     protected CamelContext createCamelContext() throws Exception {
         return createSpringCamelContext(this, "org/apache/camel/spring/processor/faultRoute.xml");
     }
-
-    @Override
-    public void testWithThrowFaultMessageUnhandled() throws Exception {
-        // Route cannot be configured due to lack of support for errorHandler
-        // in the xml dsl (CAMEL-122)
-    }
-
-    @Override
-    public void testWithHandleFaultMessage() throws Exception {
-        // Route cannot be configured due to lack of support for errorHandler
-        // in the xml dsl (CAMEL-122)
-    }
 }

Modified: activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml?rev=710133&r1=710132&r2=710133&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml (original)
+++ activemq/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml Mon Nov  3 11:14:30 2008
@@ -43,10 +43,42 @@
       <throwFault faultRef="ExceptionMessage"/>
       <to uri="mock:b"/>
     </route>
+    
+    <route errorHandlerRef="deadLetterErrorHandler">
+      <from uri="direct:fault" />
+      <to uri="mock:a" />
+      <throwFault faultRef="camelFault" />
+      <to uri="mock:b" />
+    </route>
+    
+    <route errorHandlerRef="deadLetterErrorHandler">
+      <from uri="direct:error" />
+      <to uri="mock:a" />
+      <interceptor ref="handleFaultProcessor">
+        <throwFault faultRef="camelFault" />
+        <to uri="mock:b" />
+      </interceptor>
+    </route>
   </camelContext>
   <!-- END SNIPPET: example -->
 
   <bean id="myFault" class="java.lang.IllegalStateException" >
   	<constructor-arg index="0" value="It makes no sense of business logic"/>
   </bean>
+  
+  <bean id="camelFault" class="org.apache.camel.CamelException" >
+    <constructor-arg value="ExceptionMessage" />
+  </bean>
+  
+  <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
+    <property name="redeliveryPolicy" ref="redeliveryPolicyConfig" />
+    <property name="defaultDeadLetterEndpointUri" value="mock:error"/>
+  </bean>
+	
+  <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
+    <property name="maximumRedeliveries" value="2" />
+  </bean>
+  
+  <bean id="handleFaultProcessor" class="org.apache.camel.processor.HandleFaultProcessor" />
+  
 </beans>



Mime
View raw message