This is an automated email from the ASF dual-hosted git repository.

apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new e802a7f8 Fix LoadBalancerTest related to API break in Camel 4.10 and 
4.8.3
e802a7f8 is described below

commit e802a7f89124b71b1282e7c8c4d56b3e269d7a42
Author: Aurélien Pupier <apup...@redhat.com>
AuthorDate: Mon Apr 14 12:18:12 2025 +0200

    Fix LoadBalancerTest related to API break in Camel 4.10 and 4.8.3
    
    * with xml
    inheritErrorHandler attribute
    
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_10.html#_xml_dsl_changes
    * with Mina component requiring `objectCodePattern` for serialized
    objects 
https://camel.apache.org/manual/camel-4x-upgrade-guide-4_8.html#_camel_mina
    
    Signed-off-by: Aurélien Pupier <apup...@redhat.com>
---
 .../META-INF/spring/camel-route-context-loadbalancer.xml          | 8 ++++----
 .../main/resources/META-INF/spring/camel-route-template-mina.xml  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/loadbalancing/src/main/resources/META-INF/spring/camel-route-context-loadbalancer.xml
 
b/loadbalancing/src/main/resources/META-INF/spring/camel-route-context-loadbalancer.xml
index 373bf167..46361949 100644
--- 
a/loadbalancing/src/main/resources/META-INF/spring/camel-route-context-loadbalancer.xml
+++ 
b/loadbalancing/src/main/resources/META-INF/spring/camel-route-context-loadbalancer.xml
@@ -16,10 +16,10 @@
              in case of failure -->
         <route id="loadbalancer">
             <from uri="direct:loadbalance"/>
-            <loadBalance inheritErrorHandler="false">
-                <failoverLoadBalancer roundRobin="true"/>
-                <to uri="mina:tcp://localhost:9991?sync=true"/>
-                <to uri="mina:tcp://localhost:9992?sync=true"/>
+            <loadBalance>
+                <failoverLoadBalancer roundRobin="true" 
inheritErrorHandler="false"/>
+                <to 
uri="mina:tcp://localhost:9991?sync=true&amp;objectCodecPattern=*"/>
+                <to 
uri="mina:tcp://localhost:9992?sync=true&amp;objectCodecPattern=*"/>
             </loadBalance>
             <log message="${body}"/>
         </route>
diff --git 
a/loadbalancing/src/main/resources/META-INF/spring/camel-route-template-mina.xml
 
b/loadbalancing/src/main/resources/META-INF/spring/camel-route-template-mina.xml
index 61f05b28..86f5600a 100644
--- 
a/loadbalancing/src/main/resources/META-INF/spring/camel-route-template-mina.xml
+++ 
b/loadbalancing/src/main/resources/META-INF/spring/camel-route-template-mina.xml
@@ -9,7 +9,7 @@
         <routeTemplate id="route-template-mina">
             <templateParameter name="host"/>
             <route>
-                <from uri="mina:tcp://{{host}}"/>
+                <from uri="mina:tcp://{{host}}?objectCodecPattern=*"/>
                 <setHeader name="minaServer">
                     <constant>{{host}}</constant>
                 </setHeader>

Reply via email to