Shutdown [message #100299] |
Thu, 25 October 2007 05: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 #100454 is a reply to message #100438] |
Sat, 27 October 2007 21:46 |
Eclipse User |
|
|
|
Originally posted by: codex.magic-dreams.de
I am launching with org.eclipse.osgi, that is right.
I have the following config.ini:
osgi.bundles=org.eclipse.equinox.common@2:start,
org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start
osgi.noShutdown=false
osgi.noExit=false
eclipse.application=EquinoxTest1.equinoxtest
The application looks like:
public class EquinoxTest1 implements IApplication {
public Object start(IApplicationContext context) {
System.out.println("EquinoxTest1");
return IApplication.EXIT_OK;
}
public void stop() {
}
}
Normally I don't run with a console, because I don't want the user to
notice there is osgi behind (at least at first glance).
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
|
|
|
Re: Shutdown [message #100868 is a reply to message #100299] |
Fri, 02 November 2007 09:14 |
Eclipse User |
|
|
|
Originally posted by: codex.magic-dreams.de
Does nobody have an idea?
> 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 09: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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03295 seconds