shouldReleaseBeforeCompletion
Moves the release of a session in a transaction Spring began from beforeCompletion to afterCompletion. Before completion a failed transaction is still failed, every statement gets 25P02, and a session that cannot reset its connection gives it up - one connection for every transaction that failed on the server. After completion the connection answers again, and Spring has not released it yet.
Where Spring began nothing, its connection synchronization gives the connection back in beforeCompletion, so the session ends there, ahead of it.