Class TransactionManagerPostProcessor

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor, org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor, org.springframework.core.Ordered, org.springframework.core.PriorityOrdered

    public class TransactionManagerPostProcessor
    extends org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
    implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.core.PriorityOrdered
    Injects the platform transaction manager into beans that implement TransactionManagerAware.
    Since:
    0.4
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getOrder()  
      boolean postProcessAfterInstantiation​(java.lang.Object bean, java.lang.String name)
      Injects the platform transaction manager into the given bean if that bean implements the TransactionManagerAware interface.
      void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
      Gets the platform transaction manager from the bean factory if there is one.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor

        postProcessAfterInitialization, postProcessBeforeInitialization
      • Methods inherited from interface org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor

        postProcessBeforeInstantiation, postProcessProperties, postProcessPropertyValues
      • Methods inherited from interface org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor

        determineCandidateConstructors, getEarlyBeanReference, predictBeanType
    • Constructor Detail

      • TransactionManagerPostProcessor

        public TransactionManagerPostProcessor()
    • Method Detail

      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
        Gets the platform transaction manager from the bean factory if there is one.
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
        Parameters:
        beanFactory - The bean factory handling this post processor.
        Throws:
        org.springframework.beans.BeansException
      • postProcessAfterInstantiation

        public boolean postProcessAfterInstantiation​(java.lang.Object bean,
                                                     java.lang.String name)
                                              throws org.springframework.beans.BeansException
        Injects the platform transaction manager into the given bean if that bean implements the TransactionManagerAware interface.
        Specified by:
        postProcessAfterInstantiation in interface org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
        Parameters:
        bean - The bean to process.
        name - The name of the bean.
        Returns:
        The bean after the transaction manager has been injected.
        Throws:
        org.springframework.beans.BeansException
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered