You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Job calling a service ignores @Transactinal annotations #82
@TransactionalclassSomeService {
@Transactional(readOnly=true)
defmethod() {
// do lots work
}
}
I would expect method called from the job would be a readOnly transaction. I only noticed it wasn't while I had sql logging on and noticed a bunch of dirty checks/updates.
It seems to ignore the annotation, adding Propagation.REQUIRES_NEW was not honored either.
If this same someService.method() is called from a controller it was readOnly as expected.
Only way to work around it was to not use the annotation but do Domain.withNewTransaction(readOnly: true) { .work. }
Activity
jdaugherty commentedon Aug 22, 2026
With the transforms now being AST based, this is n olonger true.