camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: LoadBalanceType does not wrap children processors
Date Tue, 21 Oct 2008 15:56:38 GMT
Hi

Yes please do and attach the patch, then we have the fix logged in the public.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: William Tam [mailto:email.wtam@gmail.com] 
Sent: 21. oktober 2008 17:52
To: camel-dev@activemq.apache.org
Subject: LoadBalanceType does not wrap children processors

Hi camel-dev,

It looks like children processors of load balancer are not being
wrapped by interceptor strategy.  As a result, sendTo processors may
not be debuggable by Debugger or monitored by JMX.  Let me know if I
should log a JIRA.

Thanks,
William

Index: camel-core/src/main/java/org/apache/camel/model/LoadBalanceType.java
===================================================================
--- camel-core/src/main/java/org/apache/camel/model/LoadBalanceType.java	(revision
706661)
+++ camel-core/src/main/java/org/apache/camel/model/LoadBalanceType.java	(working
copy)
@@ -121,20 +121,20 @@
         }
         return loadBalancer;
     }
-
-    // when this method will be called
+
     @Override
     public Processor createProcessor(RouteContext routeContext)
throws Exception {
         LoadBalancer loadBalancer =
LoadBalancerType.getLoadBalancer(routeContext, loadBalancerType, ref);
         for (ProcessorType processorType : getOutputs()) {
             // The outputs should be the SendProcessor
-            SendProcessor processor = (SendProcessor)
processorType.createProcessor(routeContext);
-            loadBalancer.addProcessor(processor);
+            Processor processor = processorType.createProcessor(routeContext);
+            processor =
processorType.wrapProcessorInInterceptors(routeContext, processor);
+            loadBalancer.addProcessor((SendProcessor)processor);
         }

         return loadBalancer;
     }
-
+

Mime
View raw message