org.springframework.transaction.interceptor
Class AttributesTransactionAttributeSource

java.lang.Object
  extended byorg.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource
      extended byorg.springframework.transaction.interceptor.AttributesTransactionAttributeSource
All Implemented Interfaces:
InitializingBean, TransactionAttributeSource

public class AttributesTransactionAttributeSource
extends AbstractFallbackTransactionAttributeSource
implements InitializingBean

Implementation of TransactionAttributeSource that uses attributes from an Attributes implementation.

Author:
Rod Johnson, Juergen Hoeller
See Also:
Attributes, AbstractFallbackTransactionAttributeSource

Field Summary
 
Fields inherited from class org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource
logger
 
Constructor Summary
AttributesTransactionAttributeSource()
          Create a new AttributesTransactionAttributeSource.
AttributesTransactionAttributeSource(Attributes attributes)
          Create a new AttributesTransactionAttributeSource.
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
protected  Collection findAllAttributes(Class clazz)
          Subclasses should implement this to return all attributes for this class.
protected  Collection findAllAttributes(Method method)
          Subclasses should implement this to return all attributes for this method.
 void setAttributes(Attributes attributes)
          Set the Attributes implementation to use.
 
Methods inherited from class org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource
findTransactionAttribute, getTransactionAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributesTransactionAttributeSource

public AttributesTransactionAttributeSource()
Create a new AttributesTransactionAttributeSource.

See Also:
setAttributes(org.springframework.metadata.Attributes)

AttributesTransactionAttributeSource

public AttributesTransactionAttributeSource(Attributes attributes)
Create a new AttributesTransactionAttributeSource.

Parameters:
attributes - the Attributes implementation to use
Method Detail

setAttributes

public void setAttributes(Attributes attributes)
Set the Attributes implementation to use.


afterPropertiesSet

public void afterPropertiesSet()
Description copied from interface: InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface InitializingBean

findAllAttributes

protected Collection findAllAttributes(Class clazz)
Description copied from class: AbstractFallbackTransactionAttributeSource
Subclasses should implement this to return all attributes for this class.

Specified by:
findAllAttributes in class AbstractFallbackTransactionAttributeSource
Parameters:
clazz - class to retrieve attributes for
Returns:
all attributes associated with this class. May return null.

findAllAttributes

protected Collection findAllAttributes(Method method)
Description copied from class: AbstractFallbackTransactionAttributeSource
Subclasses should implement this to return all attributes for this method. We need all because of the need to analyze rollback rules.

Specified by:
findAllAttributes in class AbstractFallbackTransactionAttributeSource
Parameters:
method - the method to retrieve attributes for
Returns:
all attributes associated with this method. May return null.


Copyright (C) 2003-2004 The Spring Framework Project.