Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Creating and Starting a BundleActivator when the framework launches


It is my understanding that simply having a BundleActivator class and a Bundle-Activator header in the MANIFEST.MF is not enough to force the bundle's activator to be created and started by Equinox when the framework is launched.

I have learned that adding Eclipse-LazyStart: true to the MANIFEST.MF is the way ensure that the bundle's activator is started when one of its classes is first touched by another bundle.

But how am I to create a bundle that has a BundleActivator that is created and started when the OSGi framework is launched?  I am aware of the org.eclipse.ui.startup extension point and accompanying IStartup class, but I do not want to use that when my bundle is "pure model", since they reside in an Eclipse UI plug-in.  I don't want to couple my model to anything UI related.

I'm building plugins that will run in the Eclipse IDE rather than pure OSGi bundles, so I'm using an "Eclipse Application" launch configuration.  It is curious that only the "Equinox OSGi Framework" launch configurations allow you to specify the default start level for a bundle and whether it will start automatically when the framework launches.

While I understand that the early creation and starting of a bundle activator is considered a bad thing by many Eclipse developers, it should still be possible and should not be this hard.

Thanks

Simon

Back to the top