[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[equinox-dev] Re: Question on programatic close of the runtime
- From: Gunnar Wagenknecht <gunnar@xxxxxxxxxxxxxxx>
- Date: Sat, 13 Mar 2010 10:14:36 +0100
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:184.108.40.206) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3
Am 12.03.2010 18:11, schrieb
> Therefore I had the idea to provide this functionality via HTTP. So
> it's an external call that stops bundle zero and after a configurable
> timeout calls System.exit() (hopefully giving the runtime enough time
> to savely stop all bundles). So the System.exit() is done onpurpose
> by an administrator.
If it's your process and you launched it using the Equinox launcher
(launcher binary or java -jar ....) I suggest defining your own Eclipse
Have a look at http://bit.ly/cPGpIq. This bundle defines a "server"
application (http://bit.ly/c8ZfZu) which simply waits for a shutdown
signal (signalShutdown). This application is executed by Equinox on
startup (similar to the workbench application). As soon as it finishes,
Equinox will shutdown cleanly. No System.exit necessary.
There is also some preliminary code for a shutdown port in there. This
shutdown signaling from an external process. That's what most Java
server processes do (eg. Tomcat).