On Wed Nov 23 08:31:42 2011, Anurag Sharma wrote:
Hi All,

We are in the process of porting from JBoss to Karaf. In Jboss we have the
concept of SARs (Service Archives). They are essentially services having an
MBean interface and they have their own lifecycle.
We are planning to model these as OSGI services. Now we would like to use
these OSGI services from camel routes. For example
Camel Route would be in Bundle A
OurService would be in Bundle B (and registred with OSGI service registry).

Q1 - For a camel route to use OurService as an endpoint, do we have to wrap
it  in a Camel Component interface?
Yes, if you want to access the Service as an camel endpoint, you need to follow the way of component/endpoint/producer&consumer.


Q2 -  Is NMR the preferred and only way  to asynchrounously trigger camel
components residing in different bundles.

NMR can be used across the camel context and bundle out of box.
There are some other camel components which supports to communicate across the camel context,like camel-vm, camel-jms, camel-cxf etc.


Q3 - Another option we are considering is to have a wrapper camel component
in the same bundle as the route. In the implementation of our camel
component we can then access the OSGI Service registry to get hold of
OurService deployed in a seperate bundle. Is this the usual way of
integrating camel routes with OSGI services?

It depends on what's you need. if you export your Services as a bean component, you can use it as the bean component and do lots customer work yourself.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Accessing-OSGI-Services-from-Camel-Routes-tp5015186p5015186.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to