On 11/26/2012 02:33 PM, Raman Gupta wrote:
> Ideally, Karaf would have a "ShutdownHook" interface/service I could
> implement in my bundles -- for each one of these registered, Karaf
> would execute them before stopping the framework bundles. If someone
> could give me some starting pointers, I could look into implementing
> this...

I believe I found the right place to do this...

./main/src/main/java/org/apache/karaf/main/Main.java

Just before the call to framework.stop(), we use the BundleContext to
obtain and execute a shutdown method on all services that implement a
new "FrameworkShutdownHook" interface.

Then, proceed to framework.stop().

Thoughts?

Regards,
Raman Gupta
Principal
VIVO Systems

Reply via email to