|
Hello, I may be the user at the origin of this feature request.
I think using multiple sessions (each one being tied to separate tenants) in the same context from the SAME session factory is in fact doomed to fail, as it does not properly support second second level caching (as well as session factory stats).
Indeed, considering that the second level cache is at the session factory level, I think data cached on behalf of one tenant would be visible to other tenants, hence breaking the isolation of the tenants. The same goes for session factory stats.
Can you confirm my explanation ?
If confirmed, you can remove the feature request for me because the caching issue is a too important limitation.
As a consequence each tenant must have its own session factory, and the present Hibernate implementations of "current session" are enough to support the uses cases I need.
|