Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.15.2
    • 2.15.3, 2.16.0
    • camel-spring-boot
    • None
    • Unknown

    Description

      After some investigation:

      • org.apache.camel.spring.boot.CamelSpringBootApplicationController creates org.apache.camel.main.MainSupport instance
      • MainSupport.waitUntilCompleted() will hang on latch.await()
      • To release this lock MainSupport.completed() has to be called. But this never happens
      • CamelSpringBootApplicationController should implement @PreDestroy callback and call mainSupport.completed()
      • Workaround:
          @Autowired
          private CamelSpringBootApplicationController camelSpringBootApplicationController;
        
          @PreDestroy
          public void preDestroy() throws Exception {
            final Field f = camelSpringBootApplicationController.getClass().getDeclaredField("mainSupport");
            f.setAccessible(true);
            MainSupport mainSupport = (MainSupport) f.get(camelSpringBootApplicationController);
            mainSupport.completed();
          }
        

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            bsmk Miroslav Matejovsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: