On Tue, Nov 17, 2009 at 10:45 PM, Richard S. Hall <[email protected]> wrote: > On 11/17/09 15:59, Patrick Forhan wrote: >> >> On Tue, Nov 17, 2009 at 2:55 PM, David Gallardo<[email protected]> >> wrote: >> >>> >>> Can't you register a shutdown hook at start up that will do the right >>> thing--send shutdown to shell service or stop bundle 0--when >>> System.exit(0) is called? >>> >> >> That is possible. I guess I'm wondering whether I need to do the >> right thing at all -- what's the downside(s) to just doing a >> System.exit? >> >> > > If you are using Felix Main (i.e., the default launcher for the framework) > 2.x, then it already registers a shutdown hook to do the "right thing". > > BTW, the "shutdown" command and "stop 0" are equivalent... > > Currently, there is no real harm in just doing a System.exit(), but that > doesn't mean this will always be true in the future.
Thats not correct in all cases. If the framework is still starting-up and you call system.exit inside an activator we might deadlock for example. You would need to disable our shutdown hook for this to work. Anyways, using System.exit seems the wrong way to solve this. regards, Karl > Best approach is to properly shutdown and report any issues you run into so > we can try to diagnose and/or correct them. > > -> richard > >> Pat. >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Karl Pauls [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

