开发者

embedded Tomcat 6 - shut down after start

I wanna use an embedded Tomcat V6. The code works perfectly, but only as long as the programm is running. So if there is no Thread.Sleep it will exit immediately, otherwiese keep on running till the time is up.

How can I keep the emmbedded Tomcat alive. setAwait(true) should deal with this, shouldn't it? But i does not work. Trie开发者_开发技巧d to figure out more about this, but there is nothing in the description. Any other ideas?


If you want your embedded Tomcat to run indefinitively you will need some code to handle outside administrative requests (like restart, shutdown, stuff like that). That will go in your main thread, incidentially keeping the Tomcat instance alive.


This class should do what you are looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜