HHH-7974 - Session.getTenantIdentifier() not callable without active transaction
(cherry picked from commit d9aa9d3cd213713f504c054bbafa57baca68da88)