Re: Hierarchical registry for CamelContext

2017-09-08 Thread Luca Burgazzoli
Yeah this is for 3.0 :) Posted so I won't forget --- Luca Burgazzoli On Fri, Sep 8, 2017 at 11:02 AM, Claus Ibsen wrote: > On Fri, Sep 8, 2017 at 10:38 AM, Luca Burgazzoli > wrote: >> Hi, >> >> I was thinking if instead we could have the camel context have its own >> registry and end users ca

Re: Hierarchical registry for CamelContext

2017-09-08 Thread Claus Ibsen
On Fri, Sep 8, 2017 at 10:38 AM, Luca Burgazzoli wrote: > Hi, > > I was thinking if instead we could have the camel context have its own > registry and end users can add their own "bean repository", like > > context.addBeanRepository(new SpringBeanRepository()) > context.addBeanRepository(

Re: Hierarchical registry for CamelContext

2017-09-08 Thread Luca Burgazzoli
Hi, I was thinking if instead we could have the camel context have its own registry and end users can add their own "bean repository", like context.addBeanRepository(new SpringBeanRepository()) context.addBeanRepository(new JNDIRepositoy()) Then when asking the registry to lookup beans,

Re: Hierarchical registry for CamelContext

2017-02-06 Thread Claus Ibsen
Hi Yeah the idea of having it internal and named as containerRegistry, or maybe better named as contextRegistry or internalRegistry or camelInternalRegistry to make it stand out its not for Camel end users per see. A side bonus can be that we could make this internal registry available for unit t

Re: Hierarchical registry for CamelContext

2017-02-06 Thread Luca Burgazzoli
Well, what we have as today is just fine but sometime it requires a little bit of additional work and maintenance even it is not strictly needed. Let's take as example hystrix and service call stuffs we added recently: 1. hystrix configuration is retrieved from the registry but work in spring only

Re: Hierarchical registry for CamelContext

2017-02-03 Thread Paul Gale
Luca, Can you outline either some particular business problem that you're trying to solve or some current impediment to a solution that would be remedied by your proposed design change? Perhaps a few use case scenarios might help demonstrate the need. Just a thought. Thanks, Paul On Fri, Feb 3,

Re: Hierarchical registry for CamelContext

2017-02-03 Thread Luca Burgazzoli
Yes an easy way to register beans that are not really meaningful outside the camel context and maybe beans we do not want to make available through dependency injection so they can't be easily modified outside. The hierarchical nature is only to make it transparent for consumer i.e. a service call

Re: Hierarchical registry for CamelContext

2017-02-03 Thread Claus Ibsen
Hi So are you referring to some configuration for service call / hystrix etc? The problem with the registry being hierarchical is that its backed by different implementations and then the user experience is different depending on which beans you get. For example CDI/spring has all kind of depende

Hierarchical registry for CamelContext

2017-02-02 Thread Luca Burgazzoli
Hello everyone, I'm wondering if it would make sense to have a sort of hierarchical registry where the root registry is always created by the CamelContext then the specific container registry adds its own registry on top and the lookup would be top down. The motivation is that there are some bean