Community
Participate
Working Groups
What this effectively does is to make a bundle that is meant to be lazily loaded and makes it non-lazy. It may be some other third-party bundle that forces the bundle to start effectively overriding the lazy-loading design of the first bundle. Steps to reproduce: 1) Launch eclipse 3.6.2 with the "-console" option 2) Select a well-known workspace 3) Wait until the workbench has fully loaded and all builds are finished, etc. 4) Invoke the "ss" command at the osgi prompt 5) Pick a bundle that is not in the active state (preferably one that is marked as "<<LAZY>>") 6) Shut down eclipse and restart it with the same workspace 7) Once eclipse has finished building, etc. invoke "ss" command again verifying that the same bundle is not "ACTIVE" 8) Invoke the "start" command on the bundle to activate it 9) Verify that the bundle is now in "ACTIVE" state according to the "ss" command 10) Shut down eclipse and restart with the same workspace 11) Wait until the workbench is loaded and all builds are finished 12) Invoke the "ss" command Result: The bundle is already active and will be active every time eclipse is restarted. The above procedure mimics what I have seen when activating a bundle using Bundle.start(). In my case I did this once and expected that after a restart the bundle would resume its normal lazy-loading routine.
This is working as specified by the OSGi Core specification. Bundle.start() will perform an eager and persistent start operation. If you don't want a bundle to be persistently started then use Bundle.start(Bundle.START_TRANSIENT).
Thanks, I didn't know that this was intentional. I'll try the transient option next time.