[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Automated bundle installation and startup without platform restart

So far, I've got an IApplication implementation that successfully works through Step #5. However, everything after Step 5 is giving me problems. As you know, the p2 logic only installs the IUs. It doesn't start the plugins, much less make their extension points available for creating executable extensions.

I tried to mimic the p2 UI logic by looking up the SimpleConfigurator and invoking its applyConfiguration() method. However, it caused the org.eclipse.core.runtime plugin to stop, kill the running Platform, and stop my IApplication instance and its plugin.
    For this to happens means that the bundles you are installing are not the same than those that you have been running since step #2. 
I understand that the point is to try to have a new application running, but what I'm getting at is that the installation of your application is causing a new version of the runtime (and maybe other bundles) to be brought in. Consequently, when you invoke applyConfiguration() on simpleconfigurator, the runtime bundles are stopped and uninstalled to get the new ones to run.
The easiest way to know if this is really the problem is to look at the content of the bundles.info before and after the install and see if some key bundles like runtime, osgi, equinox.app, and friends have not changed. simpleconfigurator does not do anything fancy, it just makes sure that all the bundles and only those listed in this file are indeed installed in the fwk and started accordingly.

One side note, from what I understand or your system, I would say that you may even want to ensure that the "management" application (the one that installs the other apps) and all its dependencies are not changeable since otherwise the install of an app could actually cause your management to be restarted while it is installing the new one :)



After that I tried to initialize my installed plugins manually, such as using the PlatformAdmin to set start levels, resolve, etc. However, I kept running into NoClassDefFound errors since some plugins didn't lazily initialize as expected.

I also tried to set up a separate profile, install my "heavyweight" features to the dropins directory, and use the reconciler APIs to initialize my plugins. Unfortunately, the app still tried to restart the org.eclipse.core.runtime plugin and kill the running Platform.

Any advice? This is a crucial step in making my RCP app lightweight and easier to deploy and update.

p2-dev mailing list