My project is based on CDI and Camel-CDI. I've tried to reduce the some of
"similar" RouteBuilder concrete classes by making it to receive the
different parameter, e.g source and destination. I'm not sure if
registering manually is a suitable way or not.

--
   Best Regards,

   Charlee Chitsuk

=======================
Application Security Product Group
*Summit Computer Co., Ltd.* <http://www.summitthai.com/>
E-Mail: char...@summitthai.com
Tel: +66-2-238-0895 to 9 ext. 164
Fax: +66-2-236-7392
=======================
*@ Your Success is Our Pride*
------------------------------------------

2016-03-24 18:30 GMT+07:00 John D. Ament <johndam...@apache.org>:

> 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.
> > >
> > >
> >
>

Reply via email to