camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Stiborsk√Ĺ <>
Subject Referencing OSGi services with RouteBuilder classes for use in CamelContext
Date Mon, 24 Jun 2013 12:20:07 GMT
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=""/>
<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"

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:
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
( I guess the idea is
possible, just my implementation is wrong.

S pozdravem / Best regards
Martin Stiborsk√Ĺ


View raw message