1.

How You Can Made A Method Of A Service Be Transactional?

Answer»

With the anotation @TRANSACTIONAL above the method's name of the SERVICE

EXAMPLE:

import grails.transaction.Transactional

class BookService {
@Transactional
DEF updateBook() {
// …
}
}

With the anotation @Transactional above the method's name of the service

Example:

import grails.transaction.Transactional

class BookService {
@Transactional
def updateBook() {
// …
}
}



Discussion

No Comment Found