Bundle stay always in the state "RESOLVED" [message #543172] |
Mon, 28 June 2010 11:38  |
Eclipse User |
|
|
|
Hello,
I've created one main bundle in wich one I've installed the equinox p2. Then I export it to obtain an executable. My executable works correctly.
I've also created one other Bundle that interact witt the first one. In eclipse, if I create a product configuration with this 2 bundles and run the product, everything works. After that, I export my second Bundle as a "deployable feature" and then I install this bundle wihtin my application via the "help->install new software". I'm able to install it, however, my Bundle stay always in the state "RESOLVED" even I restart my application. I'd like to set the state as "ACTIVE".
Do you know if I can configure somehting to autostart my bundle as I did in my "Product configuration"? Or is there an another solution?
Many thanks,
Bati
|
|
|
Re: Bundle stay always in the state "RESOLVED" [message #543505 is a reply to message #543172] |
Tue, 29 June 2010 11:21  |
Eclipse User |
|
|
|
You can set autostart and start level information by adding a p2.inf file to
the feature, see http://wiki.eclipse.org/Equinox/p2/Setting_Start_Levels
(which was originally the answer to
http://stackoverflow.com/questions/3077282/in-equinox-is-it- possible-to-to-mark-an-osgi-bundle-as-started-from-its-conta inin/3078154#3078154 )
There are other alternatives that are perhaps better than settin autostart.
You can set your bundle to be lazily started by specifying
"Bundle-ActivationPolicy: lazy" in the manifest. There is a check box on
the overview tab of the manifest editor: "Activate this plug-in when one of
its classes is loaded". With this set, your bundle will be started
whenever someone else tries to load a class from it.
It is common to register for some extension point, and later when your
menu/view/whatever gets used, the extension registry accesses your bundle
and causes it to start. The same is true for declarative services. There
is also a "org.eclipse.ui.startup" extension point which will start your
bundle after the workbench is initialized.
-Andrew
Batistuta wrote:
>
>
> Hello,
>
> I've created one main bundle in wich one I've installed the equinox p2.
> Then I export it to obtain an executable. My executable works correctly.
>
> I've also created one other Bundle that interact witt the first one. In
> eclipse, if I create a product configuration with this 2 bundles and run
> the product, everything works. After that, I export my second Bundle as a
> "deployable feature" and then I install this bundle wihtin my application
> via the "help->install new software". I'm able to install it, however, my
> Bundle stay always in the state "RESOLVED" even I restart my application.
> I'd like to set the state as "ACTIVE".
>
> Do you know if I can configure somehting to autostart my bundle as I did
> in my "Product configuration"? Or is there an another solution?
>
> Many thanks,
>
> Bati
|
|
|
Powered by
FUDForum. Page generated in 0.23620 seconds