public class DefaultTransactionAttribute extends DefaultTransactionDefinition implements TransactionAttribute
TransactionDefinition.Isolation, TransactionDefinition.Propagation
PREFIX_ISOLATION, PREFIX_PROPAGATION, PREFIX_TIMEOUT, READ_ONLY_MARKER
DEFAULT, READ_ONLY, TIMEOUT_DEFAULT
Constructor and Description |
---|
DefaultTransactionAttribute() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getQualifier()
Return a qualifier value associated with this transaction attribute.
|
boolean |
rollbackOn(java.lang.Throwable ex)
Should we roll back on the given exception?
|
void |
setNoRollbackFor(java.lang.Class<? extends java.lang.Throwable>... noRollbackFor)
Sets the exceptions that will not cause a rollback.
|
void |
setQualifier(java.lang.String qualifier)
Sets the qualifier to use for this attribute.
|
equals, getIsolationLevel, getName, getPropagationBehavior, getTimeout, hashCode, isReadOnly, setIsolationLevel, setName, setPropagationBehavior, setReadOnly, setTimeout, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getIsolationLevel, getName, getPropagationBehavior, getTimeout, isReadOnly, of
public void setQualifier(java.lang.String qualifier)
qualifier
- The qualifier.public void setNoRollbackFor(java.lang.Class<? extends java.lang.Throwable>... noRollbackFor)
noRollbackFor
- The exceptions@Nullable public java.lang.String getQualifier()
TransactionAttribute
This may be used for choosing a corresponding transaction manager to process this specific transaction.
getQualifier
in interface TransactionAttribute
public boolean rollbackOn(java.lang.Throwable ex)
TransactionAttribute
rollbackOn
in interface TransactionAttribute
ex
- the exception to evaluate