tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miller, Andy" <Andy.Mil...@hp.com>
Subject RE: Multiple server.xml files with Tomcat 4.0.3??
Date Wed, 22 May 2002 17:31:08 GMT
Great, works like a champ! I just modified my command thus:

tomcat.exe -install "%SERVICENAME%" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-Djava.class.path=%JAVACLASSPATH% -Dcatalina.home="%TOMCAT_HOME%" -Xrs
-start org.apache.catalina.startup.Bootstrap -params -config
"%TOMCAT_HOME%\conf\server-local.xml" start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
"%TOMCAT_HOME%\logs\stdout.log" -err "%TOMCAT_HOME%\logs\stderr.log" 

And it works like a champ!  Cheers!

-----Original Message-----
From: John Roth [mailto:john.roth@providersolutions.net] 
Sent: Wednesday, May 22, 2002 12:06 PM
To: 'Tomcat Users List'
Subject: RE: Multiple server.xml files with Tomcat 4.0.3??


I run a similar environment, but even though we don't use tomcat.exe to
start a service (we use jk_nt_service.exe to create, which uses
wrapper.properties to start) the start parameters should be the same.
There are a couple of choices:

1. add another parameter to the command below:
-Dcatalina.base={environment var pointing to the appropriate directory,
or hard coded path} or 
2. add -config parameter to startup pointing to the specific server.xml
(or whatever name you want)

Example: (from my wrapper.properties)
wrapper.cmd_line=$(wrapper.javabin) -Xrs -Xms128m -Xmx256m
-Djava.security.policy=="$(wrapper.tomcat_policy)"
-Dcatalina.base="$(wrapper.tomcat_base)"
-Dcatalina.home="$(wrapper.tomcat_home)" -classpath
$(wrapper.class_path) $(wrapper.startup_class) -config
$(wrapper.server_xml) start

Notes: 
- when setting up multiple environments, especially on the same machine,
pay close attention to the addresses/ports in use.  You will have to
change the individual shutdown ports for each instance, as the listen on
0.0.0.0.  Adding an address="x.x.x.x" to each <connector> will force
each connector to listen on a specific address instead of 0.0.0.0, so
all instances can use the default :8080 port.
- using catalina.base has some additional benefits/(or drawbacks,
depending on your opinion):  each environment I have set up uses it's
own directory structure for webapps, works, etc., so that all
environments can have their own data, deployment processes, etc.  Like
you, I have specific instances for dev, qa, staging, demo and
production, ranging across 2/3/4 machines (depending on what is going
on). Another advantage is the fact that I can move an instance to
another machine, and have it running in a few minutes simply by
removing/adding the specific IP address for the instance, and copying
the entire directory structure over.

Hope this helps,
John


-----Original Message-----
From: Miller, Andy [mailto:Andy.Miller@hp.com]
Sent: Wednesday, May 22, 2002 12:42 PM
To: Tomcat Users List
Subject: Multiple server.xml files with Tomcat 4.0.3??


I'm pretty new to Tomcat so please be patient with me if this is an
obvious question.  I'm trying to port our dev environment over to Tomact
from Resin and have come across a slight roadblock.  We have different
environments for local development, dev server, qa server, and
production.  Each environment requires different db connection pools, as
well as a few other minor tweaks in the server.xml from environment to
environment.  With resin, i can pass in a -conf parameter when i start
it up to give it the name of the appropriate config to use for that
environment (-conf resin-local.conf, -conf resin-qa.conf, etc).  Is
there a similar functionality with Tomcat 4.0.3 and it's server.xml
config file?  I really can't find much documenation on this.
 
Also, for note, i'm running tomcat as a service with the tomcat.exe
-install paramater which works great, not sure if that makes a
difference to what can be passed via the command line but my bat file to
set this up is as follows:
 
tomcat.exe -install "%SERVICENAME%" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-Djava.class.path=%JAVACLASSPATH% -Dcatalina.home="%TOMCAT_HOME%" -Xrs
-start org.apache.catalina.startup.Bootstrap -params start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
"%TOMCAT_HOME%\logs\stdout.log" -err "%TOMCAT_HOME%\logs\stderr.log"
 
 
Thanks,
 
Andy Miller
andy.miller@hp.com

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message