Tomcat Hot Deploy to instance hosting several applications
Asked Answered
D

1

5

My question is about deployment to a Tomcat server instance which hosts multiple applications and hosts application contexts for Struts, Spring, and Hibernate. I would like to deploy changes to one application without restarting my Tomcat server.

As an example, many times in our firm we have to deploy new applications or versions of applications to our tomcat enviroment and the process could be:

  • Move class and jsp to the exploded folder then the context reload itself, or
  • Another scenario is when we have to deploy new features which require modifications to xml contexts such as struts-config.xml or spring-application-context.xml.

Currently we have to restart the web-server to load new configuration. This would be OK if Tomcat did not have other live applications which we did not want to interrupt and restart. As an example, if I have an application which uses hibernate and struts, then I have to re-deploy it to a Tomcat server with many other applications running, and I deploy the new application and restart the server. This is not ideal.

So the question is when deploying changes to Tomcat, including context changes, do I have to restart? Is there a way to do a hot deploy for only this specific application and maybe re-start only its context without restarting the webserver?

Thanks a lot!! Best regards

Desta answered 25/10, 2011 at 6:42 Comment(1)
You can at least restart a single tomcat webapp FWIW How do I update a Tomcat webapp without restarting the entire service?Tick
G
8

You can set the "autoDeploy" attribute to "true" in server.xml. You can read more detailed information here http://www.mulesoft.com/tomcat-deploy.
Hope this helps.

Grisly answered 25/10, 2011 at 8:23 Comment(1)
I read this, so 2 comment/question: 1)Deploy != re-deploy. 2)"Re-deploy existing applications by copying an updated WAR file into the appBase" Ok there any way to keep production cofiguration file remotely during this procedure? Since deploy with war meas delete the old folder and explode the new one.Desta

© 2022 - 2024 — McMap. All rights reserved.