borinquenkid commented on PR #16763:
URL: https://github.com/apache/grails-core/pull/16763#issuecomment-6432037517

   Updated in commit a8501b95b8:
   1. Moved the outer session physical connection acquisition before reading 
`previousConnectionHolder` and `getSynchronizations()` in 
`GrailsHibernateTemplate.executeWithNewSession`, ensuring any connection holder 
bound by the proxy is captured and cleanly restored in `finally`.
   2. Changed `con.getMetaData()` to `con.getAutoCommit()`, documented the 
reason so it is preserved, and raised exception logging to `WARN`. This binds 
`TransactionAwareDataSourceProxy` without eagerly checking out a connection 
under `LazyConnectionDataSourceProxy`.
   3. Removed unreachable `GenericJDBCException` check in 
`convertHibernateAccessException` and redundant `new HibernateSystemException` 
fallback in `doExecute`. Removed unused imports.
   4. Added test coverage in `WithNewSessionLazyLoadSpec` covering 
`PROPAGATION_SUPPORTS, readOnly: true` with a disconnected request session 
(both with and without lazy loading inside the inner transaction), with table 
cleanup between tests.
   5. Added test coverage in `GrailsHibernateTemplateSpec` verifying that an 
unmapped `SQLException` thrown as `GenericJDBCException` inside 
`template.execute` translates to `HibernateJdbcException`.


-- 
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]

Reply via email to