camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unmarshall <>
Subject Re: Proper method of looking up osgi service from camel component
Date Tue, 01 Mar 2011 07:04:30 GMT
Hi Willem,

I am not sure what you mean by wrap the component with java code. Let us say
the client creates a camel route like below:

<c:customComponent id="beanID">
   ...... // all custom configuration elements go here

       <from uri="file:///tmp"/>
       <to uri="c:bean:beanID" />

Now i define <osgi:reference> tags in another beans XML and then ask the
user to just import this when creating a camel route. <import

The only way i see the service available is via accessing the application
context and then getting the included the service reference (which the user
has imported) but that is not injection and that will then have coupling
with the Spring classes. 

Did you have anything else in mind?

Best Regards,

Willem.Jiang wrote:
> Hi Madhav,
> If you don't want your client to know about how to inject the osgi 
> services, it's a best way to wrap the component with Java code.
> Willem

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message