Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.15.2
-
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(); }