2019.9.25 disable Tomcat AJP connector Tomcat hot deployment and hot load

Disable Tomcat AJP connector

AJP (Apache JServer Protocol)

AJPV13 is packet-oriented protocol. WEB server and servlet container interact through a TCP link; as it saves the cost of expensive SOCKET created, WEB server will try to maintain a permanent TCP connection to the servlet container, and multiple requests and responses cycle will be reused link.

We generally use Nginx + tomcat architecture, so no need AJP protocol, so the AJP connector.

 

[the root @ localhost ~] # VI m  /usr/local/tomcat8/conf/server.xml // master configuration file to disable port apache 8009  

116     <!--

117     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

118     -->

[root@localhost ~]# /usr/local/tomcat8/bin/shutdown.sh

[root@localhost ~]# /usr/local/tomcat8/bin/startup.sh

[root@localhost ~]# netstat -lnpt | grep :8009

 ———————————————————————————————————————————————————————

Tomcat hot deployment and hot load

Project development process, often to change tomcat of JSP files, but do not want to restart the service  , restart the service because the server takes a long time, but want to directly debug results.

There are two ways: hot deployment and hot load

 

Thermal loading: In server.xml - set reloadable = "true"> context attribute

<Context docBase="/web/crushlinux" path="" reloadable="true" />

 

Hot deployment: In server.xml -> context attribute set autoDeploy = "true"

<Context docBase="/web/crushlinux" path="" autoDeploy="true" />

Difference between the two:

      Thermal load: class file server listens for change, including web-inf / class, wen- inf / lib, web-inf / web.xml and other documents, if changes occur, the local loading, do not empty the session, does not release memory. Multi-used development, but to consider the case of memory overflow. Note: The heat load is more load configuration file

      Hot deployment: redeploy the entire project, including your re-branded .war file.  It will clear the session, freeing memory . When packing items used more.    Note: When the project when packaged with multi-project and multi-use deployment

————————————————————————————————————————————————————————————————————————————

 

Guess you like

Origin www.cnblogs.com/otherwise/p/11585527.html