org.unitils.database.annotations
Annotation Type Transactional


@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
@Inherited
public @interface Transactional

Annotation enabling to specify if tests should be run in a transaction and, if yes, whether at the end of the test, the transaction should be committed or rollbacked.

If this annotation is specified at class-level, it is valid for all tests in the annotated class and its subclasses. A class level annotation overrides the settings of a superclass annotation. It can also be specified at method level, to specify method specific transactional behavior.

The value attribute defines whether the annotated test(s) run in a transaction and, if yes, what will be the commit/rollback behavior. The default behavior is defined by the unitils property DatabaseModule.Transactional.value.default. This configured default will be used when the value property is unspecified or explicitly set to TransactionMode.DEFAULT.

Author:
Filip Neven, Tim Ducheyne
See Also:
TransactionMode

Optional Element Summary
 String transactionManagerName
           
 TransactionMode value
          Defines whether the annotated test(s) run in a transaction and, if yes, what will be commit/rollback behavior.
 

value

public abstract TransactionMode value
Defines whether the annotated test(s) run in a transaction and, if yes, what will be commit/rollback behavior. The default behavior is defined by the unitils property DatabaseModule.Transactional.value.default. This configured default will be used when the value property is unspecified or explicitly set to TransactionMode.DEFAULT.

Returns:
The TransactionMode
Default:
org.unitils.database.util.TransactionMode.DEFAULT

transactionManagerName

public abstract String transactionManagerName
Default:
""


Copyright © 2011. All Rights Reserved.