org.springframework.transaction.interceptor
Class RuleBasedTransactionAttribute
org.springframework.transaction.support.DefaultTransactionDefinition
|
+--org.springframework.transaction.interceptor.DefaultTransactionAttribute
|
+--org.springframework.transaction.interceptor.RuleBasedTransactionAttribute
- public class RuleBasedTransactionAttribute
- extends DefaultTransactionAttribute
TransactionAttribute implementation that works out whether a
given exception should cause transaction rollback by applying
a number of rollback rules, both positive and negative.
If no rules are relevant to the exception, it behaves
like DefaultTransactionAttribute (rolling back on
runtime exceptions).
The TransactionAttributeEditor property editor creates objects
of this class.
- Author:
- Rod Johnson
- Version: $Id: RuleBasedTransactionAttribute.java,v 1.2 2003/08/18 16:22:09 jhoeller Exp $
- Since: 09-Apr-2003
| Methods inherited from class org.springframework.transaction.support.DefaultTransactionDefinition |
equals, getIsolationLevel, getPropagationBehavior, getTimeout, hashCode, isReadOnly, setIsolationLevel, setIsolationLevelName, setPropagationBehavior, setPropagationBehaviorName, setReadOnly, setTimeout |
RuleBasedTransactionAttribute
public RuleBasedTransactionAttribute()
RuleBasedTransactionAttribute
public RuleBasedTransactionAttribute(int propagationBehavior, List rollbackRules)
getRollbackRules
public List getRollbackRules()
rollbackOn
public boolean rollbackOn(Throwable t)
- Winning rule is the shallowest rule (that is, the closest
in the inheritance hierarchy to the exception). If no rule applies (-1),
return false.
- See Also:
- TransactionAttribute.rollbackOn(java.lang.Throwable)
setRollbackRules
public void setRollbackRules(List rollbackRules)
toString
public String toString()
to Class java.util.List