[ 
https://issues.apache.org/jira/browse/CAMEL-9498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101421#comment-15101421
 ] 

Claus Ibsen commented on CAMEL-9498:
------------------------------------

The Camel registry is a facade to lookup beans from a bean service registry of 
all sorts - such as jndi / cdi / spring / osgi etc.

So as this is about camel-scr and osgi, then the better way would be to make it 
easier to add a bean in the real osgi service registry. 
As all beans is then managed from the same source and there is no end user 
confusion which beans is managed by which. 

We do not want to let Camel take that control and have mix of both - that would 
be confusing why dependency injection and whatnot works for some beans and not 
for others etc.

I suggest to look at what code it would take to add a bean in the osgi service 
registry. And maybe some helper code can be added to camel-scr or 
camel-core-osgi etc to make this easier from Java code.

> Always provide a writable local registry
> ----------------------------------------
>
>                 Key: CAMEL-9498
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9498
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-scr
>            Reporter: Jyrki Ruuskanen
>            Priority: Minor
>
> Many Camel components need to reference objects in CamelContext's registry as 
> part of their configuration (for example httpClientConfigurer for http/http4 
> and restletRealm for restlet).
> These objects often apply to that particular CamelContext and not others, 
> thus the registry holding these bits could be local. Using a local registry 
> prevents the risk of conflicting keys and spares us from devising a naming 
> policy for even trivial stuff.
> To conveniently create and add these objects, even inside RouteBuilder's 
> configure method, we need write access to said registry.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to