tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Multiple Tomcat Instances
Date Wed, 16 Jun 2010 16:10:48 GMT
Hash: SHA1


On 6/16/2010 11:36 AM, Leo Donahue - PLANDEVX wrote:
>>> From: André Warnier []
>>> Subject: Re: Multiple Tomcat Instances
>>> The other part that is confusing me is that what if all users are
>>> running a "process" of Tomcat at the same time, I'm assuming they all
>>> have to use a separate HTTP port and shutdown port?
>>> You are not confused here. That is correct.
>>> If you have several Tomcat /instances/ (actually, they will be instances of java,
running Tomcat),
>>> not two of them can open the same server port at the same time.
>>> If you are running one single instance of Tomcat (of java running Tomcat) with
>>> "virtual hosts" defined in it, then there is only a single shutdown
>>> port, and there /can/ be a single HTTP port shared by all virtual hosts (or,
just to add some
>>> confusion, there can also be several ports :-)).
> RUNNING.txt says:  
> "... Note that by default Tomcat will first try to load classes and JARs from
> $CATALINA_BASE/lib and then $CATALINA_HOME/lib. You can place instance specific
> JARs and classes (e.g. JDBC drivers) in $CATALINA_BASE/lib whilst keeping the
> standard Tomcat JARs in $CATALINA_HOME/lib  ..."
> The doc didn't mention that Tomcat will calculate a "relative"
> reference for files in /lib, a few lines above this quote.  I'm
> assuming I also need a /lib directory in $CATALINA_BASE then.

No, you don't have to have one, but if it's there, Tomcat will prefer
the more-specific library(ies) found in CATALINA_BASE/lib to those found

> If I place copies(?) of bin, conf, logs, webapps, work and temp in my
> $CATALINA_BASE directory, then how is that different from just 
> downloading multiple Tomcat zip files and naming them separately, 
> changing the startup/shutdown ports on each?

If you copy everything, then there is no difference. It's more typical
to only create conf/server.xml and a separate webapps directory for the
separate instance. The 'work' and 'temp' directories (and "logs"? I
haven't checked) will automatically be created for you. Run the scripts
from CATALINA_HOME and they will use CATALINA_BASE to figure everything out.

Something not yet mentioned that can be done when using CATALINA_BASE is
that you can have separate versions of the JVM running the same version
of Tomcat, if that's useful to you. For instance, in production, we run
4 separate JVMs - one for each of our primary web applications. Some of
those applications haven't yet been tested extensively under Java 6,
yet, so we run them on Java 5 instead.

> The only thing I'm gaining is only needing the two files in my
> $CATALINA_BASE/bin instead of all the other files? What else? What was
> the deciding factor to be able to run multiple Tomcat instances?

If you use a minimal set of files in CATALINA_BASE, then upgrading
multiple (separate) installations of Tomcat is easily done by simply
installing a new version of Tomcat into a new directory and running the
new startup script. You can even switch-back to the old version fairly
easily: run the startup script from the old version instead. ;)

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message