|
Re: How do I run OSGi as a daemon? [message #86703 is a reply to message #86687] |
Sat, 14 April 2007 08:18 |
Eclipse User |
|
|
|
Originally posted by: alex_blewitt.yahoo.com
You can specify -noExit on the command line to prevent it from terminating. In fact, the only reason why your networked console isn't terminating is because there's a thread servicing the network port; arguably, that should be a Daemon thread and it's a bug.
You can also have a bundle which starts a non-Daemon thread (to keep the JVM around) such that when that bundle terminates, the Daemon thread stops and thus the JVM goes down of natural causes. But you could also use the -noExit (which is equivalent to osgi.noShutDown=true) and then explicitly request a shutdown from inside the JVM by doing Bundles.getBundle(0).stop().
Alex.
|
|
|
|
Re: How do I run OSGi as a daemon? [message #86825 is a reply to message #86730] |
Mon, 16 April 2007 21:43 |
Eclipse User |
|
|
|
Originally posted by: alex_blewitt.yahoo.com
No, I didn't miss that detail; I said that it's equivalent in my second paragraph.
What's in the log? Perhaps your bundle can't start up due to an unresolved dependency? What does -consoleLog say when you try to run it from the command line?
Alex.
|
|
|
|
|
|
Re: How do I run OSGi as a daemon? [message #86895 is a reply to message #86880] |
Tue, 17 April 2007 17:50 |
Eclipse User |
|
|
|
Originally posted by: alex_blewitt.yahoo.com
Would have been helpful to know you were running a runtime PDE instance rather than from the command line earlier ...
You're running as an Equinox OSGi Framework or an Eclipse Application? I'm guessing the former. What are the start levels specified, and are your plugin(s) started?
Even with an empty plugin, I still don't get the framework going down on me in 3.2.2; the framework runs as expected. Even an exception in the Activator doesn't shut the framework down.
In short, I can't replicate what you are seeing.
What happens when you run it outside of Eclipse with a command line, instead of the PDE?
Alex.
|
|
|
Re: How do I run OSGi as a daemon? [message #86910 is a reply to message #86895] |
Tue, 17 April 2007 18:54 |
Bryan Hunt Messages: 366 Registered: July 2009 |
Senior Member |
|
|
From my original posting:
Is there an interaction with running OSGi from the Eclipse IDE that
causes it to shutdown independent of the noShutdown parm?
Yes, I'm running as an OSGi Framework. The default start level is set
to 4, a copule of bundles have a start level of 1, some 2, one 3, and
some the default. All of the bundles start just fine, and the
application works just fine if I specify -console.
I suppose I should try to replicate this with 3.2.2 - I've been doing
all of my testing with 3.3M6.
Bryan
On 2007-04-17 08:50:26 -0500, Alex Blewitt <alex_blewitt@yahoo.com> said:
> Would have been helpful to know you were running a runtime PDE instance
> rather than from the command line earlier ...
>
> You're running as an Equinox OSGi Framework or an Eclipse Application?
> I'm guessing the former. What are the start levels specified, and are
> your plugin(s) started?
>
> Even with an empty plugin, I still don't get the framework going down
> on me in 3.2.2; the framework runs as expected. Even an exception in
> the Activator doesn't shut the framework down.
>
> In short, I can't replicate what you are seeing.
>
> What happens when you run it outside of Eclipse with a command line,
> instead of the PDE?
>
> Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.03672 seconds