tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat Java Settings for each webapps, and virtual host strange issue.
Date Thu, 26 Dec 2013 13:02:40 GMT
Peter wrote:
> Hi all, I am having strange issues with tomcat 7 as well as tomcat 8,
> following is details of that issue, please someone help me to configure
> java for each webapps
> 

Thanks for all the detailed information.

But I believe that you have things the wrong way around.
It is not a question of "the webapp (or Tomcat) choosing its Java JVM".

If you look at the way in which Tomcat is being started (script in /etc/init.d or 
(tomcat_dir)/bin/startup.sh), you will see that the command being run is "java", followed

by parameters which tell this "java" which Java code modules to run.
(And not the other way around).

 From the OS point of view, the process which really runs on your computer is a JVM (Java

Virtual Machine) (./java or whatever).  Once you start this particular JVM process, you 
tell it to load and run some Java code : in this case, a Tomcat java code module.  This 
Java code then starts to run (inside the JVM), and it reads its configuration files 
(server.xml etc.) to set itself up. This includes which TCP/IP ports it should be 
listening on, which Hosts and webapps it should load and configure etc.

You can start and run several (identical or different) JVM's concurrently, as distinct 
processes within your OS, and you can tell each one to run a different set of Java code 
modules : e.g. another Tomcat instance with different parameters, different Hosts and 
different webapps.
(As long as the different instances do not conflict with one another, for example by 
trying to use the same TCP/IP ports).





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message