Hibernate 6.4 - datasource vs provider_class check is reversed in ConnectionProviderInitiator.java

41 Views Asked by At

It looks like that starting hibernate 6.3, the class ConnectionProviderInitiator has reversed the order in which it checks for "hibernate.connection.datasource" and "hibernate.connection.provider_class". However the documentation says otherwise and doesn't match with the code, below are the links.

https://docs.jboss.org/hibernate/orm/6.4/userguide/html_single/Hibernate_User_Guide.html#database-connectionprovider-datasource

https://github.com/hibernate/hibernate-orm/blob/6.4.2/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java

This is causing an issue with our application as we depend on the provider_class to be checked first since we have a custom DatasourceConnectionProvider class that overrides the default"getConnection()" method. We are not able to upgrade from Wildfly 29 to 31 due this issue. Looking for any ideas/suggestions on how we can handle this issue.

Thanks!

0

There are 0 best solutions below