karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: When executing commands using karaf's bin/shell there is a huge delay before the command exits.
Date Sun, 17 Jun 2012 18:28:10 GMT
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


Mime
View raw message