Great ,thx. I don't actually use System.exit() but it has been reported to me a as a problem because the user was doing some persistence test and was killing the framework. The problem is that before the change is fully persisted, there is a window where if the process is killed, it won't restart in the correct state. Anyway, thx for the pointer to the bug.
On Fri, Mar 5, 2010 at 15:34, Thomas Watson <[email protected]> wrote: > See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=298416 for details. > > In the recent Equinox 3.6 builds you can specify the configuration property > eclipse.stateSaveDelayInterval=0 to get immediate persistence of the > framework cache. Although I still caution against using System.exit instead > of cleanly shutting down the framework. There is no telling what the other > bundles may be doing at the time you call System.exit. It would be much > better to shutdown the framework cleanly so that all bundles in the > framework are stopped and able to persist their information as well. > > Tom > > > > [image: Inactive hide details for "Alan D. Cabrera" ---03/05/2010 08:22:28 > AM---On Mar 5, 2010, at 1:53 AM, Guillaume Nodet wrote: I've]"Alan D. > Cabrera" ---03/05/2010 08:22:28 AM---On Mar 5, 2010, at 1:53 AM, Guillaume > Nodet wrote: I've had the problem because equinox actually persists the > system > > > From: > "Alan D. Cabrera" <[email protected]> > To: > OSGi Developer Mail List <[email protected]> > Date: > 03/05/2010 08:22 AM > Subject: > Re: OSGi Framework persistence underspecified ? (was: Re: [osgi-dev] Osgi > Launchers Question) > ------------------------------ > > > > > On Mar 5, 2010, at 1:53 AM, Guillaume Nodet wrote: > > I've had the problem because equinox actually persists the system > changes asynchronously. Unfortunately if another bundle persists > some > information using > BundleContext#getDataFile() > things can become out of sync. > > For example, consider the following bundle activator: > > public void start(BundleContext context) throws Exception > { > String location = "*http://host/bundle.jar* <http://host/bundle.jar> > "; > File persist = bundleContext.getDataFile("installed"); > if (!persist.exists()) { > bundleContext.installBundle(location); > OutputStream os = new FileOutputStream(persist); > os.write(location.getBytes()); > os.close(); > } > } > > Consider that as a dummy initial provisioning system. > > Now, your hope would be that if the installed file exists, the > bundle > is installed, right ? Unfortunately, there's no guarantee around > that. > Actually, I think Felix guarantee that, but Equinox does not, and if > you kill the process right after the activator has been called, upon > restart, the bundle will not be installed anymore. > > Is that an expected behavior ? Thoughts ? > > > This strikes me as a bug. After BundleContext.installBundle() returns the > framework must have persistently recorded the installation for later > restarts. > > > Regards, > Alan > _______________________________________________ > 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 > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com
<<ecblank.gif>>
<<graycol.gif>>
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
