Hi guys,
I wonder that this isn't a common problem, because if you are searching for multi-tenency, you won't find a simple solution. Or I'm just blind, also possible ^^
What I find so far (for example) is following: Chapter 16. Multi-tenancy
But is this still the approach for JBoss Wildfly regarding the database part for multi tenancy or is there another approach available?
And if using an own implementation of a CurrentTenantIdentifierResolver, are you able to inject the EJB session context? Or how can you set the tenant ID passed to the MultiTenantConnectionProvider if the tenant ID is known in the Principal?
Also one question for me is, if you are using the database approach (every tenant has its own database), how can you add tenants dynamically, because the persistencet-unit itself directly names a specific data source.
Regards, Markus
Hi Markus, you might want to read https://community.jboss.org/message/838143 which had some discussion about multi-tenancy. I think there is a lot more that can be done.