camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: [HEADS UP] - camel-scr for OSGi with pure Java in Camel 2.15
Date Mon, 10 Nov 2014 09:17:27 GMT
I just looked into the camel-scr component.

If found some design issues:

- Why do we need to @Reference to ComponentResolver. I think we should 
do this under the covers so the user does not have to configure it himself.
The easiest way would probably be to do this using plain OSGi APIs.

- It seems the context start is delayed when additional components are 
found. This seems to be a bit fragile as the delay means we can miss 
In the case of camel blueprint we go into GracePeriod and specify which 
component we are missing. For SCR I think the correct way would be to 
only start after all required components are present. Not sure if this 
is easy to do though. In any case I think the problem of depending on 
components and only starting once they are there is a general problem 
that should be solved outside camel blueprint or camel scr.

- If component auto detection does not work we could create a custom 
camel annotation @RequiresComponent("<component name>") and 
@RequiresCompoents. So people could annotate their concrete context 
class with all components they need.

- I think the direct injection of properties into RouteBuilders should 
not be done. Or at least not by default. Instead I would by default let 
the user do the injection in getRouteBuilders. At least we could use the 
@Inject annotation to mark properties that are meant for injection 
perhaps even with @Named so the user can specify the name.

I can help with implementing some of my proposals. I will wait for more 
comments and discussions though.


On 09.11.2014 09:42, Claus Ibsen wrote:
> Hi
> There is a great contribution for a new camel-scr module that allows
> end users to use OSGi declarative services instead of spring-dm /
> blueprint.
> The code has just been pushed to master branch, but there is still
> some work to finish and polish the code.
> But I wanted to bring this to attention, so we can have more eyes on
> this - especially for the OSGi folks.
> The JIRA ticket is, with some bullets to look at:
> And the code is in the camel-scr module. And there is a camel-scr
> feature to install the module.

Christian Schneider

Open Source Architect

View raw message