Author: davsclaus Date: Wed Mar 27 17:59:47 2013 New Revision: 1461750 URL: http://svn.apache.org/r1461750 Log: CAMEL-6220: Using route policy to start and stop routes can cause RouteContextProcessor to be added multiple times
Modified: camel/branches/camel-2.10.x/ (props changed) camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Merged /camel/trunk:r1461748 Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java?rev=1461750&r1=1461749&r2=1461750&view=diff ============================================================================== --- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java (original) +++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java Wed Mar 27 17:59:47 2013 @@ -81,8 +81,8 @@ public class UnitOfWorkProcessor extends protected void doStart() throws Exception { // if a route context has been configured, then wrap the processor with a // RouteContextProcessor to ensure we track the route context properly during - // processing of the exchange - if (routeContext != null) { + // processing of the exchange, but only do this once + if (routeContext != null && (!(processor instanceof RouteContextProcessor))) { processor = new RouteContextProcessor(routeContext, processor); } super.doStart();