public class DefaultTransactionAttribute extends DefaultTransactionDefinition implements TransactionAttribute
PREFIX_ISOLATION, PREFIX_PROPAGATION, PREFIX_TIMEOUT, READ_ONLY_MARKER
ISOLATION_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 |
---|
DefaultTransactionAttribute()
Create a new DefaultTransactionAttribute, with default settings.
|
DefaultTransactionAttribute(int propagationBehavior)
Create a new DefaultTransactionAttribute with the the given
propagation behavior.
|
DefaultTransactionAttribute(TransactionAttribute other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
protected StringBuilder |
getAttributeDescription()
Return an identifying description for this transaction attribute.
|
String |
getQualifier()
Return a qualifier value associated with this transaction attribute.
|
boolean |
rollbackOn(Throwable ex)
The default behavior is as with EJB: rollback on unchecked exception.
|
void |
setQualifier(String qualifier)
Associate a qualifier value with this transaction attribute.
|
equals, getDefinitionDescription, getIsolationLevel, getName, getPropagationBehavior, getTimeout, hashCode, isReadOnly, setIsolationLevel, setIsolationLevelName, setName, setPropagationBehavior, setPropagationBehaviorName, setReadOnly, setTimeout, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getIsolationLevel, getName, getPropagationBehavior, getTimeout, isReadOnly
public DefaultTransactionAttribute()
public DefaultTransactionAttribute(TransactionAttribute other)
public DefaultTransactionAttribute(int propagationBehavior)
propagationBehavior
- one of the propagation constants in the
TransactionDefinition interfaceDefaultTransactionDefinition.setIsolationLevel(int)
,
DefaultTransactionDefinition.setTimeout(int)
,
DefaultTransactionDefinition.setReadOnly(boolean)
public void setQualifier(String qualifier)
This may be used for choosing a corresponding transaction manager to process this specific transaction.
public String getQualifier()
getQualifier
in interface TransactionAttribute
public boolean rollbackOn(Throwable ex)
This is consistent with TransactionTemplate's default behavior.
rollbackOn
in interface TransactionAttribute
ex
- the exception to evaluateprotected final StringBuilder getAttributeDescription()
Available to subclasses, for inclusion in their toString()
result.