org.springframework.transaction.annotation
Class Ejb3TransactionAnnotationParser.Ejb3TransactionAttribute

java.lang.Object
  extended by org.springframework.transaction.support.DefaultTransactionDefinition
      extended by org.springframework.transaction.interceptor.DefaultTransactionAttribute
          extended by org.springframework.transaction.annotation.Ejb3TransactionAnnotationParser.Ejb3TransactionAttribute
All Implemented Interfaces:
java.io.Serializable, TransactionAttribute, TransactionDefinition
Enclosing class:
Ejb3TransactionAnnotationParser

private static class Ejb3TransactionAnnotationParser.Ejb3TransactionAttribute
extends DefaultTransactionAttribute

EJB3-specific TransactionAttribute, implementing EJB3's rollback rules which are based on annotated exceptions.


Field Summary
 
Fields inherited from class org.springframework.transaction.support.DefaultTransactionDefinition
PREFIX_ISOLATION, PREFIX_PROPAGATION, PREFIX_TIMEOUT, READ_ONLY_MARKER
 
Fields inherited from interface org.springframework.transaction.TransactionDefinition
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 Summary
Ejb3TransactionAnnotationParser.Ejb3TransactionAttribute(TransactionAttributeType type)
           
 
Method Summary
 boolean rollbackOn(java.lang.Throwable ex)
          The default behavior is as with EJB: rollback on unchecked exception.
 
Methods inherited from class org.springframework.transaction.interceptor.DefaultTransactionAttribute
getAttributeDescription, getQualifier, setQualifier
 
Methods inherited from class org.springframework.transaction.support.DefaultTransactionDefinition
equals, getDefinitionDescription, getIsolationLevel, getName, getPropagationBehavior, getTimeout, hashCode, isReadOnly, setIsolationLevel, setIsolationLevelName, setName, setPropagationBehavior, setPropagationBehaviorName, setReadOnly, setTimeout, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.transaction.TransactionDefinition
getIsolationLevel, getName, getPropagationBehavior, getTimeout, isReadOnly
 

Constructor Detail

Ejb3TransactionAnnotationParser.Ejb3TransactionAttribute

public Ejb3TransactionAnnotationParser.Ejb3TransactionAttribute(TransactionAttributeType type)
Method Detail

rollbackOn

public boolean rollbackOn(java.lang.Throwable ex)
Description copied from class: DefaultTransactionAttribute
The default behavior is as with EJB: rollback on unchecked exception. Additionally attempt to rollback on Error.

This is consistent with TransactionTemplate's default behavior.

Specified by:
rollbackOn in interface TransactionAttribute
Overrides:
rollbackOn in class DefaultTransactionAttribute
Parameters:
ex - the exception to evaluate
Returns:
whether to perform a rollback or not