|Re: How to shutdown an Equinox program ? [message #103846 is a reply to message #103832]
||Mon, 14 January 2008 15:28
| Mickael GAUVIN
Registered: July 2009
Thank you for all these explanations. Now I have a good overview on the
different possibilities to shut down my application.
Tom Watson a écrit :
> By "application" I assume you mean an Eclipse application provided by an
> extension to the org.eclipse.core.runtime.applications extension point.
> Since Eclipse 3.3.0 the Eclipse application container has implemented
> Application Admin specification of OSGi which allows it to be better
> integrated into the OSGi lifecycle. Before Eclipse 3.3 the Eclipse
> application container was not aware of the OSGi lifecycle. The only way
> to shutdown the application was to have the application itself return
> from its run() method on IPlatformRunnable. At that point the framework
> would be shutdown.
> In 3.3 the application container introduced the IApplication interface
> which allows for an application to be asked to stop. This allowed us to
> plug the Eclipse application container into the OSGi lifecycle. This
> will give you the following options for shutting down the platform
> 1) Application controls shutdown. This is the same as in pre-3.3
> Eclipse. When the default application returns from its
> IApplication#start method then the framework is shutdown.
> 2) Call system bundle stop() method. The application container will
> recognize this and cause the running applications to stop and then the
> framework will continue to shutdown.
> 3) Get the ApplicationHandle OSGi service for the running default
> application and call the ApplicationHandle#destroy. This will cause the
> default application to stop. When the defautl application returns from
> its IApplication#start method then the framework is shutdown.
> In all cases when the framework is shutdown all active bundles are
> stopped which allows them to run clean up code before the framework
> completely shuts down.
Powered by FUDForum
. Page generated in 0.05393 seconds