Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Starting bundles programatically without restarting the system

Thank you for the explanation. Does it restart registered osgi services? Because of my lack of investigation earlier I hadn't noticed that its only the services (which was registered by our product) which was restarted. And not all services restarted successfully, some failed. However the relevant bundles had remained active it seems. And the new bundles were started ok. due to failed services the system was  unusable.

the bundles newly installed do not replace any existing bundles with newer versions (or patching for that matter) but they do depend on many of the bundles that already exists in the system (alot of wiring on import packages that is). If a bundle is dependent on some osgi service does the configurator attempt to restart that service when its calling applyConfigurations()?

Thanks in advance,
Saminda

On Fri, Jul 31, 2009 at 6:55 PM, Pascal Rapicault <Pascal_Rapicault@xxxxxxxxxx> wrote:

The code in org.eclipse.equinox.simpleconfigurator.ConfigApplier#install does not restart all the bundles. It will only uninstall, install and start the bundles that have changed. However depending on the bundles you are updating and the wiring between all the bundles of the system, more bundles will be stopped, rewired (classloading dependency) and restarted. This is how OSGi works (see the PackageAdmin#refreshPackages). For example if you were to replace the eclipse extension registry in your SDK you would take most of the system down because of its central role, however if for example you are just installing a new SCM provider you don't have to restart the system.
HTH


Inactive hide details for Saminda Wijeratne ---07/30/2009 06:31:43 PM---Hi,Saminda Wijeratne ---07/30/2009 06:31:43 PM---Hi,


From:

Saminda Wijeratne <samindaw@xxxxxxxx>I

To:

p2-dev@xxxxxxxxxxx

Date:

07/30/2009 06:31 PM

Subject:

[p2-dev] Starting bundles programatically without restarting the system




Hi,

We have successfully integrated p2 to our wso2 products. We are now trying to see whether it is possible to hot install the features. i.e. once through p2 the feature is installed without restarting the equinox framework is it possible to programatically start the new bundles. Can this be done in current implementation? a workaround perhaps?

I've debugged through the existing ui code in Galileo and found the following code
           Configurator configurator = (Configurator) ServiceHelper.getService(Activator.getContext(), Configurator.class.getName());
           configurator.applyConfiguration();
I've included and tried the above code but seems to stop and start all bundles in the system rather than only the new ones. Any suggestions would be helpful.

Thanks in advance,
Saminda
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev



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


GIF image

GIF image


Back to the top