Skip to content

Add setMultiTenantConnectionProvider to org.springframework.orm.hibernate5.LocalSessionFactoryBean [SPR-14072] #18644

Closed

Description

@spring-projects-issues

Menachem Rath opened SPR-14072 and commented

#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.

Looking at the Hibernate documentation for:

I don't see a difference in the behavior of multi tenant.


Affects: 4.2.5

Reference URL: http://docs.jboss.org/hibernate/orm/5.1/userguide/html_single/Hibernate_User_Guide.html#_multitenantconnectionprovider

Issue Links:

Referenced from: commits 5f64064

Activity

  1. spring-projects-issues commented on Mar 19, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    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.

    Juergen

  2. spring-projects-issues commented on Mar 19, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    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.

    Juergen

  3. spring-projects-issues commented on Mar 20, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Menachem Rath commented

    Many thanks!

  4. added
    in: data
    type: enhancement
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: datatype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions