I have question about BundleActivator interface. If I want the bundle to do something, like java -jar floodlight.jar, once it is started. Do I need to implement the BundleAcitvator? So it behaves like running from the main() method.
Right now I did not implement BundleActivator. It behaves like a library once started.
Yes if you need any business logic to start when the bundle starts you need to either
- use BundleActivator
- a spring xml file
- a blueprint xml file
The latter two is special for Karaf / SMX / FuseESB as they detect these xml files and start the application accordingly.
You can mix and match and have both a bundle activator and xml files as well.