I'm not sure if the pull request is the best way to fix this issue. the SettingsFacory and LogicalConnectionImpl seems duplicated to me. and I also see there are other places that call org.hibernate.engine.jdbc.internal.JdbcServicesImpl#getConnectionProvider directly, for example JdbcIsolationDelegate , JtaIsolationDelegate, they are all going to throw null point exception probably if multi tenancy is used.
I'm not sure if the pull request is the best way to fix this issue. the SettingsFacory and LogicalConnectionImpl seems duplicated to me. and I also see there are other places that call org.hibernate.engine.jdbc.internal.JdbcServicesImpl#getConnectionProvider directly, for example JdbcIsolationDelegate , JtaIsolationDelegate, they are all going to throw null point exception probably if multi tenancy is used.