camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicolasduminil <nicolas.dumi...@simplex-software.fr>
Subject Re: How to run camel-cdi projects ?
Date Wed, 11 May 2016 15:02:34 GMT
Hi Antonin,

I have investigated the direction you've suggested and I think that the (1)
is fine. Then I found a lot of example like this:

    CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
    cdiContainer.boot();
    ContextControl contextControl = cdiContainer.getContextControl();
    contextControl.startContext(ApplicationScoped.class);
    /*
     * Your code here 
     */

But I'm not sure what the code is supposed to do once the container and the
context started. In my case, the Camel route starts but it stops immediately
because the JVM exits. I don't know how to tell to the container to run for
ever.

I have tried also to create an uber jar using the shade maven plugin but I
cannot run it with java -jar as there is no any main().

So I would be very grateful if you could enlighten me. Many thanks in
advance.

Kind regards,

Nicolas DUMINIL



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-run-camel-cdi-projects-tp5781727p5782448.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message