System.exit is of course a way to make sure you get a fast exit. The
problem is that if something is to be cleaned up in the background it
will simply be cut off.
So the cleaner way is to not use System.exit and make sure our
background threads terminate fast. This can be a bit tricky though :-)
Christian
Am 17.06.2012 18:17, schrieb Ioannis Canellos:
Last week I tried to run some Karaf based commands outside OSGi using
Karaf's bin/shell.
I noticed something strange. The commands run normally but in many cases
the shell didn't return after the command execution and it even took like a
minute or so for the commands to return.
I think that the main reason this happens is that we don't have a
System.exit(0) after the command execution and that keeps the jvm alive for
a while.
Do you see any reason why we shouldn't have an explicit System.exit(0) ?
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com