Is there an easy way to get Apache Tomcat to automatically reboot after deployment?

Our project uses Cruise Control to build and hot deploy a web application on a remote server (via FTP) under Tomcat control as a .war file. Unfortunately, hot deployments do not work properly, which causes Tomcat to restart in response to each deployment. We would really like to do this automatically, like the assembly itself. Is there an easy way to do this?

Side note: both machines are running Windows (XP or server, I think).

Side Note 2: Performance is not a big deal. This is an integration field.

+3
source share
7 answers

, - cron,

crontab -e

tomcat, , 1:30

30 1 * * * ./path_to_tamcat/bin/catalina.sh stop

2

32 1 * * * ./path_to_tamcat/bin/catalina.sh start

, .

+1

tomcat.bat( .sh) bin, , java- tomcat , tomcats port - . server.xml conf. ant tomcat , .

+1

tomcat Windows?

, .bat script, netstart netstop, .

+1

, Tomcat. , . , , .

server.xml reloadable = "true".

, , WAR , Tomcat , .

, , :

" , , ."

, . , . , .

, . , , , , . , , .

, , Tomcat , .

, , , script WAR , , . Tomcat , , Tomcat .

:

  • FTP WAR? , Tomcat ?
  • ? , ?
  • Tomcat ( )? , 5.5 ( 5.0, 5.5)? , ?
0

tomcat ? , , "" ?

0

= ""

( ), WEB-INF/ WEB-INF/lib, , , , .

, Tomcat , , . : "java.lang.OutOfMemoryError: PermGen space"

0

, " ", /WEB-INF/lib, ( , mail.jar API JavaMail), Context antiResourceLocking true. , webapp /META-INF/context.xml:

<Context antiResourceLocking="true">
    <!-- Your stuff here. -->
</Context>
0

Source: https://habr.com/ru/post/1697229/


All Articles