You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by tnk <ju...@gmail.com> on 2015/06/04 15:39:26 UTC

Stopping bundle with endless loop in serviceMix

Hello,

  is there a way to completely stop bundle which has endless loop running?

  For example I bundle runs code inside (it is started by camel using timer)

while (true) {
	System.out.println("loop");
	Thread.sleep(2000);
}

 How to stop such bundle without stopping all servicemix? Executing
osgi:stop <bundle_id> stops the bundle (at least in osgi:list it is diplayed
as Resolved), but while loop is still runing.






--
View this message in context: http://servicemix.396122.n5.nabble.com/Stopping-bundle-with-endless-loop-in-serviceMix-tp5722671.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Stopping bundle with endless loop in serviceMix

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

you have to kill the thread first.

Regards
JB

On 06/04/2015 03:39 PM, tnk wrote:
> Hello,
>
>    is there a way to completely stop bundle which has endless loop running?
>
>    For example I bundle runs code inside (it is started by camel using timer)
>
> while (true) {
> 	System.out.println("loop");
> 	Thread.sleep(2000);
> }
>
>   How to stop such bundle without stopping all servicemix? Executing
> osgi:stop <bundle_id> stops the bundle (at least in osgi:list it is diplayed
> as Resolved), but while loop is still runing.
>
>
>
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Stopping-bundle-with-endless-loop-in-serviceMix-tp5722671.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Stopping bundle with endless loop in serviceMix

Posted by tnk <ju...@gmail.com>.
Hi,

 stopping with --force option doesn't help. Neither helps uninstalling
bundle (after uninstall it doesn't exist in data/cache folder) with infinite
loop - thread with the loop still remains..



--
View this message in context: http://servicemix.396122.n5.nabble.com/Stopping-bundle-with-endless-loop-in-serviceMix-tp5722671p5722753.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Stopping bundle with endless loop in serviceMix

Posted by Morgan Hautman <mo...@gmail.com>.
Hi,

You could try a stop with the --force option and if that's not 
succeeding I would try an uninstall and clear the karaf/data folder.

Regards,
Morgan

On 4/06/2015 15:39, tnk wrote:
> Hello,
>
>    is there a way to completely stop bundle which has endless loop running?
>
>    For example I bundle runs code inside (it is started by camel using timer)
>
> while (true) {
> 	System.out.println("loop");
> 	Thread.sleep(2000);
> }
>
>   How to stop such bundle without stopping all servicemix? Executing
> osgi:stop <bundle_id> stops the bundle (at least in osgi:list it is diplayed
> as Resolved), but while loop is still runing.
>
>
>
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Stopping-bundle-with-endless-loop-in-serviceMix-tp5722671.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.