Results 1 to 2 of 2

Thread: How to override to the BundleActivator.stop() default method?

  1. #1
    Join Date
    Jun 2011
    Posts
    4

    Post How to override to the BundleActivator.stop() default method?

    Hi all.

    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?

    Thanks,
    Roland

  2. #2
    Join Date
    Sep 2006
    Location
    Russia
    Posts
    28

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •