Learn OpenXava by example

OpenXava 4.2.3 released

Multitenancy applications for the Cloud with OpenXava

February 17, 2015

Multitenancy allows you to deploy an application once and this single application can server several companies at the same time, where each company has access only to its own data. This is perfect for SaaS (Software as a Service), so you can deploy your application in the cloud and rent it to many customers. Also it's very useful for creating multimunicipality applications for public administration. Even if you're not interested in multicompany applications having several isolated datasets allows you do interesting things, such as having a production and testing databases without effort.

Since v5.2 OpenXava supports multitenancy (with XavaPro). To support multitenancy it uses a new concept: Organization. You will find a new module, Organizations, in the Admin folder:

This new module allows creating a new organization just specifying its name and clicking a button:

After cliking on the button "Create new organization", the new organization is ready to be used in the specified URL. The creation process creates a new schema in the database, creates all the application tables and populates the admin tables. You can go to the company URL (/YourAplication/o/YourCompany) directly or to the application URL (/YourApplication). In the later case the sign in form will ask you for the company with a combo:

Each organization has its own users, passwords, roles and rights, of course.