Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Bundle stay always in the state "RESOLVED"
Bundle stay always in the state "RESOLVED" [message #543172] Mon, 28 June 2010 15:38 Go to next message
Batistuta is currently offline BatistutaFriend
Messages: 6
Registered: January 2010
Junior Member


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 15:21 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
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
Previous Topic:DS and Spring beans
Next Topic:[MAC OS] Automated building PDE : executable doesn't work
Goto Forum:
  


Current Time: Tue Apr 16 05:53:14 GMT 2024

Powered by FUDForum. Page generated in 0.34193 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top