Shutdown [message #100299] |
Thu, 25 October 2007 01:48  |
Eclipse User |
|
|
|
Originally posted by: codex.magic-dreams.de
Hello,
I have an application (Eclipse 3.3, implementing the IApplication
interface). I run the application by specifying it in the config.ini.
noShutdown and noExit are set to false. When I start osgi, the
application is started, executes and exits. Unfortunately the framework
is not stop. When I examine the active apps, my application is stopped.
How can I trigger a complete shutdown from my application? I tried
several methods:
- System.exit works but I suppose this is not a clean an preferred way
- EclipseStarter.shutdown also works, but I don't use it for starting so
why should I use it for shutdown. Does that work? I also get a
discouraged access warning for EclipseStarter.
What is the correct way to do something like that?
Thanks
Wolfgang
|
|
|
|
|
|
Re: Shutdown [message #100882 is a reply to message #100299] |
Fri, 02 November 2007 05:31   |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.de
Wolfgang,
I can remember that it took me a while, too, to get my application
running properly. Do you declare your application to run on the main thread?
<extension
id="app"
point="org.eclipse.core.runtime.applications"
name="CDOServer">
<application cardinality="1" thread="main">
<run
class=" org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplicat ion "/>
</application>
</extension>
Regards,
Eike Stepper
----
http://wiki.eclipse.org/?title=CDO
http://wiki.eclipse.org/?title=Net4j
Wolfgang Roessler schrieb:
> Hello,
>
> I have an application (Eclipse 3.3, implementing the IApplication
> interface). I run the application by specifying it in the config.ini.
> noShutdown and noExit are set to false. When I start osgi, the
> application is started, executes and exits. Unfortunately the
> framework is not stop. When I examine the active apps, my application
> is stopped. How can I trigger a complete shutdown from my application?
> I tried several methods:
> - System.exit works but I suppose this is not a clean an preferred way
> - EclipseStarter.shutdown also works, but I don't use it for starting
> so why should I use it for shutdown. Does that work? I also get a
> discouraged access warning for EclipseStarter.
>
> What is the correct way to do something like that?
>
> Thanks
> Wolfgang
|
|
|
Re: Shutdown [message #101061 is a reply to message #100454] |
Mon, 05 November 2007 12:00  |
Eclipse User |
|
|
|
Wolfgang Roessler wrote:
> When I run with console, the thread output is:
>
> ThreadGroupType: Name: ParentGroup: MaxP: Threads:
> ThreadGroup main system 10 5/5
>
> ThreadType: Name: ThreadGroup: Prio:
> Thread DestroyJavaVM main 5
> Finalizer$Finalize Finalizer system 8 [daemon]
> EventManager$Event Framework Event Dispa main 5 [daemon]
> Thread OSGi Console main 5
> Reference$Referenc Reference Handler system 10 [daemon]
> Thread Signal Dispatcher system 9 [daemon]
> EventManager$Event Start Level Event Dis main 5 [daemon]
> Thread State Saver main 5
>
> ss outputs:
>
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE org.eclipse.osgi_3.3.0.v20070530
> 1 ACTIVE org.eclipse.equinox.common_3.3.0.v20070426
> 2 ACTIVE org.eclipse.update.configurator_3.2.100.v20070
> 3 ACTIVE org.eclipse.core.runtime_3.3.100.v20070530
> 4 RESOLVED EquinoxTest1_1.0.0
> 5 <<LAZY>> org.eclipse.core.contenttype_3.2.100.v20070319
> 6 ACTIVE org.eclipse.core.jobs_3.3.0.v20070423
> 7 ACTIVE org.eclipse.equinox.app_1.0.0.v20070606
> 8 ACTIVE org.eclipse.equinox.preferences_3.2.100.v20070
> 9 ACTIVE org.eclipse.equinox.registry_3.3.0.v20070522
>
> Wolfgang
This indicates that the framework is not being shutdown at all. But I'm
not sure how this is possible. Could you please attach the debugger and
step through the shutdown process in EclipseStarter#run(String[],
Runnable) method. Make sure the shutdown() method is being called from
the finally block:
To attach a debugger you should be able to launch with something like this:
java -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=800 0
org.eclipse.osgi_<version>.jar
Then you should be able to attach to the remote java process from your
eclipse.
Tom.
|
|
|
Powered by
FUDForum. Page generated in 0.04586 seconds