HHH-7380 bug when initialize MULTI_TENANT_IDENTIFIER_RESOLVER and CUSTOM_ENTITY_DIRTINESS_STRATEGY
This commit is contained in:
parent
7cda27b6aa
commit
aac6510098
|
@ -589,7 +589,7 @@ public final class SessionFactoryImpl
|
||||||
}
|
}
|
||||||
Class<CustomEntityDirtinessStrategy> customEntityDirtinessStrategyClass;
|
Class<CustomEntityDirtinessStrategy> customEntityDirtinessStrategyClass;
|
||||||
if ( Class.class.isInstance( value ) ) {
|
if ( Class.class.isInstance( value ) ) {
|
||||||
customEntityDirtinessStrategyClass = Class.class.cast( customEntityDirtinessStrategy );
|
customEntityDirtinessStrategyClass = Class.class.cast( value );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -663,7 +663,7 @@ public final class SessionFactoryImpl
|
||||||
|
|
||||||
Class<CurrentTenantIdentifierResolver> implClass;
|
Class<CurrentTenantIdentifierResolver> implClass;
|
||||||
if ( Class.class.isInstance( value ) ) {
|
if ( Class.class.isInstance( value ) ) {
|
||||||
implClass = Class.class.cast( customEntityDirtinessStrategy );
|
implClass = Class.class.cast( value );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -677,17 +677,17 @@ public final class SessionFactoryImpl
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( implClass != null ) {
|
||||||
try {
|
try {
|
||||||
return implClass.newInstance();
|
return implClass.newInstance();
|
||||||
|
}
|
||||||
|
catch ( Exception e ) {
|
||||||
|
LOG.debugf(
|
||||||
|
"Unable to instantiate CurrentTenantIdentifierResolver class %s",
|
||||||
|
implClass.getName()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
|
||||||
LOG.debugf(
|
|
||||||
"Unable to instantiate CurrentTenantIdentifierResolver class %s",
|
|
||||||
implClass.getName()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue