TransactionConfiguration (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.test.context.transaction

## Annotation Type TransactionConfiguration

-     @Documented
      @Inherited
      @Retention(value=RUNTIME)
      @Target(value=TYPE)
      public @interface TransactionConfiguration

  `TransactionConfiguration` defines class-level metadata for configuring transactional tests.
  Since:
    2.5
  Author:
    Sam Brannen
  See Also:
    `TransactionalTestExecutionListener`, `ContextConfiguration`

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `defaultRollback` Should transactions be rolled back by default?
    `String` | `transactionManager` The bean name of the `PlatformTransactionManager` that should be used to drive transactions.

- - ### Element Detail

    - #### transactionManager

          public abstract String transactionManager

      The bean name of the `PlatformTransactionManager` that should be used to drive transactions.

      This attribute is not required and only needs to be declared if there are multiple beans of type `PlatformTransactionManager` in the test's `ApplicationContext` and if one of the following is true.

      - the bean name of the desired `PlatformTransactionManager` is not "transactionManager"
      - `TransactionManagementConfigurer` was not implemented to specify which `PlatformTransactionManager` bean should be used for annotation-driven transaction management

      NOTE: The XML `<tx:annotation-driven>` element also refers to a bean named "transactionManager" by default. If you are using both features in combination, make sure to point to the same transaction manager bean - here in `@TransactionConfiguration` and also in `<tx:annotation-driven transaction-manager="...">`.

      Default:
        "transactionManager"

    - #### defaultRollback

          public abstract boolean defaultRollback

      Should transactions be rolled back by default?
      Default:
        true