I was tracing a CXFBus leak issue recently.
Here are the some details about the application bundle:
There is a Spring application context holds a camel context which has a camel-cxf endpoint to receive the invocation from outside. When the application bundle is uninstalled from Karaf, the SpringBus doesn’t shutdown itself and CXFBusFactory doesn’t clean itself up.
If the application bundle is changed to use Blueprint to load the same Camel context, we don’t find any Bus leak by dump the memory of the JVM.
I dig the SpringBus code and found it registers an ApplicationListener which handles application context refresh and close event, but it doesn't shutdown the bus when it go the context close event.