org.springframework.transaction.config
Class TxAnnotationDriven

java.lang.Object
  extended by org.springframework.context.config.AbstractFeatureSpecification
      extended by org.springframework.transaction.config.TxAnnotationDriven
All Implemented Interfaces:
FeatureSpecification, SourceAwareSpecification

public final class TxAnnotationDriven
extends AbstractFeatureSpecification

TODO SPR-7420: document

Since:
3.1
Author:
Chris Beams

Field Summary
 
Fields inherited from class org.springframework.context.config.AbstractFeatureSpecification
executorType
 
Constructor Summary
TxAnnotationDriven()
          Create a TxAnnotationDriven specification assumes the presence of a PlatformTransactionManager bean named .
TxAnnotationDriven(PlatformTransactionManager txManager)
          Create a new TxAnnotationDriven specification that will use the specified transaction manager.
TxAnnotationDriven(String txManagerBeanName)
          Create a new TxAnnotationDriven specification that will use the specified transaction manager bean name.
 
Method Summary
protected  void doValidate(ProblemCollector problems)
           
 TxAnnotationDriven mode(AdviceMode mode)
          Indicate how transactional advice should be applied.
 TxAnnotationDriven order(int order)
          Indicate the ordering of the execution of the transaction advisor when multiple advice executes at a specific joinpoint.
 TxAnnotationDriven order(String order)
          Indicate the ordering of the execution of the transaction advisor when multiple advice executes at a specific joinpoint.
 TxAnnotationDriven proxyTargetClass(Boolean proxyTargetClass)
          Indicate whether class-based (CGLIB) proxies are to be created as opposed to standard Java interface-based proxies.
 
Methods inherited from class org.springframework.context.config.AbstractFeatureSpecification
execute, source, source, sourceName, sourceName, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TxAnnotationDriven

public TxAnnotationDriven()
Create a TxAnnotationDriven specification assumes the presence of a PlatformTransactionManager bean named .

See the alternate constructors defined here if your transaction manager does not follow this default naming or you wish to refer to it by bean instance rather than by bean name.

See Also:
TxAnnotationDriven(String), TxAnnotationDriven(PlatformTransactionManager)

TxAnnotationDriven

public TxAnnotationDriven(String txManagerBeanName)
Create a new TxAnnotationDriven specification that will use the specified transaction manager bean name.

Parameters:
txManagerBeanName - name of PlatformTransactionManager bean or a ${placeholder} or SpEL #{expression} resolving to bean name. If null, falls back to default value of .

TxAnnotationDriven

public TxAnnotationDriven(PlatformTransactionManager txManager)
Create a new TxAnnotationDriven specification that will use the specified transaction manager.

Parameters:
txManager - the PlatformTransactionManager bean to use. Must not be null.
Method Detail

mode

public TxAnnotationDriven mode(AdviceMode mode)
Indicate how transactional advice should be applied.

See Also:
AdviceMode

proxyTargetClass

public TxAnnotationDriven proxyTargetClass(Boolean proxyTargetClass)
Indicate whether class-based (CGLIB) proxies are to be created as opposed to standard Java interface-based proxies.

Note: Class-based proxies require the @Transactional annotation to be defined on the concrete class. Annotations in interfaces will not work in that case (they will rather only work with interface-based proxies)!


order

public TxAnnotationDriven order(int order)
Indicate the ordering of the execution of the transaction advisor when multiple advice executes at a specific joinpoint. The default is null, indicating that default ordering should be used.


order

public TxAnnotationDriven order(String order)
Indicate the ordering of the execution of the transaction advisor when multiple advice executes at a specific joinpoint. The default is null, indicating that default ordering should be used.


doValidate

protected void doValidate(ProblemCollector problems)
Specified by:
doValidate in class AbstractFeatureSpecification