Systems and methods for multitenancy data
First Claim
1. A method for supporting multitenant data in a multitenant system, the method comprising:
- configuring a multitenant application to be used by a plurality of tenants, wherein each tenant of the plurality of tenants is associated with a different tenant discriminator value identifying said tenant;
storing data for use by said multitenant application in a table corresponding to an entity defined by said multitenant application such that columns of the table correspond to properties of the entity, wherein said table is a shared multitenant table in which all of said data for all of the plurality of tenants is co-located, and wherein said table holds a plurality of rows of data from each of said plurality of tenants;
providing said table with a tenant discrimination column for holding tenant discriminator values which identify which of said plurality of rows of data held in said table is associated with which particular tenant of the plurality of tenants;
creating a plurality of entity managers including an entity manager for each tenant of said plurality of tenants, wherein the entity manager associated with each tenant of said plurality of tenants is configured with the tenant discriminator value associated with said each tenant of said plurality of tenants by one of the multitenant application or a shared entity manager factory configured to create the plurality of entity managers;
creating a plurality of transactional entity instances, using said multitenant application, for each of said plurality of tenants, wherein each of said plurality of transactional entity instances is associated with a particular row of data of said plurality of rows of data and with a tenant discriminator value used to identify a particular one of said plurality of tenants, and wherein each of said plurality of transactional entity instances is associated with a transaction performed by said multitenant application on said row of data held in said table and identified by the tenant discriminator value associated with said entity instance;
providing a plurality of caches, wherein a different one of said plurality of caches is associated with each particular one of the plurality of tenants; and
using each cache to manage transactional entity instances associated with said particular one of said plurality of tenants associated with the cache.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods are provided to support multitenant data in an EclipseLink environment. EclipseLink supports shared multitenant tables using tenant discriminator columns, allowing an application to be re-used for multiple tenants and have all their data co-located. Tenants can share the same schema transparently, without affecting one another and can use non-multitenant entity types as per usual. This functionality is flexible enough to allow for its usage at an Entity Manager Factory level or with individual Entity Manager'"'"'s based on the application'"'"'s needs. Support for multitenant entities can be done though the usage of a multitenant annotation or <multitenant> xml element configured in an eclipselink-orm.xml mapping file. The multitenant annotation can be used on an entity or mapped superclass and is used in conjunction with a tenant discriminator column or <tenant-discriminator-column> xml element.
55 Citations
20 Claims
-
1. A method for supporting multitenant data in a multitenant system, the method comprising:
-
configuring a multitenant application to be used by a plurality of tenants, wherein each tenant of the plurality of tenants is associated with a different tenant discriminator value identifying said tenant; storing data for use by said multitenant application in a table corresponding to an entity defined by said multitenant application such that columns of the table correspond to properties of the entity, wherein said table is a shared multitenant table in which all of said data for all of the plurality of tenants is co-located, and wherein said table holds a plurality of rows of data from each of said plurality of tenants; providing said table with a tenant discrimination column for holding tenant discriminator values which identify which of said plurality of rows of data held in said table is associated with which particular tenant of the plurality of tenants; creating a plurality of entity managers including an entity manager for each tenant of said plurality of tenants, wherein the entity manager associated with each tenant of said plurality of tenants is configured with the tenant discriminator value associated with said each tenant of said plurality of tenants by one of the multitenant application or a shared entity manager factory configured to create the plurality of entity managers; creating a plurality of transactional entity instances, using said multitenant application, for each of said plurality of tenants, wherein each of said plurality of transactional entity instances is associated with a particular row of data of said plurality of rows of data and with a tenant discriminator value used to identify a particular one of said plurality of tenants, and wherein each of said plurality of transactional entity instances is associated with a transaction performed by said multitenant application on said row of data held in said table and identified by the tenant discriminator value associated with said entity instance; providing a plurality of caches, wherein a different one of said plurality of caches is associated with each particular one of the plurality of tenants; and using each cache to manage transactional entity instances associated with said particular one of said plurality of tenants associated with the cache. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer readable storage medium including instructions stored thereon for supporting multitenant data in a multitenant system, which instructions, when executed by a computer, cause the computer to:
-
configure a multitenant application to be used by a plurality of tenants wherein each tenant of the plurality of tenants is associated with a different tenant discriminator value identifying said tenant; store data for use by said multitenant application in a table corresponding to an entity defined by said multitenant application such that columns of the table correspond to properties of the entity, wherein said table is a shared multitenant table in which all of said data for all of the plurality of tenants is co-located, and wherein said table holds a plurality of rows of data from each of said plurality of tenants; provide said table with a tenant discrimination column for holding tenant discriminator values which identify which of said plurality of rows of data held in said table is associated with which particular tenant of the plurality of tenants; create a plurality of entity managers including an entity manager for each tenant of said plurality of tenants, wherein the entity manager associated with each tenant of said plurality of tenants is configured with the tenant discriminator value associated with said each tenant of said plurality of tenants by one of the multitenant application or a shared entity manager factory configured to create the plurality of entity managers; create a plurality of transactional entity instances, using said multitenant application, for each of said plurality of tenants wherein each of said plurality of transactional entity instances is associated with a particular row of data of said plurality of rows of data and with a tenant discriminator value used to identify a particular one of said plurality of tenants, and wherein each of said plurality of transactional entity instances is associated with a transaction performed by said multitenant application on said row of data held in said table and identified by the tenant discriminator value associated with said entity instance; provide a plurality of caches, wherein a different one of said plurality of caches is associated with each particular one of the plurality of tenants; and use each cache to manage transactional entity instances associated with said particular one of said plurality of tenants associated with the cache. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A multitenant system, comprising:
-
a microprocessor; a multitenant application executing on the microprocessor, and configured to be used by a plurality of tenants, wherein each tenant of the plurality of tenants is associated with a different tenant discriminator value identifying said tenant; a table which holds data corresponding to an entity defined by said multitenant application such that columns of the table correspond to properties of the entity, wherein said table is a shared multitenant table in which all of said data for all of the plurality of tenants is co-located, wherein said table holds a plurality of rows of data from each of said plurality of tenants, and wherein said table comprises a tenant discrimination column holding tenant discriminator values used to identify which of said plurality of rows of data held in said table is associated with which particular tenant of the plurality of tenants; a plurality of transactional entity instances for each of said plurality of tenants, wherein each of said plurality of transactional entity instances is associated with a particular row of data of said plurality of rows of data and with a tenant discriminator value used to identify a particular one of said plurality of tenants, and wherein each of said plurality of transactional entity instances is associated with a transaction effected by said multitenant application on said particular row of data associated with said transactional entity instance; a plurality of entity managers comprising an entity manager associated with each tenant of said plurality of tenants wherein each entity manager is configured with the tenant discriminator value associated with each respective tenant of said plurality of tenants by one of the multitenant application or a shared entity manager factory configured to create the plurality of entity managers; and a plurality of caches, wherein a different one of said plurality of caches is associated with each particular one of the plurality of tenants, and wherein each cache is configured to manage transactional entity instances associated with said particular one of said plurality of tenants associated with the cache. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification