borinquenkid commented on PR #16763: URL: https://github.com/apache/grails-core/pull/16763#issuecomment-6452526470
Updated in commit cba1b7f74e: 1. Registered a `TransactionSynchronization` at `SessionFactoryUtils.SESSION_SYNCHRONIZATION_ORDER` alongside the `con.getAutoCommit()` physical connection acquisition in `GrailsHibernateTemplate.executeWithNewSession`. If no in-scope query registers a Hibernate session synchronization, the logical connection disconnects before Spring's `ConnectionSynchronization` closes the physical connection at transaction completion. 2. Added test coverage in `WithNewSessionLazyLoadSpec` verifying that a request-bound session remains open and usable following a `PROPAGATION_SUPPORTS` transaction wrapping a nested `withNewSession` without any query in the outer scope. Also opened #16783 to address the same issue in `grails-data-hibernate5` on `7.0.x`. -- 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]
