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 2013/05/21 07:43:53 UTC
[4/8] git commit: CAMEL-6377: Optimized routing engine to reduce
stack frames in use during routing. Work in progress.
CAMEL-6377: Optimized routing engine to reduce stack frames in use during routing. Work in progress.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/50154f3b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/50154f3b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/50154f3b
Branch: refs/heads/master
Commit: 50154f3b0fc7a888f756f1bf587d19a788c537b4
Parents: 8b39786
Author: Claus Ibsen <da...@apache.org>
Authored: Mon May 20 18:57:05 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue May 21 07:43:38 2013 +0200
----------------------------------------------------------------------
.../org/apache/camel/impl/DefaultRouteContext.java | 3 +++
.../processor/interceptor/DefaultChannel.java | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/50154f3b/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
index 3bcb8e8..f0abf2c 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
@@ -155,6 +155,9 @@ public class DefaultRouteContext implements RouteContext {
CamelInternalProcessor internal = new CamelInternalProcessor(target);
internal.addTask(new CamelInternalProcessor.UnitOfWorkProcessorTask(routeId));
+ // and then in route context so we can keep track which route this is at runtime
+ internal.addTask(new CamelInternalProcessor.RouteContextTask(this));
+
// and then optionally add route policy processor if a custom policy is set
List<RoutePolicy> routePolicyList = getRoutePolicyList();
if (routePolicyList != null && !routePolicyList.isEmpty()) {
http://git-wip-us.apache.org/repos/asf/camel/blob/50154f3b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
index 69248f0..41c002d 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
@@ -164,8 +164,6 @@ public class DefaultChannel extends ServiceSupport implements ModelChannel {
this.definition = outputDefinition;
this.camelContext = routeContext.getCamelContext();
this.internalProcessor = new CamelInternalProcessor();
- // TODO: The route context task can likely be only added in DefaultRouteContext once per route
- this.internalProcessor.addTask(new CamelInternalProcessor.RouteContextTask(routeContext));
Processor target = nextProcessor;
Processor next;