Hello guys,
I'd like to ask first if I'm wrong or not...
I have a bundle, where is defined CamelContext in blueprint XML. In
this XML, I'd like to reference services from n other bundles, which
exposes services with routes - RouteBuilder class(es).

How should be the route class for the bundles exposed? Something like this (?):

<bean id="myRoute" class="com.foo.MyRoute"/>
<service ref="myRoute" interface="org.apache.camel.RoutesBuilder"/>

Then, in the "main" bundle, where is CamelContext defined, I can catch
the reference:

<reference id="myRouteReference" component-name="myRoute"
interface="org.apache.camel.RoutesBuilder"/>

The problem is, it kind of doesn't work for me :(
The service is exposed, the reference is not null, but class type is wrong:

Caused by: org.apache.camel.NoSuchBeanException: Found bean:
avatarRoutes in BlueprintContainer:
org.apache.aries.blueprint.container.BlueprintContainerImpl@50a28
b65 of type: Proxybad2ac0c_5c42_4054_bf65_7566a287f4c8 expected type
was: class org.apache.camel.builder.RouteBuilder

Camel 2.11 / Karaf 2.3.1
According this answer from Claus
(http://stackoverflow.com/a/13439844/805219) I guess the idea is
possible, just my implementation is wrong.

--
S pozdravem / Best regards
Martin Stiborský

Jabber: st...@njs.netlab.cz
Twitter: http://www.twitter.com/stibi

Reply via email to