[javaee-spec users] Re: Persistent application configuration

From: Enrico Olivelli <>
Date: Sun, 29 Jul 2012 18:33:38 +0200

In my personal experience I saw two types of "multi tenancy"
1) deploy one instance of a JavaEE application per tenant
Use config files (.properties files, or web.xml env-entry elements...)
to enable/disable part of the application and to do some little
2) build an application creating something nore like a container,
picking up Tomcat, Weld, Metro, ActiveMQ....etc...and mixing them in
order to be able to use JavaEE features in a "multi-tenant" fashion. I
think that this case is out of the scope of JavaEE

What I espect from JavaEE thinking about configuration and multi-tenancy is:
the developer declares in the application descriptors (or with
annotations....) the parameters that can be customized for each tenant.
the application is deployed once on a container and the administrator
can "add" tenants, overriding those "special" parameters for the new tenant
it would be usefull that resources like JMS destinations, Datasources,
Realms....could be specialized for each tenant
It is important that each Tenant is isolated from the others, so if
resources cannot be specialized the container have to support this
isolation in the JPA/JMS... layers, trasparently to the developer point
of view
for web endpoints there must be a way to route requests to each tenant
(for example with HTTP Host headers, application context path.....)

Il 29/07/2012 10:48, Craig Ringer ha scritto:
> On 07/28/2012 01:31 AM, Enrico Olivelli wrote:
>> some examples of configuration parameters that can be different for
>> each tenant:
>> - some parameter that enables/disables some feature of the application
>> - name of the app (for example a logo in the header of the webapp) ?,
>> help desk email addesses/phone numbers
>> - resource usage limits ?
>> - datasources ?
>> - javamail sessions ?
>> - jms destinations ?
> Out of interest: How do you currently isolate tenants? Do you have to
> deploy multiple copies of the app, one per tenant? Do you use dynamic
> datasources, programmatic login, etc to try to handle it within one
> deployed instance? Do you use multiple container instances with one
> tentant per container?
> --
> Craig Ringer