tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <>
Subject Re: server configuration - shared appBase in multiple Host elements
Date Tue, 29 Jan 2008 14:43:44 GMT

i think there is no big troubles in having multiple host or even 
multiple tomcat instances share a common webapp repository, as long as 
the webapp are properly coded.

Tomcat will not write to the webapp base, unless you deploy using tomcat 
manager. Only exception is when you put a .war there, tomcat will 
explode and install it. If multiple tomcat/host are trying to do that at 
the same time, you can run into troubles :)

Mind however that those webapp do no try to write in their webapp 
directory for whatever reasons. And also, do *not* share the work/ 
directory, each tomcat should have his own :p

Note that, if you fear it fail, you can still have a stupid dump script 
that replicate a central webapp directory to each host's separate webapp 

Here, we have a common webapp shared between 2 host, we simply used a 
symbolic link for the webapp on second host (unix environment).
Chris Beckey a écrit :
> The question: has anyone tried to share a web application (appBase) between
> multiple virtual hosts?
> Background: the project I'm working on is a number of web applications that
> front a number (100's) of instances of a legacy application accessed through
> a custom protocol.  The number of Tomcat hosts will be less than the number
> of legacy data stores (i.e. one Tomcat host will front N instances of the
> legacy application).  Each legacy app instance has its own authentication
> and authorization data store, which must be passed through so that the
> Tomcat applications use that for its A&A.  A custom Realm has been coded and
> is working (it must know which legacy application instance to connect to).
> There are multiple web applications, dependent on the interface provided to
> their clients (apps have different protocols and function).  The number of
> interfaces (web applications) will increase over time.
> The plan of record is to have a virtual host per legacy app, and web apps
> for each interface provided.  The core of all of the applications resides in
> shared, common or server.
> Deployed conventionally, each host would have its own appbase, into which
> multiple web applications would be deployed.  If a particular host fronts 3
> legacy applications, each of which has 4 web apps then there would be total
> of 12 web apps to deploy, maintain, update, etc ...  multiplied by 100's of
> servers makes maintenance rather more difficult than desired (our
> development group of 4 will probably end up doing much of the maintenance
> and installation).
> To reduce the number of deployed applications while still maintaining the
> relation of Realm to legacy application instance, I tried deploying all of
> the web apps to a single directory and declaring multiple hosts with the
> same appBase value.  Each host has its own Realm configured for it.
> Initial testing was positive but its the kind of thing that just looks like
> it could cause trouble.  So back to the original question, has anyone tried
> this under load/production and how did it work?
> Thanks

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

View raw message