...
Info | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Commit history and discussions regarding these enhancement can be tracked from JIRA task
|
Introduction
Multi-tenancy is the ability to run separate data instances (tenants) from a single code base. In this case each tenant will have its own database. A user logs into a data instance (or tenant) by specifying the tenant ID in the login form or by hitting tenant specific url . A default database is still used although.
...
In order to add support to add domain name while setting up new tenant, 'create-tenant' target has been modified. Now system will ask "Enter domain name for tenant(optional):" at the time of tenant creation with other informations. This domain name will be stored in new entity 'TenantDomainName' along with tenantId. At the time of url hit, system will look for the domain name, find the corresponding tenantId and will start pointing to corresponding database.
Following steps should be followed to have support for above mentioned features in your application
Warning | ||
---|---|---|
| ||
If you use a "new" version which does not embed Ant nor any build.xml file, it means that you should use Gradle tasks instead of below Ant targets, please refer to the Gradle documentation in wiki |
1) Move your code base to -r................. (Not yet committed )r1658369
2) Set property 'multitenant=Y' in file framework/common/config/general.properties .
3) Create new tenant by using ant createTenantant target 'create-tenant' . (You can also use create-tenant-on-Derby, create-tenant-on-MySQL, create-tenant-on-Oracle, create-tenant-on-PostgreSQL).
4) Do ant clean / ant build and restart your server.
...
7) Go to front-end by entering url with domain name without port like: http://abc.com/ecommerce/ or with port like: http://abc.com:8080/ecommerce/
8) Login to back end by entering login id , password and tenant id on login form or by For back-end applications, domain name field is optional. You can access back-end applications by entering tenantId from login page OR by entering url with domain name as described above in #7.