com.interface21.transaction.interceptor
Class DefaultTransactionAttribute

java.lang.Object
  |
  +--com.interface21.transaction.support.DefaultTransactionDefinition
        |
        +--com.interface21.transaction.interceptor.DefaultTransactionAttribute
All Implemented Interfaces:
TransactionAttribute, TransactionDefinition
Direct Known Subclasses:
RuleBasedTransactionAttribute

public class DefaultTransactionAttribute
extends DefaultTransactionDefinition
implements TransactionAttribute

Transaction attribute that takes EJB approach to rolling back on runtime, but not checked, exceptions.

Since:
16-Mar-2003
Version:
$Revision: 1.1 $
Author:
Rod Johnson

Fields inherited from interface com.interface21.transaction.TransactionDefinition
ISOLATION_CONSTANT_PREFIX, ISOLATION_DEFAULT, ISOLATION_READ_COMMITTED, ISOLATION_READ_UNCOMMITTED, ISOLATION_REPEATABLE_READ, ISOLATION_SERIALIZABLE, PROPAGATION_CONSTANT_PREFIX, PROPAGATION_MANDATORY, PROPAGATION_REQUIRED, PROPAGATION_SUPPORTS, TIMEOUT_DEFAULT
 
Constructor Summary
DefaultTransactionAttribute(int propagationBehavior, int isolationLevel)
           
 
Method Summary
 boolean rollBackOn(java.lang.Throwable t)
          Default behaviour is as with EJB: rollback on unchecked exception.
 
Methods inherited from class com.interface21.transaction.support.DefaultTransactionDefinition
getIsolationLevel, getPropagationBehavior, getTimeout, setIsolationLevel, setPropagationBehavior, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.interface21.transaction.TransactionDefinition
getIsolationLevel, getPropagationBehavior, getTimeout
 

Constructor Detail

DefaultTransactionAttribute

public DefaultTransactionAttribute(int propagationBehavior,
                                   int isolationLevel)
Method Detail

rollBackOn

public boolean rollBackOn(java.lang.Throwable t)
Default behaviour is as with EJB: rollback on unchecked exception. Consistent with TransactionTemplate's behavior.
Specified by:
rollBackOn in interface TransactionAttribute
Following copied from interface: com.interface21.transaction.interceptor.TransactionAttribute
Parameters:
ex - the exception to evaluate
Returns:
boolean rollback or not


Rod Johnson and Spring contributors 2001-2003.