You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Rush <ya...@davidarush.com> on 2006/04/19 16:24:52 UTC
CATALINA_BASE and multiple instances
I'm trying to get Tomcat 5.5.16 set up for multiple independent
instances (for use by multiple developers w/out stepping on each others'
toes) in Windows XP (and eventually 2003 Server).
I've got the binaries installed in c:\Apache\Tomcat5, and this is where
the environment variable CATALINA_HOME points.
I've got one instance set up in c:\arcims-tomcat, and this is where
CATALINA_BASE points.
However, when I tried to install log4j, I had to put the .jar files and
log4j.properties files under CATALINA_HOME/common in order for it to
work. Putting them under CATALINA_BASE/common did not work. Obviously
this is a problem because then multiple instances, which all share
CATALINA_HOME would be intermixed in one log file. It also points to
the bigger problem of all instances sharing CATALINA_HOME/common for
everything.
Is there a way to get each instance of tomcat to use its own
CATALINA_BASE/common directory?
There's also the problem of getting multiple service-based tomcat
instances to have their own idea of what CATALINA_BASE points to.
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CATALINA_BASE and multiple instances
Posted by Rainer Jung <to...@kippdata.de>.
No help for Win services from me, but:
you can configure the tomcat classloaders via catalina.properties. Look
for the entries named common.loader etc. There you will find the reason,
why the common loader finds code in CATALINA_HOME/common/lib/*.jar, but
not in the analogous CATALINA_BASE directory. You can extend that
configuration using the property ${catalina.base}. You can even
configure the class loaders differently for various instances using the
startup option:
-Dcatalina.config=file://${CATALINA_BASE}/conf/catalina.properties
That way you will be able to shrink a tomcat instance in your file
system to a couple of kilobytes (plus webapps, logs etc.). Al the libs
will be shared from CATALINA_HOME.
--
Rainer
David Rush wrote:
> I'm trying to get Tomcat 5.5.16 set up for multiple independent
> instances (for use by multiple developers w/out stepping on each others'
> toes) in Windows XP (and eventually 2003 Server).
>
> I've got the binaries installed in c:\Apache\Tomcat5, and this is where
> the environment variable CATALINA_HOME points.
>
> I've got one instance set up in c:\arcims-tomcat, and this is where
> CATALINA_BASE points.
>
> However, when I tried to install log4j, I had to put the .jar files and
> log4j.properties files under CATALINA_HOME/common in order for it to
> work. Putting them under CATALINA_BASE/common did not work. Obviously
> this is a problem because then multiple instances, which all share
> CATALINA_HOME would be intermixed in one log file. It also points to
> the bigger problem of all instances sharing CATALINA_HOME/common for
> everything.
>
> Is there a way to get each instance of tomcat to use its own
> CATALINA_BASE/common directory?
>
> There's also the problem of getting multiple service-based tomcat
> instances to have their own idea of what CATALINA_BASE points to.
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CATALINA_BASE and multiple instances
Posted by Markus Schönhaber <ma...@schoenhaber.de>.
David Rush wrote:
> However, when I tried to install log4j, I had to put the .jar files and
> log4j.properties files under CATALINA_HOME/common in order for it to
> work. Putting them under CATALINA_BASE/common did not work. Obviously
> this is a problem because then multiple instances, which all share
> CATALINA_HOME would be intermixed in one log file.
That doesn't seem obvious to me.
> It also points to
> the bigger problem of all instances sharing CATALINA_HOME/common for
> everything.
As I understand it, the whole point in setting CATALINA_BASE and CATALINA_HOME
to different values is to have multiple Tomcat instances running from the
*same* set of binaries and libs. So, to me this seems to be exactly the way
it's meant to be.
> Is there a way to get each instance of tomcat to use its own
> CATALINA_BASE/common directory?
If there is a way, I know nothing of it.
But, as already suggested, you could run multiple Tomcat instances from
multiple installation directories. Or you could bundle log4j with the webapps
that need it instead of putting it in common/lib.
Regards
mks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org