Tomcat中的Web应用程序部署 [英] Web app deployment in Tomcat

查看:129
本文介绍了Tomcat中的Web应用程序部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Tomcat是否为其容器中运行的每个Web应用程序使用不同的Java虚拟机(JVM),或者Tomcat中的所有Web应用程序是否在同一JVM下运行?

Does Tomcat use a different Java Virtual Machine (JVM) for each web application running in its container, or does all web applications in Tomcat run under the same JVM?

因此,对于一个具体的例子:如果webapps下的Web应用程序以编程方式启用JMX(通过系统属性)这是否意味着为容器中运行的所有Web应用程序启用了JMX?

So for a specific example: if a web application under webapps, enables JMX programmatically (via System properties) does this mean that JMX is enabled for all web applications running in the container?

我相信情况确实如此,但我想确认一下。

I believe this is the case, but would like to confirm.

这个问题来自我在这个帖子中的问题:关于tomcat和jmx的问题。有关该主题的任何输入都表示赞赏。

This question came up from my problem in this thread: question on tomcat and jmx. Any input on the subject is appreciated.

推荐答案

Tomcat在单个JVM中运行,因此部署到单个tomcat实例的每个应用程序都运行与每个其他应用程序在同一个VM中。他们得到不同的类加载器,因此他们在这个意义上彼此隔离,但JVM是相同的。

Tomcat runs in a single JVM, so every app deployed to a single tomcat instance runs in the same VM as every other application. They get different classloaders, so they're isolated from each other in that sense, but the JVM is the same.

因此,任何启用JVM范围的功能都将启用该实例中的每个应用程序。

So any feature enabled JVM-wide will be enabled for every application in that instance.

这篇关于Tomcat中的Web应用程序部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆