The GitHub Actions job "CI - Groovy Joint Validation Build" on 
grails-core.git/fix/multi-datasource-osiv has succeeded.
Run started by GitHub user jamesfredley (triggered by jamesfredley).

Head commit for run:
afffd5706445949a3e2c53e735b6fc8989638b7b / James Fredley 
<[email protected]>
fix: extend OSIV to manage sessions for all datasources

GrailsOpenSessionInViewInterceptor only registered a session for the
default datasource SessionFactory. Calling withSession on a secondary
datasource during a web request threw 'No Session found for current
thread' because no session was bound for that SessionFactory.

The interceptor now iterates all connection sources from the
HibernateDatastore and opens/binds sessions for each non-default
datasource in preHandle, flushes them in postHandle, and unbinds/closes
them in afterCompletion. Existing sessions that are already bound (e.g.
by a transaction) are left untouched.

Fixes #14333
Fixes #11798

Assisted-by: Claude Code <[email protected]>

Report URL: https://github.com/apache/grails-core/actions/runs/22235331699

With regards,
GitHub Actions via GitBox

Reply via email to