Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15307

camel-spring - Graceful shutdown is not working anymore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3.0, 3.4.0, 3.4.1
    • 3.4.3, 3.5.0
    • camel-spring
    • None
    • Windows 10

      openJDK 1.8, Oracle JDK 1.8

    • Unknown

    Description

      We are using org.apache.camel.spring.Main to run our Camel applications within a spring context. After updating from Camel 2.24.3 to 3.4.1 the gracefull shutdown is not working anymore.

      When calling Strg+C in a windows shell (or stopping a service wrapper) the camel context is not stopped/closed and the jvm simply stops after logging this:

      2020-07-17 08:49:17,559 [ad #7 - CamelHangupInterceptor] INFO  DefaultMainShutdownStrategy    - Received hang up - stopping the main instance.
      2020-07-17 08:49:17,559 [pache.camel.spring.Main.main()] DEBUG MainSupport                    - Stopping Spring ApplicationContext: org.springframework.context.support.ClassPathXmlApplicationContext@15512f1a
      

      In Camel 2.25.1 gracefull shutdown also works fine.

      Also using Camel version 3.4.0 or 3.3.0 didn't solve the issue.

      I debugged the behaviour and found that, when keeping the CamelHangupInterceptor thread from org.apache.camel.main.DefaultMainShutdownStrategy running after the shutdown call, the Camel context is stopped correctly. But when the CamelHangupInterceptor thread ends also the JVM is stopping.

      Attachments

        1. camel-context.xml
          1 kB
          Oliver Holzmann

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              OHolzma Oliver Holzmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: