public class BindableRuleBasedTransactionAttribute
extends org.springframework.transaction.interceptor.DefaultTransactionAttribute
RuleBasedTransactionAttribute so that it can be bound
 from annotation metadata and defaults to rollback on all exception types apart from those configured.PREFIX_ISOLATION, PREFIX_PROPAGATION, PREFIX_TIMEOUT, READ_ONLY_MARKERISOLATION_DEFAULT, ISOLATION_READ_COMMITTED, ISOLATION_READ_UNCOMMITTED, ISOLATION_REPEATABLE_READ, ISOLATION_SERIALIZABLE, PROPAGATION_MANDATORY, PROPAGATION_NESTED, PROPAGATION_NEVER, PROPAGATION_NOT_SUPPORTED, PROPAGATION_REQUIRED, PROPAGATION_REQUIRES_NEW, PROPAGATION_SUPPORTS, TIMEOUT_DEFAULT| Constructor and Description | 
|---|
| BindableRuleBasedTransactionAttribute() | 
| Modifier and Type | Method and Description | 
|---|---|
| Set<Class<? extends Throwable>> | getNoRollbackFor() | 
| Set<Class<? extends Throwable>> | getRollbackFor() | 
| boolean | rollbackOn(Throwable ex) | 
| void | setNoRollbackFor(Class<? extends Throwable>... exceptions)Configures the exceptions to not rollback for. | 
| void | setRollbackFor(Class<? extends Throwable>... exceptions)Configures the exceptions to rollback for. | 
getAttributeDescription, getDescriptor, getQualifier, setDescriptor, setQualifierequals, getDefinitionDescription, getIsolationLevel, getName, getPropagationBehavior, getTimeout, hashCode, isReadOnly, setIsolationLevel, setIsolationLevelName, setName, setPropagationBehavior, setPropagationBehaviorName, setReadOnly, setTimeout, toStringpublic BindableRuleBasedTransactionAttribute()
public final void setNoRollbackFor(Class<? extends Throwable>... exceptions)
exceptions - The exceptions not to rollback forpublic final void setRollbackFor(Class<? extends Throwable>... exceptions)
exceptions - The exceptions to rollback forpublic final Set<Class<? extends Throwable>> getNoRollbackFor()
public final Set<Class<? extends Throwable>> getRollbackFor()
public final boolean rollbackOn(Throwable ex)
rollbackOn in interface org.springframework.transaction.interceptor.TransactionAttributerollbackOn in class org.springframework.transaction.interceptor.DefaultTransactionAttribute