[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-7306) SessionFactoryImpl#openSession() doesn't use CurrentTenantIdentifierResolver
Stefan Schulze (JIRA)
noreply at atlassian.com
Tue May 8 08:07:09 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-7306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46563#comment-46563 ]
Stefan Schulze commented on HHH-7306:
-------------------------------------
I created a pull-request: <https://github.com/hibernate/hibernate-orm/pull/329>
> 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.0, 4.1.1, 4.1.2, 4.1.3
> Reporter: Stefan Schulze
> Labels: multi-tenancy
> 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