You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/03/17 11:55:33 UTC

[jira] [Resolved] (CAMEL-9720) camel-spring-boot - Make it easy to keep the JVM running

     [ https://issues.apache.org/jira/browse/CAMEL-9720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-9720.
--------------------------------
    Resolution: Fixed

You can now set

# we want the main thread to keep running
camel.springboot.main-run-controller = true

> camel-spring-boot - Make it easy to keep the JVM running
> --------------------------------------------------------
>
>                 Key: CAMEL-9720
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9720
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-boot
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.17.0
>
>
> When you run a spring boot app then it may terminate asap because the main thread is not keep running.
> We should make this easy.
> And that applies when you code this using the spring boot way with a application class with main.
> eg along the lines using this hack for now
> {code}
> @SpringBootApplication
> public class SampleCamelApplication {
>     public static void main(String[] args) {
>         ConfigurableApplicationContext ctx = new SpringApplicationBuilder().sources(SampleCamelApplication.class).run(args);
>         // keep the JVM running as Camel uses only daemon threads in the sample
>         CamelSpringBootApplicationController controller = ctx.getBean(CamelSpringBootApplicationController.class);
>         controller.blockMainThread();
>     }
> }
> {code}
> We should be able to run that without the hack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)