Thanks Peter, I didn’t know that. I agree this sounds a lot safer than an in-process update… do we have any documentation on this though?
Neil > On 7 Nov 2014, at 08:48, Peter Kriens <[email protected]> wrote: > > Neil, > The bnd launcher *does* support STOPPED_UPDATE as well as > STOPPED_BOOTCLASSPATH_MODIFIED. > > However, it does not restart the framework but expects the shell script that > invoked the launcher to restart the launcher. The launcher therefore returns > the process exit code UPDATE_NEEDED(-4). This was chosen over doing an > in-process update because it is much safer. So the launching script should > look something like: > > do { > bnd run app.bndrun > } while ($?==-4) > > Kind regards, > > Peter Kriens > > > On 6 nov. 2014, at 22:39, Neil Bartlett <[email protected]> wrote: > >> >>> On 6 Nov 2014, at 18:38, Ferry Huberts <[email protected]> wrote: >>> >>> >>> >>> On 06/11/14 19:11, Balázs Zsoldos wrote: >>>> You can call update on the system bundle that restarts the framework on >>>> a different thread. See chapter "4.6 The System Bundle" of OSGi core spec. >>>> >>> >>> Thanks, I'll try that! >> >> For this to work properly it does require the cooperation of the launcher, >> which has to detect the FrameworkEvent.STOPPED_UPDATE response from >> Framework.waitForStop(). As far as I know the bnd launcher does *not* do >> this, unfortunately. >> >> Neil >> >>> _______________________________________________ >>> OSGi Developer Mail List >>> [email protected] >>> https://mail.osgi.org/mailman/listinfo/osgi-dev >> >> _______________________________________________ >> OSGi Developer Mail List >> [email protected] >> https://mail.osgi.org/mailman/listinfo/osgi-dev > > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
