camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Whytock <>
Subject Re: Confused with Camel in Spring/OSGI
Date Wed, 12 Feb 2014 18:35:29 GMT
On Wed, Feb 12, 2014 at 12:35 PM, Mangin, Franck <>wrote:

> Well, as far as I can tell (and I may definitely be missing something) the
> state of OSGI support in camel-spring is in a pretty sorry state of
> affair...
> camel-spring 2.12.2 depends on spring 3.1.0.RELEASE, but it contains
> references to the BundleContextAware class which doesn't seem to be
> supported anymore in spring 3.x. Trying to grab that class from old
> org.springframework.osgi bundles doesn't help presumably because nobody in
> spring 3 is paying attention to that interface anymore so the injection of
> the bundle context doesn't happen.
> I tried to work around that by declaring my own CamelNamespaceHandler,
> which registers my own CamelContextFactoryBean which obtains the bundle
> context by other means.
> That however eventually fails because the org.apache.camel.core.osgi
> package is not exported by camel-spring.
> Looks like the smartest thing to do will be to give up on spring
> configuration alltogether and create my own Camel context manually.
> There is a lot valuable code in org.apache.camel.core.osgi and in
> org.apache.camel.osgi, it is too bad that it is apparently only tested and
> working on karaf.
> If someone know what the proper equivalent to BundleContextAware is in
> spring 3 is I could provide a modified bean factory if that is of interest.

For what it's worth, a few versions ago I was able to get Camel working
under Apache Felix.  Mind you, I didn't use Spring...I built my routes in
various ways in Java code.

But for the record Karaf is not the only option.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message