GrailsTestTransactionInterceptor (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.test.support
[Groovy] Class GrailsTestTransactionInterceptor

    java.lang.Object
      org.codehaus.groovy.grails.test.support.GrailsTestTransactionInterceptor

    class GrailsTestTransactionInterceptor
    extends java.lang.Object

Establishes a rollback only transaction for running a test in.

Field Summary
`protected java.util.Map` | `transactionManagers`
`protected java.util.Map` | `transactionStatuses`

Property Summary
`static java.lang.String` | `TRANSACTIONAL`
`org.springframework.context.ApplicationContext` | `applicationContext`

Constructor Summary
`GrailsTestTransactionInterceptor(org.springframework.context.ApplicationContext applicationContext)`

Method Summary
`void` | `destroy()` Rolls back the current transaction.
`void` | `init()` Establishes a transaction.
`boolean` | `isTransactional(java.lang.Object test)` A test is non transactional if it defines an instance or static property name 'transactional' with a value of `false`.

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### transactionManagers

    protected java.util.Map transactionManagers

### transactionStatuses

    protected java.util.Map transactionStatuses

Property Detail

### TRANSACTIONAL

    static final java.lang.String TRANSACTIONAL

### applicationContext

    org.springframework.context.ApplicationContext applicationContext

Constructor Detail

### GrailsTestTransactionInterceptor

    GrailsTestTransactionInterceptor(org.springframework.context.ApplicationContext applicationContext)

Method Detail

### destroy

    void destroy()

  Rolls back the current transaction.

### init

    void init()

  Establishes a transaction.

### isTransactional

    boolean isTransactional(java.lang.Object test)

  A test is non transactional if it defines an instance or static property name 'transactional' with a value of `false`.

Groovy Documentation