Author: davsclaus
Date: Wed Mar 27 18:00:29 2013
New Revision: 1461753
URL: http://svn.apache.org/r1461753
Log:
CAMEL-6220: Using route policy to start and stop routes can cause
RouteContextProcessor to be added multiple times
Modified:
camel/branches/camel-2.9.x/ (props changed)
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1461748
Merged /camel/branches/camel-2.10.x:r1461750
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java?rev=1461753&r1=1461752&r2=1461753&view=diff
==============================================================================
---
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java
(original)
+++
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/UnitOfWorkProcessor.java
Wed Mar 27 18:00:29 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();