Web app deployment in Tomcat

萝らか妹 提交于 2019-12-07 02:02:54

问题


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?

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.

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


回答1:


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.

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



来源:https://stackoverflow.com/questions/5764429/web-app-deployment-in-tomcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!