On 16/02/2012 21:12, Jeffrey Janner wrote:
> Assume latest Tomcat 6.x for current deployment, and 7.x for future 
> deployments.
> 
> I host an app for a couple of dozen customers.  Naturally, upgrade time can 
> be a bit of a pain, and I'd like to simplify things.
> Assuming that all the customer-specific information (DB connection info, 
> logger info, etc.) can be described as resources in the context.xml file, 
> would it be possible to put the actual webapp in a single pre-exploded 
> directory without causing Tomcat fits?
> 
> Example directory tree:
> 
> Web-app-1.1
>     Images
>    META-INF
>    JSPs
>   WEB-INF  (with generic web.xml for web-app-1.1)
>      lib
>      classes
> 
> ROOT.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <Context path=""
>          docBase="path/to/Web-app-1.1">

The 'path' attribute is not valid here.

>   <Valve className="org.apache.catalina.authenticator.SSLAuthenticator"
>         securePagesWithPragma="false" />
>   <....resources definitions.... />
> </Context>
> 
> 
> Then when a new release comes out, I can deploy the web-app once and modify 
> the individual customer's contexts to point to the new release path as they 
> choose upgrade (or all at once).
> 
> And, yes, I know that disk is cheap and I could just do it by replacing 3-4 
> dozen war files nearly as easily.  And right now, I'm not sure if the future 
> 7.x versioning feature will come in handy as our dev staff haven't started 
> investigating 7.x yet.

Disclaimer: I haven't tested to see if it works, but I would try to
point the docBase to the .war file and allow each customer to have their
own exploded copy of the .war.  I would not share an exploded directory.


Having said that, in practice I'd probably just deploy 'n' versions of
the .war anyway.  As you say, disk is cheap & this way there's no
accidents if the application gets damaged.


Note, with Tomcat 7.0 the version feature allows you to specify *any*
string as the version string.

 ROOT##v1.0.1-customer-AAAA.war


p



> Jeff
> __________________________________________________________________________
> 
> Confidentiality Notice:  This Transmission (including any attachments) may 
> contain information that is privileged, confidential, and exempt from 
> disclosure under applicable law.  If the reader of this message is not the 
> intended recipient you are hereby notified that any dissemination, 
> distribution, or copying of this communication is strictly prohibited.  
> 
> If you have received this transmission in error, please immediately reply to 
> the sender or telephone (512) 343-9100 and delete this transmission from your 
> system.
> 


-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to