Hi James,

It looks like by doing "routeType.addInterceptor(processor)", it
results in wrapping each node(s) with the referenced processor.  If I
have a route like: from("direct:start).to("mock:end1", "mock:end2"),
it ends up having an instrumentation processor wrapping "sendTo
mock:end1" and "sendTo mock:end2" processors.  But, the referenced
processor is supposed (in my mind) to be a "per route" interceptor
that records exchanges processed by the entire route.   So, a single
exchange sent to the route could cause the per-route instrumentation
processor to record two processed exchanges.
InstrumentationInterceptStrategy already intercepts each node to
record per-processor performance data.  So, we probably don't need to
wrap each node again.  Perhaps, I am missing something.

Thanks,
William

--- 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/InstrumentationLifecycleStrategy.java
(original)
+++ 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/InstrumentationLifecycleStrategy.java
Tue May 20 06:25:00 2008
@@ -145,13 +145,14 @@
            ProcessorType<?>[] outputs =
                routeType.getOutputs().toArray(new ProcessorType<?>[0]);

-            routeType.clearOutput();
+            //routeType.clearOutput();
            InstrumentationProcessor processor = new InstrumentationProcessor();
-            routeType.intercept(processor);
-            for (ProcessorType<?> output : outputs) {
+            routeType.addInterceptor(processor);
+
+            /*for (ProcessorType<?> output : outputs) {
                routeType.addOutput(output);
            }
-
+*/
            interceptorMap.put(endpoint, processor);
        }
    }

Reply via email to