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

Don't close the EntityManager twice #6895

Merged
merged 1 commit into from Jan 30, 2020
Merged

Conversation

Sanne
Copy link
Member

@Sanne Sanne commented Jan 30, 2020

The EntityManager is being closed twice: both during the beforeCompletion and during afterCompletion of the transaction sync.

It's not a problem as we're being leanient about this, but even so closing the EM is not particularly cheap and this should be avoided.

N.B. this would be a problem if we eventually decided to enable Hibernate ORM's strict JPA compliance, as in that case it would throw an exception.

@Sanne Sanne added the area/hibernate-orm Hibernate ORM label Jan 30, 2020
@Sanne Sanne added this to the 1.3.0 milestone Jan 30, 2020
@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 30, 2020
@gsmet gsmet merged commit 4a96c13 into quarkusio:master Jan 30, 2020
@gsmet
Copy link
Member

gsmet commented Jan 30, 2020

Thanks!

@Sanne Sanne deleted the DuplicateClose branch January 31, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants