File tree 1 file changed +5
-0
lines changed
hibernate-core/src/main/java/org/hibernate/internal
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 19
19
20
20
import static org .hibernate .cfg .PersistenceSettings .PERSISTENCE_UNIT_NAME ;
21
21
import static org .hibernate .cfg .PersistenceSettings .SESSION_FACTORY_JNDI_NAME ;
22
+ import static org .hibernate .cfg .PersistenceSettings .SESSION_FACTORY_NAME ;
22
23
import static org .hibernate .cfg .ValidationSettings .JAKARTA_VALIDATION_FACTORY ;
23
24
import static org .hibernate .cfg .ValidationSettings .JPA_VALIDATION_FACTORY ;
24
25
import static org .hibernate .engine .config .spi .StandardConverters .STRING ;
@@ -95,6 +96,10 @@ static String determineJndiName(
95
96
return explicitJndiName ;
96
97
}
97
98
else {
99
+ final String expliciSessionFactoryname = configService .getSetting ( SESSION_FACTORY_NAME , STRING );
100
+ if ( isNotEmpty ( expliciSessionFactoryname ) ) {
101
+ return expliciSessionFactoryname ;
102
+ }
98
103
final String unitName = configService .getSetting ( PERSISTENCE_UNIT_NAME , STRING );
99
104
// do not use name for JNDI if explicitly asked not to or if name comes from JPA persistence-unit name
100
105
final boolean nameIsNotJndiName =
You can’t perform that action at this time.
0 commit comments