Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Apache Tomcat start a new process for each deployed WAR?

When I deploy (and start) two WAR files on one Tomcat instance, how many Java processes will there be? In other words, will the threads handeling requests to the respective context roots fall under the same process, or will each thread pool fall under a sparate process?

like image 600
Rinke Avatar asked Sep 16 '25 01:09

Rinke


1 Answers

The Tomcat application server deploys all webapps into a single JVM by default.

However you can have multiple tomcat instances which can run their own JVM and have separate configurations and can be started/stopped independently.

Tomcat has had the ability to define and run multiple instances from a single copy of a binary distribution, and this functionality is well documented in the file RUNNING.txt at the root of the Tomcat binary distribution file hierarchy

Source

RUNNING.TXT example

Run multiple tomcat instances example

like image 64
Laurentiu L. Avatar answered Sep 18 '25 18:09

Laurentiu L.