camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1298797 - in /camel/branches/camel-2.9.x: ./ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/processor/interceptor/ camel-core/src/test/java/org/apache/camel/management/ components/camel-solr/
Date Fri, 09 Mar 2012 11:56:33 GMT
Author: davsclaus
Date: Fri Mar  9 11:56:32 2012
New Revision: 1298797

URL: http://svn.apache.org/viewvc?rev=1298797&view=rev
Log:
CAMEL-5066: Fixed JMX stats for processors when using interceptors.

Added:
    camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/management/ManagedInterceptTest.java
      - copied unchanged from r1298795, camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedInterceptTest.java
Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
    camel/branches/camel-2.9.x/components/camel-solr/   (props changed)

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar  9 11:56:32 2012
@@ -1 +1 @@
-/camel/trunk:1243046,1243057,1243234,1244518,1244644,1244859,1244861,1244864,1244870,1244872,1245021,1291555,1291727,1291848,1291864,1292114,1292384,1292725,1292760,1292767,1293079,1293268,1293288,1293330,1293590,1293828,1293852,1293855,1294130,1294482,1294502,1294533,1294588,1294639,1294709,1294909,1294976,1295073,1295108,1295120,1296653,1296790,1298125,1298155,1298447
+/camel/trunk:1243046,1243057,1243234,1244518,1244644,1244859,1244861,1244864,1244870,1244872,1245021,1291555,1291727,1291848,1291864,1292114,1292384,1292725,1292760,1292767,1293079,1293268,1293288,1293330,1293590,1293828,1293852,1293855,1294130,1294482,1294502,1294533,1294588,1294639,1294709,1294909,1294976,1295073,1295108,1295120,1296653,1296790,1298125,1298155,1298447,1298795

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/model/InterceptDefinition.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java?rev=1298797&r1=1298796&r2=1298797&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java
Fri Mar  9 11:56:32 2012
@@ -77,8 +77,8 @@ public class InterceptDefinition extends
 
             public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition
definition,
                                                          Processor target, Processor nextTarget)
throws Exception {
-                // prefer next target over target as next target is the real target
-                interceptedTarget = nextTarget != null ? nextTarget : target;
+                // store the target we are intercepting
+                this.interceptedTarget = target;
 
                 // remember the target that was intercepted
                 intercepted.add(interceptedTarget);

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java?rev=1298797&r1=1298796&r2=1298797&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
Fri Mar  9 11:56:32 2012
@@ -241,7 +241,8 @@ public class TraceInterceptor extends De
     protected void traceIntercept(InterceptDefinition intercept, TracedRouteNodes traced,
Exchange exchange) throws Exception {
         // use the counter to get the index of the intercepted processor to be traced
         Processor last = intercept.getInterceptedProcessor(traced.getAndIncrementCounter(intercept));
-        if (last != null) {
+        // skip doing any double tracing of interceptors, so the last must not be a TraceInterceptor
instance
+        if (last != null && !(last instanceof TraceInterceptor)) {
             traced.addTraced(new DefaultRouteNode(node, last));
 
             boolean shouldLog = shouldLogNode(node) && shouldLogExchange(exchange);

Propchange: camel/branches/camel-2.9.x/components/camel-solr/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar  9 11:56:32 2012
@@ -1 +1 @@
-/camel/trunk/components/camel-solr:1227197-1298579
+/camel/trunk/components/camel-solr:1227197-1298579,1298795



Mime
View raw message