camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-9720) camel-spring-boot - Make it easy to keep the JVM running
Date Thu, 17 Mar 2016 10:55:33 GMT

     [ 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)

Mime
View raw message