You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add setMultiTenantConnectionProvider to org.springframework.orm.hibernate5.LocalSessionFactoryBean [SPR-14072] #18644
#15449 added the methods setMultiTenantConnectionProvider and setCurrentTenantIdentifierResolver methods to LocalSessionFactoryBean in org.springframework.orm.hibernate4
In org.springframework.orm.hibernate5.LocalSessionFactoryBean only the setCurrentTenantIdentifierResolver exists, and it doesn't appear t be working.
The reason is simply that, for whatever reason, Hibernate 5 does provide an explicit setCurrentTenantIdentifierResolver method on its Configuration class but not a corresponding setMultiTenantConnectionProvider. I'll see what we can do here, possibly using the properties-based approach along the lines of what we do for Hibernate 4... just for this particular setting.
I've introduced this for Spring Framework 4.3 now, as a setMultiTenantConnectionProvider method on both LocalSessionFactoryBuilder and LocalSessionFactoryBean. Since those classes have been reworked for 4.3 already, let's consider this feature as 4.3+ as well. After all, it drags a rather involved new Hibernate SPI dependency into those classes which might cause side effects.
Activity
spring-projects-issues commentedon Mar 19, 2016
Juergen Hoeller commented
The reason is simply that, for whatever reason, Hibernate 5 does provide an explicit
setCurrentTenantIdentifierResolvermethod on itsConfigurationclass but not a correspondingsetMultiTenantConnectionProvider. I'll see what we can do here, possibly using the properties-based approach along the lines of what we do for Hibernate 4... just for this particular setting.Juergen
spring-projects-issues commentedon Mar 19, 2016
Juergen Hoeller commented
I've introduced this for Spring Framework 4.3 now, as a
setMultiTenantConnectionProvidermethod on bothLocalSessionFactoryBuilderandLocalSessionFactoryBean. Since those classes have been reworked for 4.3 already, let's consider this feature as 4.3+ as well. After all, it drags a rather involved new Hibernate SPI dependency into those classes which might cause side effects.Juergen
spring-projects-issues commentedon Mar 20, 2016
Menachem Rath commented
Many thanks!