Tomcat Hot Deploy到实例托管多个应用程序 [英] Tomcat Hot Deploy to instance hosting several applications
问题描述
举个例子,我们公司很多时候都必须部署新的应用程序或版本的应用程序我们的tomcat环境和过程可以是:
- 将类和jsp移动到展开的文件夹,然后上下文重新加载本身,或 另一种情况是当我们必须部署新的功能,这些功能需要
修改xml上下文,例如
struts-config.xml
或 spring-application-context.xml
。 目前我们必须重新启动web-服务器加载新配置。如果Tomcat没有其他不想中断和重新启动的实时应用程序,这将是可行的。例如,如果我有一个使用hibernate和struts的应用程序,那么我必须将其重新部署到运行许多其他应用程序的Tomcat服务器,并且我部署新的应用程序并重新启动服务器。这样做不太理想。
所以问题是在Tomcat上部署更改时,包括上下文更改,是否必须重新启动?是否有为了只针对这个特定应用程序进行热部署,并且可能只重新启动其上下文而不重新启动网络服务器?
非常感谢!
最好的问候
可以在server.xml中将autoDeploy属性设置为true。您可以在这里阅读更多详细信息。 http://www.mulesoft.com/tomcat-deploy 。
希望有帮助。
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
orspring-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
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.
这篇关于Tomcat Hot Deploy到实例托管多个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!