Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Multitenant Shared Data(Multitenant Shared Data)
Multitenant Shared Data [message #716183] Tue, 16 August 2011 15:56 Go to next message
Jonathan  is currently offline Jonathan Friend
Messages: 6
Registered: August 2011
Junior Member
I'm currently creating a POC and using eclipselink to create subsets of data within a database based on tenants. Works great and allows me to dynamically add new business units on the fly as new tenants. Each unit can access their own dataset based on tenant id.

However I've run across a scenario where I need to implement a concept of an audit user that has read only access to all records within a limited number of tables / entities and their corresponding relationship entities. I'm not sure how exactly to accomplish this.

From what I can understand adding multiple tenant discriminator columns just creates more permutations of the same record (i.e. entity A belongs to company 123 and has a role of manager).

I am using container managed EJB's to manage entity operations ( persist, query / find, merge).

Is there a way to either:

1. Inject a persistencecontext that defines very specific entities within the persistence unit but can query against all tenants (override multi tenancy).

2. Provide multiple tenants to query against?

As a heads up I do not have the capability to generate materialized query tables or any secondary views.

I also intend to audit the heck out of any operation of this sort and lock down this access.

Thanks in advance!



Re: Multitenant Shared Data [message #725371 is a reply to message #716183] Wed, 14 September 2011 15:44 Go to previous messageGo to next message
Guy Pelletier is currently offline Guy PelletierFriend
Messages: 19
Registered: July 2009
Junior Member
Hi Jonathan,

Right now the only way you could achieve this is through another persistence-unit definition (which removed the multitenancy)

Feel free to vote for the following EclipseLink bug 355458 in the mean time.

Also, if you are familiar with VPD on Oracle (if using Oracle DB) you could potentially use it to provide the admin functionality.
(no subject) [message #725380 is a reply to message #716183] Wed, 14 September 2011 15:44 Go to previous messageGo to next message
Guy Pelletier is currently offline Guy PelletierFriend
Messages: 19
Registered: July 2009
Junior Member
Hi Jonathan,

Right now the only way you could achieve this is through another persistence-unit definition (which removed the multitenancy)

Feel free to vote for the following EclipseLink bug 355458 in the mean time.

Also, if you are familiar with VPD on Oracle (if using Oracle DB) you could potentially use it to provide the admin functionality.
Re: (no subject) [message #726209 is a reply to message #725380] Fri, 16 September 2011 20:03 Go to previous messageGo to next message
Jonathan  is currently offline Jonathan Friend
Messages: 6
Registered: August 2011
Junior Member
Thanks for the information!
Re: (no subject) [message #726214 is a reply to message #725380] Fri, 16 September 2011 20:03 Go to previous messageGo to next message
Jonathan is currently offline JonathanFriend
Messages: 8
Registered: July 2009
Junior Member
Thanks for the information!
Re: (no subject) [message #726217 is a reply to message #725380] Fri, 16 September 2011 20:03 Go to previous messageGo to next message
Jonathan is currently offline JonathanFriend
Messages: 8
Registered: July 2009
Junior Member
Thanks for the information!
Re: Multitenant Shared Data [message #895590 is a reply to message #716183] Fri, 13 July 2012 17:16 Go to previous message
Andriy Zhdanov is currently offline Andriy ZhdanovFriend
Messages: 6
Registered: June 2012
Junior Member
Hi Jonathan,

How do you set entity mapping for EMF per tenant?

Thank you.
Previous Topic:NOT operator is not handled properly in EclipseLink 2.4.0
Next Topic:@Onetomany problems
Goto Forum:
  


Current Time: Tue Nov 25 23:47:04 GMT 2014

Powered by FUDForum. Page generated in 0.02316 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software