We're updating the issue view to help you get more done. 

Session.getTenantIdentifier() not callable without active transaction

Description

When you call Session.getTenantIdentifier() on a Session without active transaction, HibernateException is thrown with message "getTenantIdentifier is not valid without active transaction".

It causes problems when transaction is finished, and it is needed to perform session validation in multi-tenant environment.

As an attachment, I am providing a patch.

Environment

Hibernate ORM 4.1.7, MySQL 5.5

Status

Assignee

Steve Ebersole

Reporter

Zdenek Bzoch

Fix versions

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Components

Affects versions

4.1.7
4.1.8
4.1.9
4.2.0.CR1

Priority

Minor