Fix #29418

Adds an obtainTransactionalConnectionEagerly flag allowing to retrieve the underlying connection during getConnection call. I think this flag should be always true to make sure the effective connection is fetched during the transaction covering getConnection. But I thought you would want to avoid breaking the current behaviour, so the flag is false by default.

Comment From: reda-alaoui

Ping?

Comment From: reda-alaoui

:wave:

Comment From: jhoeller

This would be a way to enforce consistent behavior for TransactionAwareDataSourceProxy next to other transaction-aware resource proxies. I'm inclined to implement this via a lazyTransactionalConnections flag which is true by default but can be turned to false, which seems like a better semantic fit next to reobtainTransactionalConnections (since asking for lazy+reobtain is semantically ok, saying lazy=false but reobtain=true is not effective but has no semantic conflict either, whereas saying eager=true + reobtain=true would be semantically odd).

Comment From: reda-alaoui

Thank you @jhoeller :partying_face: