You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2011/01/11 18:38:35 UTC

svn commit: r1057756 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/component/seda/SedaConsumer.java main/java/org/apache/camel/processor/ThroughputLogger.java test/java/org/apache/camel/issues/ErrorHandlerAdviceIssueTest.java

Author: davsclaus
Date: Tue Jan 11 17:38:34 2011
New Revision: 1057756

URL: http://svn.apache.org/viewvc?rev=1057756&view=rev
Log:
Polished

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ErrorHandlerAdviceIssueTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java?rev=1057756&r1=1057755&r2=1057756&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java Tue Jan 11 17:38:34 2011
@@ -212,8 +212,10 @@ public class SedaConsumer extends Servic
         // must shutdown executor on stop to avoid overhead of having them running
         // use shutdown now to force the tasks which are polling for new exchanges
         // to stop immediately to avoid them picking up new exchanges arriving in the mean time
-        endpoint.getCamelContext().getExecutorServiceStrategy().shutdownNow(executor);
-        executor = null;
+        if (executor != null) {
+            endpoint.getCamelContext().getExecutorServiceStrategy().shutdownNow(executor);
+            executor = null;
+        }
     }
 
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java?rev=1057756&r1=1057755&r2=1057756&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ThroughputLogger.java Tue Jan 11 17:38:34 2011
@@ -188,6 +188,7 @@ public class ThroughputLogger extends Lo
     public void stop() throws Exception {
         if (logSchedulerService != null) {
             camelContext.getExecutorServiceStrategy().shutdownNow(logSchedulerService);
+            logSchedulerService = null;
         }
     }
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ErrorHandlerAdviceIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ErrorHandlerAdviceIssueTest.java?rev=1057756&r1=1057755&r2=1057756&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ErrorHandlerAdviceIssueTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ErrorHandlerAdviceIssueTest.java Tue Jan 11 17:38:34 2011
@@ -54,6 +54,8 @@ public class ErrorHandlerAdviceIssueTest
         getMockEndpoint("mock:foo").expectedMessageCount(0);
 
         // TODO: stop timer route causes the test to fail
+        // we will revisit this in Camel 3.0 where interceptors/cross cutting concerns
+        // is applied at runtime
         // context.stopRoute("timer");
 
         template.sendBody("direct:start", "Hello World");