On Monday 12 July 2010 12:17:40 André Warnier wrote:
> Rainer Frey wrote:
> > On Monday 12 July 2010 10:56:19 André Warnier wrote:
> >> Rainer Frey wrote:
> >>> Hi,
> >>> 
> >>> in the default case (just one instance, supplied start scripts),
> >>> CATALINA_BASE is set to CATALINA_HOME. But this assignment,
> > 
> > in catalina.sh
> > 
> >>> if [ -z "$CATALINA_BASE" ] ; then
> >>> 
> >>>   CATALINA_BASE="$CATALINA_HOME"
> >>> 
> >>> fi
> >>> 
> >>> is done *after* reading setenv.sh. Is this for a specific reason, or
> >>> just accidently?
> > 
> > [reason: using CATALINA_BASE in setenv.sh]
> > 
> So the question was in order to make sure that we were talking about one of
> the "official" Tomcat scripts, and trying to figure out when it is
> invoked.
> 
> This is still not so certain in your case : how do you start Tomcat, and do
> you know exactly which non-Tomcat and yes-Tomcat scripts are being called,

I thought that tar.gz-Download was clear enough. Yes this is the official 
download from tomcat.apache.org. Nothing else  is involved.

> in what order ? (under Linux, probably start with /etc/init.d/tomcatxx,
> and see what it does).

As I didn't mention anything apart the <quote>supplied scripts</quote>, there 
is no non-Tomcat script. (A reason that I didn't mention Linux in the first 
mail: people start to assume unmentioned things like init scripts or 
distribution packages ... ;) )

> All this to say that, depending on your Tomcat version and origin,
> setenv.sh /may/ not be the best place to define CATALINA_BASE.  

No! I want to *USE* CATALINA_BASE in my setenv.sh, not define it. I'll try to 
explain again:
catalina.sh
 * tests if CATALINA_BASE/bin/setenv.sh exists and sources it
 * otherwise tests if CATALINA_HOME/bin/setenv.sh exists and sources it
 * then tests if CATALINA_BASE is empty and, if so, sets 
CATALINA_BASE=$CATALINA_HOME

I want to know the config directory of the Tomcat instance in my setenv.sh. 
The way things are I need to check whether CATALINA_BASE is set, and if not, 
use CATALINA_HOME as base directory.

If catalina.sh would first set CATALINA_BASE to CATALINA_HOME if not set to 
anything else, I could always sue CATALINA_BASE in setenv.sh.

So my question is: are things done the way theyare for a reason, or is this an 
oversight that can be fixed? (in which case I could make a patch and open an 
issue to change that)
 
> I have not
> verified, but if catalina.sh looks for setenv.sh in $CATALINA_HOME/bin,
> then obviously it isn't, if your intention is to run several instances of
> Tomcat sharing the same bin directory.

No idea how you could imply that from my question. My intention is to have a 
common way to refer to the config directory in setenv.sh in single- and 
multiple-instance (with separate bin-directories) setups.

Rainer

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

Reply via email to