Endless loop in servlet - recovery possible?

Today I fixed a bug in the application that could lead to an infinite loop in the servlet's request / response loop.

So just out of curiosity: what happens if my servlet really gets into the for (;;) loop?

How can I recover? Will a cat detect this? Is it possible to kill this instance without rebooting the server?

Or is this one of the worst things that can happen and a very quick way to kill a web container?

EDIT: It was a real endless loop consuming a processor all the time, but not memory. I continued to work for several minutes. I think I can confirm that tomcat will not detect this kind of thing :-)

+5
source share
5 answers

, Tomcat . , Tomcat, . , , .

;-) , ...

+1

, Tomcat , , , - Websphere. , , , "" . .

+1

, StackOverflowException.

"" , / ​​ OutOfMemoryException.

tomcat , .

+1

All Articles