Skip to content

HibernateTransactionManager compatibility with Hibernate 6.0/6.1 #28813

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
odrotbohm opened this issue Jul 13, 2022 · 1 comment
Closed

HibernateTransactionManager compatibility with Hibernate 6.0/6.1 #28813

odrotbohm opened this issue Jul 13, 2022 · 1 comment
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@odrotbohm
Copy link
Member

We already fixed references to API removed in Hibernate 6 for HibernateJpaVendorAdapter but apparently HibernateTransactionManager also refers to the very same API.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 13, 2022
@jhoeller jhoeller self-assigned this Jul 13, 2022
@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 13, 2022
@jhoeller jhoeller added this to the 6.0.0-M5 milestone Jul 13, 2022
@jhoeller
Copy link
Contributor

jhoeller commented Jul 13, 2022

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.

@jhoeller jhoeller changed the title HibernateTransactionManager depends on API removed in Hibernate 6 HibernateTransactionManager compatibility with Hibernate 6.0/6.1 Jul 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants