Hi all,

Is it possible to stop the framework inside a bundle activator start method?

I'm asking this, because i need to have a bundle ( that i configure to start ) with startup level lower than other that need to do some configuration steps ( setting properties, prepare resources
and so on )

My need is to stop the framework and exit if something goes wrong in this so called start-up bundle.

1) I've try to do get a reference to the system bundle and to stop by doing this:

Bundle mainBundle = context.getBundleContext().getBundle(0);
mainBundle.stop();

but this seem don't work ( i seeequinox simple configurator continue to process the bundle list ).

2) Another thing i try is to call the System.exit(0), it works but i don't know if it's correct...

Which is the cleanest and right way to proceed in that case??

Andrea

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to