jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: [servlet-spec users] Re: Multi-tenancy and web container

From: Greg Wilkins <gregw_at_intalio.com>
Date: Thu, 17 Nov 2011 08:31:02 +1100

FYI how we currently support this in Jetty is with an overlay deployer.

The overlay deployer allows a single war to be overlayed with 1 or more war
files to create a specific instance for a tenant.

We deploy the WAR file unchanged from it's normal distribution (it can be
RO and signed if need be), and then overlay a WAR file with all the common
configuration and customisations for all tenants. Each tenant then has
an overlay WAR that contains just their configuration and customisations.

Each WAR can add or replace static content (eg adding style sheets, logos,
XML config files), can add web.xml fragments or can replace the entire
web.xml

The intent is that the per tenant war has only the data that is specific to
that tenant. If the webapp is upgraded, then in many cases the tenant war
can be overlayed on the new base war version.

regards