Rajiv, all
Thinking about it, my resource loader proposal for Servlet 3.1 might
have a multi-tenancy story as well as a dynamic deployment story.
I initially focused on a single tenant being able to dynamically
(hot)deploy resources. However, being able to define custom resource
loaders will also enable resource sharing across multiple tenants
without having to use container specific hacks or custom builds of
webapps.
I've uploaded a patch to the Jira issue which adds the ResourceLoader
interface and the ServletContext.addResourceLoader method. The patch
also includes a working implementation of resource loader support in
Glassfish trunk.
Finally, I've also uploaded a proof-of-concept web application. This
application tests the container's implementation of the ResourceLoader
API. And just for fun, I threw in a ResourceLoader backed by OSGi
bundles using Apache Felix.
Eirik.
[1]
http://java.net/jira/browse/SERVLET_SPEC-2
On Sat, Dec 10, 2011 at 1:36 AM, Rajiv Mordani <rajiv.mordani_at_oracle.com> wrote:
> I haven't heard from others on what the thought is here. Any one else have
> an opinion? Suggestions on what we should target in this version of the
> spec?
>
> Thanks
>
> - Rajiv
>
>
> On 11/16/2011 1:31 PM, Greg Wilkins wrote:
>>
>>
>>
>> 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
>>
>