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
@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. }
The text was updated successfully, but these errors were encountered:
Job:
Service:
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. }
The text was updated successfully, but these errors were encountered: