com.interface21.transaction.interceptor
Class RollbackRuleAttribute
java.lang.Object
|
+--com.interface21.transaction.interceptor.RollbackRuleAttribute
- Direct Known Subclasses:
- NoRollbackRuleAttribute
- public class RollbackRuleAttribute
- extends java.lang.Object
Rule determining whether or not a given exception
(and any subclasses) should
cause a rollback. Multiple such rules can be applied to
determine whether a transaction should commit or rollback
after an exception has been thrown.
- Since:
- 09-Apr-2003
- Version:
- $Id: RollbackRuleAttribute.java,v 1.1 2003/06/13 13:40:38 jhoeller Exp $
- Author:
- Rod Johnson
|
Constructor Summary |
RollbackRuleAttribute(java.lang.String exceptionName)
Construct a new RollbackRule for the given exception name.
|
|
Method Summary |
int |
getDepth(java.lang.Throwable t)
Return the depth to the superclass matching.
0 means t matches.
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ROLLBACK_ON_RUNTIME_EXCEPTIONS
public static final RollbackRuleAttribute ROLLBACK_ON_RUNTIME_EXCEPTIONS
RollbackRuleAttribute
public RollbackRuleAttribute(java.lang.String exceptionName)
- Construct a new RollbackRule for the given exception name.
This can be a substring, with no wildcard support at present.
A value of "ServletException" would match ServletException and
subclasses, for example.
- Parameters:
exceptionName -
getDepth
public int getDepth(java.lang.Throwable t)
- Return the depth to the superclass matching.
0 means t matches.
Return -1 if there's no match.
Otherwise, return depth.
Lowest depth wins.
- Parameters:
t - - Returns:
- int
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Rod Johnson and Spring contributors 2001-2003.