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

Existing bundles may get pulled into the refresh operation performed by the Configurator for a couple of reasons

1) If the existing bundles have optional dependencies which are not currently satisfied AND you install new bundles that can provide a supplier to these optional dependencies.
2) If you are installing a bundle with the same Bundle-SymbolicName as an already installed bundle.

If that is not the case then I am not sure why you are seeing additional bundles get refreshed during an apply configuration operation. Either way it sounds like the bundles that are being stopped in your case should be restarted. But it appears that there are some dynamic and/or ordering issues with these bundles that does not allow them to be stopped and restarted at runtime.

Tom



Inactive hide details for Saminda Wijeratne ---08/03/2009 12:13:40 PM---Hi Pascal,Saminda Wijeratne ---08/03/2009 12:13:40 PM---Hi Pascal,


From:

Saminda Wijeratne <samindaw@xxxxxxxx>

To:

P2 developer discussions <p2-dev@xxxxxxxxxxx>

Date:

08/03/2009 12:13 PM

Subject:

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




Hi Pascal,

I've debugged the Configurator class and found the following flow. The implementation class was org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl
org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration()
which calls applyConfiguration(configurationURL)
which calls configApplier.install(url, isExclusiveInstallation()); - (configApplier is instance of org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier)
which calls refreshPackages(additionalRefresh, manipulatingContext);
which calls packageAdminService.refreshPackages(bundles); - (packageAdminService is instance of org.eclipse.osgi.framework.internal.core.PackageAdminImpl)
which calls refreshPackages(input, false);
which has a thread defined having doResolveBundles(copy, true) in the run method.
doResolveBundles(copy, true) gets called in thread
which calls processDelta(delta, refreshPackages, systemState);
by this time the refresh array contains bundles other than the newly added bundles (I think all the bundles (which some of them defines the osgi services i mentioned earlier) which has the dependant packages for the newly added bundles).
and the bundles specified in refresh array gets suspended in this function (which eventually actually puts the bundles in INSTALLED state) which effectively stops the bundle. :(

Saminda

On Sat, Aug 1, 2009 at 9:07 AM, Saminda Wijeratne <samindaw@xxxxxxxx> wrote: _______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


GIF image

GIF image