I've some doubt about tomcat operation which come across my webapp development:
Is there any way to shutdown tomcat itself from the webapp deployed in it? Is tomcat is running all of its webapps/war inside one JVM or individual JVM or its configurable in some configuration file? Is it possible to increase the java heap size for particular webapp deployed inside tomcat? Thanks a lot.
Open TCP connection from some servlet and send "SHUTDOWN" to Tomcat's shutdown port (default: 8005). One Tomcat uses one JVM for all applications. No. Only for the entire JVM. Here's code for point 1:
Socket clientSocket = new Socket("localhost", 8005);
clientSocket.getOutputStream().write("SHUTDOWN".getBytes());
clientSocket.getOutputStream().close();
clientSocket.close();
链接地址:
http://www.djcxy.com/p/59712.html
上一篇:
使用Zabbix / Nagios在Tomcat中进行应用程序级别监控
下一篇:
使用部署在其中的Web应用程序关闭tomcat