This content has been marked as final.
Show 2 replies
-
1. Re: Fuse 4: Spawned thread within OSGI bundle wont die when stopped
ffang Jun 11, 2010 3:23 AM (in response to guest)Hi,
Don't know the details about your scenario, but you can specify a BundleActivator for your bundle, and in the stop method of BundleActivator, you can do some clean up work(like release some resources).
Or you can have a watch dog bundle, which implements BundleListener interface, when the BundleEvent type is BundleEvent.STOP, you can get the stopped bundle from BundleEvent and do any cleanup work there.
Freeman
-
2. Re: Fuse 4: Spawned thread within OSGI bundle wont die when stopped
gertv Jun 16, 2010 9:38 AM (in response to guest)L.S.,
Another option would be to use Blueprint or Spring DM to create the threads from a bean and use the init-method/destroy-method attributes to specify the methods to handle the lifecycle of your threads when the Blueprint context gets started.
Regards,
Gert Vanthienen