tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bas Schulte <>
Subject Re: Configuring one webapp in 2 instances, system properties
Date Thu, 29 May 2008 21:55:28 GMT

I tend to agree with both you and Chuck. However... ;)

We're on a budget so separate servers is a no-op. Running multiple  
instances of Tomcat, with it's own start/stop script and it's own  
location for config files/libs etc. won't allow me to continue using  
debian's package management (I can already hear my sysadmin barfing  
at this solution). BTW, I do use this solution for activemq (there's  
no debian package for that ;)) and that's working fine.

The solution of building instance-specific war's using ant would work  
but my current skills (combined with my deadline) fall short. I've  
done ant scripts by hand but currently use NetBeans as my ide and  
haven't figured out how I can combine those two things.

I'll reconsider things, based on your input. Thanks.

On 29-mei-2008, at 22:39, Christopher Schultz wrote:

> Hash: SHA1
> Bas,
> Bas Schulte wrote:
> | I'd like to deploy my Spring-based webapp twice in the same Tomcat
> | instance, one for production and one for development.
> I agree with Chuck: you are asking for trouble with a production
> configuration that includes development.
> | Is there a way to set these properties in server.xml for both  
> instance
> | of my webapp? I plan on using 2 virtual hosts, something like  
> | and, each would get it's own set of system
> properties.
> System properties are, as the name might suggest, system-wide. So, you
> can't set "foo" to "bar" for one webapp and "baz" for the other. You
> have to choose.
> This is one reason I eschew system properties for any application
> configuration. We use ant to build our WAR files for deployment, and
> find that ant's <filter> (string replacement) capabilities are a very
> good way to configure for a particular environment.
> For instance. Want a dev config? Easy:
> $ ant -Drelease-type=dev war
> (builds dev WAR)
> How about a prod config? No problem:
> $ and -Drelease-type=prod war
> No muss, no fuss.
> You maintain either different property values or entirely different
> configuration files (which is what we have done) for each environment.
> We have a prod/tomcat-server.xml and dev/tomcat-server.xml, each with
> separate configuration (dev has only a single db connection in the  
> pool,
> for instance, while prod has many).
> - -chris
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAkg/FHgACgkQ9CaO5/Lv0PDqrQCfd8G/RW/fpg0eETU8qLl8XVno
> C7MAoLgzo2yZFByJ7RCQSPrLip72XA5p
> =a/25
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

                    bas a schulte   -   http://   -   -   -

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message