On Thu, Mar 24, 2016 at 7:29 AM Charlee Chitsuk <charlee...@gmail.com> wrote:
> Hi Antonin, > > Thank you very much. This answer my question. > > Please correct me if I'm wrong. Since it is a @Dependent, I can register > the new instance (with different route-id and parameters) to the context as > much as possible. Cloud you please help to advise further? > Well if you're doing manual registration, then you're not using the Camel CDI capability of looking up your route builders automatically. > > -- > Best Regards, > > Charlee Ch. > > 2016-03-24 15:20 GMT+07:00 Antonin Stefanutti <anto...@stefanutti.fr>: > > > Hi Charlee, > > > > There is actually no constraint on the scope to declare for the > > RouteBuilder beans that are discovered by Camel CDI. > > > > Camel CDI just gets one instance for each of them at start time and adds > > this to the Camel context. So that will equally work whether a > RouteBuilder > > is @Dependent or @AppplicationScoped generally. > > > > So that’s up to the developer to decide what’s the best scope depending > on > > its need. Obviously, if the RouteBuilder instance needs to be shared > > somehow, then it needs to be @ApplicationScoped. > > > > I’ll mention that to the documentation if that answers your question. > > > > Antonin > > > > > On 24 Mar 2016, at 06:49, Charlee Chitsuk <charlee...@gmail.com> > wrote: > > > > > > Hi, > > > > > > Regarding to the Camel CDI [1] which mentions that it provides > > > the Auto-detecting Camel routes. I would like to know what the CDI > scope > > of > > > that RouteBuilder is. Is it @ApplicationScoped? > > > > > > > > > [1] http://camel.apache.org/cdi.html > > > > > > -- > > > Best Regards, > > > > > > Charlee Ch. > > > > >