Deploy Web Applications on Tomcat

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

So, for a specific example: if a web application under webapps allows you to programmatically (according to system properties) use JMX, does this mean that JMX is enabled for all web applications running in the container?

I believe that this is so, but I would like to confirm it.

This question arose from my problem in this thread: a question about tomcat and jmx . Any input on this is appreciated.

+6
source share
1 answer

Tomcat runs in the same JVM, so every application deployed to the same tomcat instance runs in the same virtual machine as every other application. They get different class loaders, so in this sense they are isolated from each other, but the JVM is the same.

Thus, any feature that supports the JVM-wide will be enabled for each application in this instance.

+10
source

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


All Articles