On 18-Oct-2010, at 7:03 AM, Taylor, Richard wrote:
> Shutting down bundle zero will gracefully shutdown the OSGi framework.
> Setting the osgi.forcedRestart property will force an exit code that
> signals the launcher to restart the OSGi framework ... however I'm not
> sure what the standard eclipse launcher does when it sees this exit
> code: our customized launcher restarts it.

Hmm, I'm not seeing this occur in my testing: my application is never restarted 
(I'm using the e4-provided E4Application IApplication instance that only 
returns IApplication.EXIT_OK).  Usually the application exits cleanly.  On some 
occasions I've had an IllegalStateException after the conclusion of my 
IApplication.start():

!ENTRY org.eclipse.equinox.app 2 0 2010-10-18 14:10:58.407
!MESSAGE An error occurred while stopping the application: 
ca.mt.kizby.p2.update.app.0
!STACK 0
java.lang.IllegalStateException: This instance of the application has been 
stopped:  ca.mt.xxx.p2.update.app.0
        at 
org.eclipse.equinox.internal.app.EclipseAppHandle.getState(EclipseAppHandle.java:77)
        at 
org.osgi.service.application.ApplicationHandle.destroy(ApplicationHandle.java:210)
        at 
org.eclipse.equinox.internal.app.EclipseAppContainer.stopAllApps(EclipseAppContainer.java:384)
        at 
org.eclipse.equinox.internal.app.EclipseAppContainer.bundleChanged(EclipseAppContainer.java:372)
        at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
        at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
        at 
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
        at 
org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1349)
        at 
org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1300)
        at 
org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:679)
        at 
org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:588)
        at 
org.eclipse.osgi.framework.internal.core.InternalSystemBundle$1.run(InternalSystemBundle.java:243)
        at java.lang.Thread.run(Thread.java:637)


_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to