"Fossies" - the Fresh Open Source Software Archive

Member "ref/Services/transactional.html" (28 Oct 2014, 63263 Bytes) of package /linux/www/grails-docs-2.4.4.zip:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

(Quick Reference)

transactional

Purpose

Enables automatic transaction demarcation if not set or set to true

Examples

class BookService {
    static transactional = true
    …
}

Description

By default services have automatic transaction management such as propagation and so on. By setting transactional to false you disable automatic Spring managed transaction demarcation for every method in the service. When set to the true, The propagation level of the transaction is by default set to PROPAGATION_REQUIRED.

You can also configure services using Spring's @Transactional annotation. See Declarative Transactions in the user guide for more information.