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

OpenEntityManagerInViewInterceptor doesn't always close connections with WildFly 8 [SPR-12118] #16734

Closed
spring-projects-issues opened this issue Aug 25, 2014 · 3 comments
Assignees
Labels
type: regression
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Aug 25, 2014

Phil Webb opened SPR-12118 and commented

This particular issue came up when testing a Spring Boot application but I eventually tracked it down to the use of OpenEntityManagerInViewInterceptor. It's very hard to replicate and I'm not totally sure if the issue is with Spring, WildFly or a combination of both.

I'll attach an issue project which will explain more.


Affects: 4.1 RC2

Issue Links:

  • #13599 readOnly transaction doesn't work with JPA and Hibernate 4

Referenced from: commits spring-projects/spring-boot@6ee18fb

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 25, 2014

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 25, 2014

Phil Webb commented

This appears to be a regression, the sample doesn't fail with Spring 4.0.6

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 1, 2014

Juergen Hoeller commented

This has been addressed through revised Connection reset logic, never kicking in for JTA transactions now. Apparently an accidental Connection.setReadOnly(false) call, despite that being the default state of a JDBC Connection, can cause side effects in a JTA scenario...

More importantly for the general case, this change also avoids Connection retrieval just for reset purposes.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression
Projects
None yet
Development

No branches or pull requests

2 participants