File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
hibernate-core/src/main/java/org/hibernate/internal Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1919
2020import static org .hibernate .cfg .PersistenceSettings .PERSISTENCE_UNIT_NAME ;
2121import static org .hibernate .cfg .PersistenceSettings .SESSION_FACTORY_JNDI_NAME ;
22+ import static org .hibernate .cfg .PersistenceSettings .SESSION_FACTORY_NAME ;
2223import static org .hibernate .cfg .ValidationSettings .JAKARTA_VALIDATION_FACTORY ;
2324import static org .hibernate .cfg .ValidationSettings .JPA_VALIDATION_FACTORY ;
2425import static org .hibernate .engine .config .spi .StandardConverters .STRING ;
@@ -95,6 +96,10 @@ static String determineJndiName(
9596 return explicitJndiName ;
9697 }
9798 else {
99+ final String expliciSessionFactoryname = configService .getSetting ( SESSION_FACTORY_NAME , STRING );
100+ if ( isNotEmpty ( expliciSessionFactoryname ) ) {
101+ return expliciSessionFactoryname ;
102+ }
98103 final String unitName = configService .getSetting ( PERSISTENCE_UNIT_NAME , STRING );
99104 // do not use name for JNDI if explicitly asked not to or if name comes from JPA persistence-unit name
100105 final boolean nameIsNotJndiName =
You can’t perform that action at this time.
0 commit comments