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

Luca Burgazzoli commented on CAMEL-10792:
-----------------------------------------

Instead of a hierarchical registry we may think to have a single registry which 
is created by the camel context whici allows to "bind" objects and a number of 
"beans repository" that are used to bridge camel context with external 
frameworks such as spring, blueprint.

So we could have the BeansRepository that is basically what the registry is 
today:

{code}
public interface BeansRepository extends Ordered {
    Object lookupByName(String name);
    <T> T lookupByNameAndType(String name, Class<T> type);
    <T> Map<String, T> findByTypeWithName(Class<T> type);
    <T> Set<T> findByType(Class<T> type);
}
{code}

And the registry then extends BeansRepository:

{code}
public interface Registry extends BeansRepository {
    void bind(String name, Object bean);
}
{code}

The internal registry then has lower priority and it is queried only when none 
of the repositories has the require beans.

> CamelContext: add internal registry for context specific beans
> --------------------------------------------------------------
>
>                 Key: CAMEL-10792
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10792
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-test
>            Reporter: Luca Burgazzoli
>            Priority: Major
>             Fix For: 3.0.0
>
>
> See mailing list discussion:
> http://mail-archives.apache.org/mod_mbox/camel-dev/201702.mbox/%3CCAGB5yNkLzmr%3DQhBCOX9u%3D-X16pGaWkLUZ%2BvY7Jf_JRrudbzh_Q%40mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to