Top Description Fields Methods
org.springframework.transaction.interceptor

public Interface TransactionAttribute

extends TransactionDefinition
Known Direct Implementers
org.springframework.transaction.interceptor.DefaultTransactionAttribute, org.springframework.transaction.interceptor.DelegatingTransactionAttribute
Imports
java.util.Collection, org.springframework.lang.Nullable, org.springframework.transaction.TransactionDefinition

This interface adds a rollbackOn specification to TransactionDefinition. As custom rollbackOn is only possible with AOP, it resides in the AOP-related transaction subpackage.
Authors
Rod Johnson, Juergen Hoeller, Mark Paluch
Since
16.03.2003
See Also
DefaultTransactionAttribute, RuleBasedTransactionAttribute

Field Summary

Inherited from org.springframework.transaction.TransactionDefinition:
ISOLATION_DEFAULTISOLATION_READ_COMMITTEDISOLATION_READ_UNCOMMITTEDISOLATION_REPEATABLE_READISOLATION_SERIALIZABLEPROPAGATION_MANDATORYPROPAGATION_NESTEDPROPAGATION_NEVERPROPAGATION_NOT_SUPPORTEDPROPAGATION_REQUIREDPROPAGATION_REQUIRES_NEWPROPAGATION_SUPPORTSTIMEOUT_DEFAULT

Method Summary

Modifier and TypeMethod and Description
public Collection<String>
getLabels()

Return labels associated with this transaction attribute.

public String
getQualifier()

Return a qualifier value associated with this transaction attribute.

public boolean

Returns:

whether to perform a rollback or not
rollbackOn
(Throwable
the exception to evaluate
ex
)

Should we roll back on the given exception?

Inherited from org.springframework.transaction.TransactionDefinition:
getIsolationLevelgetNamegetPropagationBehaviorgetTimeoutisReadOnlywithDefaults

Method Detail

getLabelsback to summary
public Collection<String> getLabels()

Return labels associated with this transaction attribute.

This may be used for applying specific transactional behavior or follow a purely descriptive nature.

Since
5.3
getQualifierback to summary
public String getQualifier()

Return a qualifier value associated with this transaction attribute.

This may be used for choosing a corresponding transaction manager to process this specific transaction.

Annotations
@Nullable
Since
3.0
rollbackOnback to summary
public boolean rollbackOn(Throwable ex)

Should we roll back on the given exception?

Parameters
ex:Throwable

the exception to evaluate

Returns:boolean

whether to perform a rollback or not