Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Commit history and discussions regarding these enhancement can be tracked from JIRA task

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyOFBIZ-5898
.

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
titleGradle

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 -r1658369

...

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 For back-end applications, domain name field is optional. You can access back-end applications by entering login id , password and tenant id on login form or by tenantId from login page OR by entering url with domain name as described above in #7.