"Christopher Blunck" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all-
>
> Knowing how to perform one of the following two tasks would greatly
simplify
> my management scripts.  I'm not sure if they are even possible.  If so,
I'd
> be grateful for anyone sharing the information.
>
> #1: Set the path to server.xml in catalina.sh
> I want to use a server.xml that's located some place other than in the
conf
> directory in the file server.xml.  Is this possible?
>

$ catlina.sh -config /path/to/server.xml start

> #2: Set the connector port via a command line option in catalina.sh
> I want to define which port I want Catalina to listen on when it starts
up.
> It'd be nice to be able to specify this as a command line argument to the
> VM:  something like -DlistenPort=8080.  Is this possible?
>

This is possible in TC 3.3.1, and TC 5.0.16 (I think :).  You can get it in
TC 4.1.x by replacing the commons-digester.jar with the nightly version.  In
your server.xml file you configure the Connector with something like
port="${listenPort}".

>
> Here's what I'm trying to do, and maybe somebody will offer a better
solution.
>
>
> We have an EJB application, wrapped by SOAP.  We deploy SOAP inside of
Tomcat,
> and configure the SOAP servlet to connect to our EJB server.  We have many
> different EJB servers, each serving different purposes (internal test,
> external test, etc).  Each one will need a SOAP server wrapping it.  The
only
> difference between the SOAP wrappers is their configuration, which we
> constrol at runtime.  Basically, we say "SOAP server X, connect to EJB
server
> Y."
>
> We potentially need dozens of SOAP servers operating on the same machine,
each
> pimping requests to different EJB servers.  I don't want to have to
maintain
> a dozen copies of Tomcat when the only difference between them is the
runtime
> configuration of the SOAP servlet.  I do, however, need them to listen on
> different ports.
>
> My thought was:
>  1.) Change catalina.sh to output to logs/<listen port>/catalina.out
>  2.) Change server.xml's Logger references to go to logs/<listen port>
>  3.) Change server.xml's unpackWARs to false.
>  4.) Make the Connector port for Catalina a variable (@@LISTEN_PORT@@)
>  5.) Make the Management port a variable (@@MANAGEMENT_PORT@@)
>
> Write a tomcat.sh script that is used like:
>   ./tomcat.sh start 8080
>
> The script calculates a MANAGEMENT_PORT from the port provided (which is
the
> listen port).  Use sed to replace the variables in server.xml and output
the
> replaced file to tomcat/conf/server.xml.  Then call catalina.sh start.
>
>
> It'd be much cleaner tho if I could pass the listen port and mgmt port on
> the command line to the Tomcat JVM.  Alternatively, if I could pass the
path
> to the server.xml, that'd work too.
>
>
> Thoughts?
>
> -c
>
> -- 
>  15:35:00  up 42 days,  5:19, 13 users,  load average: 0.15, 0.22, 0.26




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to