We already fixed references to API removed in Hibernate 6 for HibernateJpaVendorAdapter
but apparently HibernateTransactionManager
also refers to the very same API.
Comment From: jhoeller
To be clear, HibernateTransactionManager
is part of our legacy orm.hibernate5
package and should be replaced with JpaTransactionManager
plus HibernateJpaDialect
/ HibernateJpaVendorAdapter
with LocalContainerEntityManagerFactoryBean
since we officially only support Hibernate 6.x via JPA.
That said, it turns out that we can make HibernateTransactionManager
compatible with Hibernate 6.0/6.1 with a few minor tweaks where we're calling Hibernate 5.6's internal connection handling mechanisms instead of the public API (the latter is gone in Hibernate 6.0 but the internal coordinator SPI is still the same). We won't be able to guarantee compatibility with Hibernate 6.x going forward, but for a start this allows usage of LocalSessionFactoryBean
and HibernateTransactionManager
for transitional purposes when upgrading from Hibernate 5.5/5.6 to 6.0/6.1.