Search code examples
apache-camelosgiapache-karafapache-servicemix

Apache ServiceMix! 5.0.0 : Apache Karaf 2.3.4 : "camel:route-list" command issue



I have the following scenario:

I've migrated a few days ago from Apache ServiceMix! 4.5.3 to version 5.0.0 and I have encoutered a small issue, at least I think.

My main Spring configuration file looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
  xmlns:ctx="http://www.springframework.org/schema/context"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd 
  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  ">

  <!-- Import the First CamelContext -->
  <import resource="classpath:META-INF/spring/camel-context/first-context.xml" />

  <!-- Import the Second CamelContext -->
  <import resource="classpath:META-INF/spring/camel-context/second-context.xml" />

  <!-- Import the Third CamelContext -->
  <import resource="classpath:META-INF/spring/camel-context/third-context.xml" />

</beans>

When using the older version of ServiceMix! (4.5.3), I was typing camel:route-list and camel:context-list in the Karaf console, I was seeing all 3 contexts (First, Seconds, Third CamelContext) with their own routes. It was ok.

After migrating to ServiceMix! 5.0.0 (using the exact code), when I issue those commands, I only see the last context Third CamelContext. It's not ok. Although the bundle runs ok, the routes are there, functioning ok. I can see them in a web console (like hawtio).

Question

Is there an issue with ServiceMix! 5.0.0 or I must modify my code somehow? I want to see all of my contexts/routes in the Karaf console, really helps debugging...


Solution

  • Apparently it was a bug in Apache Camel 2.12.3 [1] and it was fixed from Apache Camel 2.12.4 on. Thanks for sharing that, Ibsen!

    [1] https://issues.apache.org/jira/browse/CAMEL-7545