Hello,

I am suffering a (to me) strange behavior using camel-cdi 2.11.0 ... i'll
appreciate if you could put some light on it to help me understand. 

We are using camel-cdi on project and i am performing some testing to fully
understand mechanism and discover potential problems in an early stage.

I am observing @PostConstruct lifecycle events on this route

    @Override
    public void configure() throws Exception {
        from("direct://startEndpoint")
        .routeId("firstRoute")
        .beanRef(DeScopeTestVO.class)
        .to("direct://endEndpoint");

        from("direct://endEndpoint")
        .routeId("secondRoute")
        .beanRef(DeScopeTestVO.class)
        .to("direct://finalEndpoint");
    } 

Where DeScopeTestVO is annotated with @Named, and i am testing both beanRef,
and bean. What i've observed is that using bean method the
DeScopeTestVO.postConstruct is called two times (one each route) on the
camel context startup ... but when using beanRef this is duplicated and
those are being called 4 times (two each route).

Also i have a lack of knowledge in the way those mechanism works ... are
those DeScopeTestVO introduced in the camel registry/context and looked out
there? ... or are they instantiated directly?

Thanks in advance!



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-cdi-behavior-bean-vs-beanRef-tp5733944.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to