[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] simpleconfigurator and bundle state

Hi Tom!

This is simpleconfigurator working as designed. The bundles.info is
supposed to contain the state of the framework. Each time
simpleconfigurator is activated on startup it checks to see if the state
of the bundles are consistent with what bundles.info contains. It starts
every bundle it thinks should be started. In most cases this is a no-op
because the bundle is already marked for start from the previous run.
Similarly, if you uninstalled a bundle it would re-install the bundle.

This sounds like the OSGi framework state is no longer meaningful between startups as long as the simpleconfigurator runs, correct?


I am asking this because I like to implement a switch that allows someone from the UI to switch on and off the weaving. This is quite simple since this just depends on the active state of the weaving.aspectj bundle (this contributes an OSGi service and if this service is available or not, the aspectj weaving is on or off). Therefore I thought it would be as simple as starting or stopping the bundle and let the OSGi runtime recreate this state at next startup. But it seems that the simpleconfigurator does not allow me to do this that way, correct?

I suggest you ask a question on the p2-dev list on how to manipulate the
bundles.info file to change the bundle start settings.

Ok, will do that. In addition to that is there another alternative (without writing my own configurator)?


BTW, it sounds like simpleconfigurator may have a bug WRT to starting a
bundle that bundles.info does not think should be started. In this case
it seems simpleconfigurator is not detecting the extra bundle being
started which bundles.info thinks should not be started.

Yepp, to me it seems like simpleconfigurator does only start bundles that are listed as auto-start in the bundle.info but it does not stop bundles that are activated by some someone else in the meantime and are marked as not-auto-start in bundles.info.


Thanks for the quick help!

Cheers,
-Martin



Tom



Inactive hide details for Martin Lippert ---10/18/2010 05:26:36
AM---Hi!Martin Lippert ---10/18/2010 05:26:36 AM---Hi!


From: Martin Lippert <lippert@xxxxxxx>

To:	
Equinox Dev <equinox-dev@xxxxxxxxxxx>

Date:	
10/18/2010 05:26 AM

Subject:	
[equinox-dev] simpleconfigurator and bundle state

------------------------------------------------------------------------



Hi!

I have a question regarding the simple-configurator. What I would like
to do is:

- I have an eclipse-based app
- I wanna let the runtime start a bundle by default
- If I stop this bundle, it shouldn't be started again at next startup
- If I start this bundle again, it should be started again at next startup

So what I thought is that this should be the default behavior of the
OSGi runtime (except the default start of a specific bundle). But I
observe that the simple configurator is starting the bundle always, if
this is mentioned in the bundles.info with true. When I stop the bundle
manually and restart the app, the bundle is started again. This confuses
me since I expected the OSGi runtime to return the app to the state of
its last run.

When I switch the setting within the bundles.info to "false", everything
works fine (as I expected from the OSGi point of view) except that the
bundle is obviously not started at first startup.

Any idea how I can solve this?

Thanks a lot in advance!!!

Cheers,
-Martin

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev




_______________________________________________ equinox-dev mailing list equinox-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/equinox-dev