gorm - Transactional backgorund jobs with grails -
is possible enforce transactionality in background job jesque grails?
im using jesque-grails plugin can inyect other services including gorm ... may mark job @transaction , expect payload executed in isolated transaction rollbak on failure?
@transactional
works on controllers , services (though it's use on controller actions not recommended). don't know if work on jesque jobs, should pretty easy find out, i.e. save something, throw runtimeexception
, see if saved data rolled back.
if can't annotate method @transactional
instead wrap method in withtransaction
Comments
Post a Comment