HHH-7974 - Session.getTenantIdentifier() not callable without active transaction

(cherry picked from commit d9aa9d3cd2)
This commit is contained in:
Steve Ebersole 2013-04-15 11:21:02 -05:00
parent 772f3cbc5d
commit 812d3f6bf0
1 changed files with 8 additions and 8 deletions

View File

@ -319,7 +319,7 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext {
|| "hashCode".equals( methodName )
|| "getStatistics".equals( methodName )
|| "isOpen".equals( methodName )
|| "getListeners".equals( methodName ) //useful for HSearch in particular
|| "getListeners".equals( methodName )
) {
// allow these to go through the the real session no matter what
}
@ -336,12 +336,12 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext {
|| "getTransaction".equals( methodName )
|| "isTransactionInProgress".equals( methodName )
|| "setFlushMode".equals( methodName )
|| "getFactory".equals( methodName ) //from SessionImplementor
|| "getSessionFactory".equals( methodName ) ) {
|| "getFactory".equals( methodName )
|| "getSessionFactory".equals( methodName )
|| "getTenantIdentifier".equals( methodName ) ) {
LOG.tracev( "Allowing method [{0}] in non-transacted context", methodName );
}
else if ( "reconnect".equals( methodName )
|| "disconnect".equals( methodName ) ) {
else if ( "reconnect".equals( methodName ) || "disconnect".equals( methodName ) ) {
// allow these (deprecated) methods to pass through
}
else {