felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Bartlett <njbartl...@gmail.com>
Subject Re: Shutdown hook functionality using a SynchronousBundleListener
Date Mon, 09 Sep 2013 11:38:10 GMT
When somebody posts the same question on both Stackoverflow and this
mailing list, I always wonder whether to answer in both places...

Oh well I might as well! You need to provide some motivation for your
question... all bundles are notified through their
BundleActivator.stop() method when the framework is going down, and
this gives them the opportunity to clean up anything that they might
have created.


On Mon, Sep 9, 2013 at 12:33 PM, Hermann Angstl <hangstl@talend.com> wrote:
> Hi there,
> I want to implement some kind of shutdown hook functionality (-> do something in case
the container shuts down).
> Would it work to use a SynchronousBundleListener and listen for STOPPING events for bundle
0 (the framework)?
> In case I trigger a container shutdown, does the framework first send STOPPING events
to all bundles before it actually stops them? Or are all (most) bundles already gone once
bundle 0 received the STOPPING event?
> cheers,
> Hermann

To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

View raw message