Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use non-deprecated interfaces in HibernateJpaVendorAdapter [SPR-16916] #21455

spring-issuemaster opened this issue Jun 7, 2018 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Jun 7, 2018

Marten Deinum opened SPR-16916 and commented

The HibernateJpaVendorAdapter pre-defines the values for the entityManagerInterface and entityManagerFactoryInterface.

The current values reference deprecated interfaces (on Hibernate 5.2) and the Hibernate team suggests to use SessionFactory and Session instead as those now extend EntityManagerFactory and EntityManager.

Current values

this.entityManagerFactoryInterface = org.hibernate.jpa.HibernateEntityManagerFactory.class;
this.entityManagerInterface = org.hibernate.jpa.HibernateEntityManager.class;

Suggested values

this.entityManagerFactoryInterface = org.hibernate.SessionFactory.class;
this.entityManagerInterface = org.hibernate.Session.class;

Affects: 5.0.6


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jun 7, 2018

Juergen Hoeller commented

We can only really change this once we require Hibernate ORM 5.2+. Since this is still a while away (not least of it all due to the default use of older Hibernate versions in JBoss EAP), the best we can do for the time being is to keep exposing those deprecated interfaces.

We'll revisit our arrangement for Spring Framework 5.2 next year, maybe raising our Hibernate baseline at that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.