HHH-7974 - Session.getTenantIdentifier() not callable without active transaction
This commit is contained in:
parent
8429d2bcb8
commit
d9aa9d3cd2
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue