Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » [SOLVED] Single-Table Multitenancy and Cross-Tenant Access
[SOLVED] Single-Table Multitenancy and Cross-Tenant Access [message #1225283] Sun, 29 December 2013 04:20 Go to next message
Florian Gessner is currently offline Florian Gessner
Messages: 20
Registered: November 2010
Junior Member
Hi all,

I am currently building an multi-tenant web application based on spring framework and eclipse link.
First I implemented the tenant separation by myself by using pre-commit hooks and custom repository implementation which ensures that the tenant information is always attached to the queries.

Now I try to implement this based on the Eclipse Link Single-Table Multitenancy feature.

I'm currently not able to make the user table tenant specific as a cross tenant access is required for log in. This is because a user can be attached to multiple tenants and if no specific tenant is selected the user should get a selection list to select the desired tenant.

Is there a ways to explicitly allow cross tenant access in this scenario?

Thanks and Best Regards
Florian

[Updated on: Mon, 06 January 2014 15:02]

Report message to a moderator

Re: Single-Table Multitenancy and Cross-Tenant Access [message #1226708 is a reply to message #1225283] Thu, 02 January 2014 08:12 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1016
Registered: July 2009
Senior Member
Why not create a new persistence unit for the tenants/users? This would be used initially to allow user login and tenant selection, and then the tenant specific info used for the application persistence unit.
Re: Single-Table Multitenancy and Cross-Tenant Access [message #1228259 is a reply to message #1226708] Mon, 06 January 2014 15:01 Go to previous message
Florian Gessner is currently offline Florian Gessner
Messages: 20
Registered: November 2010
Junior Member
I fixed the issue in that way that:
- As soon as the tenant is determined a tenant switch is being triggered
- for the login case I use a database view to determine all tenants to which a user is assigned to.
Previous Topic:Shared Primary Key examples?
Next Topic:Migrating from Hibernate to EclipseLink
Goto Forum:
  


Current Time: Fri Jul 25 07:19:36 EDT 2014

Powered by FUDForum. Page generated in 0.02674 seconds