[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7306) SessionFactoryImpl#openSession() doesn't use CurrentTenantIdentifierResolver

Stefan Schulze (JIRA) noreply at atlassian.com
Tue May 8 07:45:09 EDT 2012


SessionFactoryImpl#openSession() doesn't use CurrentTenantIdentifierResolver
----------------------------------------------------------------------------

                 Key: HHH-7306
                 URL: https://hibernate.onjira.com/browse/HHH-7306
             Project: Hibernate ORM
          Issue Type: Bug
          Components: core
    Affects Versions: 4.1.3, 4.1.2, 4.1.1, 4.1.0
            Reporter: Stefan Schulze
         Attachments: TestCase.zip

If I create a SessionFactory with a CurrentTenantIdentifierResolver, SessionFactoryImpl#openSession() doesn't use it. Instead it tries SessionFactory#withOptions().openSession() which causes a HibernateException:

org.hibernate.HibernateException: SessionFactory configured for multi-tenancy, but no tenant identifier specified
	at org.hibernate.internal.AbstractSessionImpl.<init>(AbstractSessionImpl.java:82)
	at org.hibernate.internal.SessionImpl.<init>(SessionImpl.java:234)
	at org.hibernate.internal.SessionFactoryImpl$SessionBuilderImpl.openSession(SessionFactoryImpl.java:1843)
	at org.hibernate.internal.SessionFactoryImpl.openSession(SessionFactoryImpl.java:1030)
	[...]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list