Jul 14th, 2011, 12:46 PM
How to override to the BundleActivator.stop() default method?
I know that using Spring DM you don't have to have a BundleActivator, because Spring DM does this job behind the scene.
But I have a bundle which executes a cron job, let's say each hour, and if somebody stop it, I'd like the bundle to not interrupt a started job, and stop only after it finished the job.
This is why I'd like to override the BundleActivator.stop() method.
Is this possible using spring dm?
Jul 19th, 2011, 12:53 AM
Spring DM doesn't use BundleActivator at all. It scans "META-INF/spring" folder or "Spring-Context" attribute in bundle manifest.
So, if you need to use BundleActivator, you can use it in common way. Just create class, which implements BundleActivator and put attribute "Bundle-Activator" in bundle manifest. Attribute must contain full name of your bundle activator.