We're updating the issue view to help you get more done. 

ProcedureCall should implement AutoCloseable

Description

It's not obvious for Hibernate users that both ProcedureCall and the JPA StoredProcedureQuery are leaking the underlying CallableStatement which only gets closed at transaction commit/rollback time.

Without making this ore obvious, many devs will bump into this issue described here and face ORA-01000 issues.

I think we should make the ProcedureCall implement the AutoCloseable interface so that we can also use it with JPA StoredProcedureQuery via unwrapping.

This issue should also explain the behavior in the User Guide.

Environment

None

Status

Assignee

Vlad Mihalcea

Reporter

Vlad Mihalcea

Fix versions

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.2.18
5.3.7
5.4.0

Priority

Major