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] [Updated] (CAMEL-10384) Shutdown broken when using Spring Boot
Date Fri, 14 Oct 2016 08:15:22 GMT

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

Claus Ibsen updated CAMEL-10384:
--------------------------------
    Priority: Minor  (was: Major)

> Shutdown broken when using Spring Boot
> --------------------------------------
>
>                 Key: CAMEL-10384
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10384
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring-boot
>    Affects Versions: 2.17.3
>            Reporter: Artur Markiewicz
>            Priority: Minor
>              Labels: easyfix
>
> Camel doesn't shutdown properly in a Spring Boot environment. Calling the /shutdown endpoint
causes Camel to hang-up after stopping the CamelContext. The reason for this is the count-down
latch in the CamelSpringBootApplicationController. The overriden Main class modifies the latch
in the Main class itself, not the one in CamelSpringBootApplicationController. As a result,
the latch in CamelSpringBootApplicationController is waiting forever preventing a proper shutdown.
> {code:title=CamelSpringBootApplicationController .java|borderStyle=solid}
>     public CamelSpringBootApplicationController(final ApplicationContext applicationContext,
final CamelContext camelContext) {
>         this.main = new Main() {
>              
>             ...
>             @Override
>             protected void doStop() throws Exception {
>                 LOG.debug("Controller is shutting down CamelContext");
>                 try {
>                     super.doStop();
>                 } finally {
>                     // Should be CamelSpringBootApplicationController.this.latch.countDown();
>                     latch.countDown();
>                 }
>             }
>         };
>     }
> {code}



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

Mime
View raw message