camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ranx <brad.john...@mediadriver.com>
Subject Re: Camel on OSGi - Get Bundle Name?
Date Wed, 30 Mar 2016 16:27:46 GMT
If you're trying to the get the bundle symbolic name when in  your processor
you can inject it at start up.

<bean id="myProcessor" class="com.FooProcessor">
    <property name="bundleContext" ref="blueprintBundleContext"></property>
 </bean>

The ref to the blueprintBundleContext is provided by default.  You can get
the bundle and symbolic name (and pretty much anything else) from it.  I'm
not sure if that's what you are after though.  Claus obviously mentions the
mechanics for getting it from the CamelContext.  As I rarely use processors
and just use pojos instead I don't generally grab information from Camel
directly.

I've never tried invoking a method on a pojo using the ref to the
blueprintBundleContext but would imagine that would work as well.

Note that that isn't really anything especially blueprint.  It just passes
in a standard OSGi BundleContext.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-on-OSGi-Get-Bundle-Name-tp5780045p5780069.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message