Skip to main content

[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

Can I force them from being refreshed? I like what you said below about making sure "that the 'management' application (the one that installs the other apps) and all its dependencies are not changeable." Is there some kind of "magic" configuration option that makes a bundle (or set of bundles) not changeable?

The only required magic is to make sure that all the bundles, features and other configuration that constitute your management applications are all required down to the specific version number (including qualifier). This way when the resolver run, it can not do any differently but to pick those versions.

HTH

Pascal

 
Thanks,
Chip

 
-----Original Message-----
From: Pascal Rapicault <pascal@xxxxxxxxxxxxx>
To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
Sent: Fri, Oct 19, 2012 8:49 pm
Subject: 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 :)

HTH

Pascal



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.

Thanks,
Chip
_______________________________________________
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
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


Back to the top