Skip to main content


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 09:20 Go to next message
Florian Gessner is currently offline Florian GessnerFriend
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 20: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 13:12 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
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 20:01 Go to previous message
Florian Gessner is currently offline Florian GessnerFriend
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: Thu Apr 25 23:18:49 GMT 2024

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

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

Back to the top