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

Connection acquired while calling a stored procedure via JPA is not released [SPR-16826] #21366

spring-projects-issues opened this issue May 15, 2018 · 2 comments
in: data status: backported type: bug


Copy link

@spring-projects-issues spring-projects-issues commented May 15, 2018

Gaurav Khandelwal opened SPR-16826 and commented

When a DB stored procedure is called via Spring JPA, connection acquired from Connection Pool is not release back after calling.


Inside Class org.springframework.orm.jpa.SharedEntityManagerCreator and method invoke()

entity manager is only closed if method name matches "queryTerminatingMethods" set which does not include "execute" method used for calling Stored Procedure.

Affects: 4.3.17, 5.0.6


Issue Links:

  • #21652 SharedEntityManagerCreator should support deferred access to StoredProcedureQuery output parameters

Referenced from: commits 997ca5c, 3978d55, 3c8c996

Backported to: 4.3.18

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 16, 2018

Gaurav Khandelwal commented



Thanks for resolving this issue.

Please let me know how we can get this fix?

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 16, 2018

Juergen Hoeller commented

This fix is available in the latest 5.0.7.BUILD-SNAPSHOT as well as 4.3.18.BUILD-SNAPSHOT now (available from See for convenient POM snippets for the snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: data status: backported type: bug
None yet

No branches or pull requests

2 participants