Search code examples
grailsgrails-ormjesque

Transactional background jobs with grails


Is it possible to enforce transactionality in a background job from jesque from grails?

I'm using jesque-grails plugin where I can inject other services including GORM ... may I mark the job as @Transaction and expect the payload to be executed in a isolated transaction with rollback on failure?


Solution

  • After trying i found the answer is yes. You can simply mark the job as @Transactional and it should work as expected.