Hi All
What is the best approach to intercept the Karaf "shutdown" command, before it
starts shutting down any bundles?
Karaf does a getBundle(0).stop() on receiving a "shutdown" command.
There's no FrameworkEvent raised on bundle(0).stop afaics.
A bundle listener on bundle 0 should work, but does not seem to, it's not
called with a STOPPING or STOPPED event.
I do see the event in the log as the first thing after "shutdown":
2016-07-11 16:02:17,096 | DEBUG | FelixShutdown | framework
| 0 - org.apache.felix.framework - 4.2.1 | BundleEvent STOPPING -
org.apache.felix.framework
However that event never makes it to my bundle listener.
Any help appreciated :)
- Martin