TransactionManagerPostProcessor (Grails 6.0.0)

Package: org.grails.transaction

## [Java] Class TransactionManagerPostProcessor

- org.grails.transaction.TransactionManagerPostProcessor

- All Implemented Interfaces and Traits:
    org.springframework.beans.factory.BeanFactoryAware, 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.

  Authors:
    Graeme Rocher
  Since:
    0.4

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private org.springframework.beans.factory.config.ConfigurableListableBeanFactory` | `beanFactory` |
    `private boolean` | `initialized` |
    `private int` | `order` |
    `private org.springframework.transaction.PlatformTransactionManager` | `transactionManager` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public int` | `getOrder()`
    `` | `private void` | `initialize()`
    `` | `public 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.
    `` | `public void` | `setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)` Gets the platform transaction manager from the bean factory if there is one.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter` | `org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#wait(long), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#wait(long, int), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#wait(), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#equals(java.lang.Object), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#toString(), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#hashCode(), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#getClass(), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#notify(), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#notifyAll(), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#predictBeanType(java.lang.Class, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#getEarlyBeanReference(java.lang.Object, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#determineCandidateConstructors(java.lang.Class, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#postProcessBeforeInstantiation(java.lang.Class, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#postProcessAfterInstantiation(java.lang.Object, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#postProcessProperties(org.springframework.beans.PropertyValues, java.lang.Object, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#postProcessPropertyValues(org.springframework.beans.PropertyValues, [Ljava.beans.PropertyDescriptor;, java.lang.Object, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#postProcessBeforeInitialization(java.lang.Object, java.lang.String), org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter#postProcessAfterInitialization(java.lang.Object, java.lang.String)`

- - ### Field Detail

    - #### private org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory

    - #### private boolean initialized

    - #### private int order

    - #### private org.springframework.transaction.PlatformTransactionManager transactionManager

  - ### Method Detail

    - #### public int getOrder()

    - #### private void initialize()

    - #### @java.lang.Override public 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.

      throws:
        BeansException
      Parameters:
        `bean` - The bean to process.
        `name` - The name of the bean.
      Returns:
        The bean after the transaction manager has been injected.

    - #### public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)

      Gets the platform transaction manager from the bean factory if there is one.

      throws:
        BeansException
      Parameters:
        `beanFactory` - The bean factory handling this post processor.