Croway commented on PR #30044:
URL: https://github.com/apache/camel/pull/30044#issuecomment-6899376446
@davsclaus
1. Done in 7492759: confirmed. At the commit,
`DataSourceTransactionManager.doCleanupAfterCompletion` unbinds the holder and
calls `DataSourceUtils.releaseConnection`, before `ResultSetIteratorCompletion`
runs. With HikariCP and Agroal the pool shows the connection idle as soon as a
transacted sub-route returns the iterator, and splitting it in the calling
route fails with "Cannot process result". The "Using StreamList" docs now say
this and to read the rows within the transacted route, and the upgrade-guide
entry has your sentence.
Optional part: not changed. The late close calls `close()` on the handle
the commit already closed, which is a no-op (`Connection.close()` contract, and
the pools hand out a new handle per borrow). I checked it with HikariCP and
Agroal, pool size 1: another borrower gets the connection after the commit, and
the late close at exchange completion leaves that connection open and the pool
counts unchanged. Remembering the flag would also skip
`ConnectionHolder.released()` when the rows are read within the transaction.
_Claude Code on behalf of Federico Mariani_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]