## org.codehaus.groovy.grails.orm.support
Class TransactionManagerPostProcessor

    java.lang.Object
      org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
          org.codehaus.groovy.grails.orm.support.TransactionManagerPostProcessor

All Implemented Interfaces:
  BeanFactoryAware, BeanPostProcessor, InstantiationAwareBeanPostProcessor, SmartInstantiationAwareBeanPostProcessor

    public class TransactionManagerPostProcessor

extends InstantiationAwareBeanPostProcessorAdapter
implements BeanFactoryAware

This is a bean post processor that injects the platform transaction manager into beans that implement the `TransactionManagerAware` interface.

Since:
  0.4
Author:
  Graeme Rocher

Constructor Summary
`TransactionManagerPostProcessor()`

Method Summary
`boolean` `postProcessAfterInstantiation(Object bean, String name)` Injects the platform transaction manager into the given bean if that bean implements the `TransactionManagerAware` interface.
`void` `setBeanFactory(BeanFactory beanFactory)` Gets the platform transaction manager from the bean factory if there is one.

Methods inherited from class org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
`determineCandidateConstructors, getEarlyBeanReference, postProcessAfterInitialization, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TransactionManagerPostProcessor

    public TransactionManagerPostProcessor()

Method Detail

### setBeanFactory

    public void setBeanFactory(BeanFactory beanFactory)
                        throws BeansException

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

  Specified by:
    `setBeanFactory` in interface `BeanFactoryAware`
  Parameters:
    `beanFactory` - The bean factory handling this post processor.
  Throws:
    `BeansException`

### postProcessAfterInstantiation

    public boolean postProcessAfterInstantiation(Object bean,
                                                 String name)
                                          throws BeansException

  Injects the platform transaction manager into the given bean if that bean implements the `TransactionManagerAware` interface.

  Specified by:
    `postProcessAfterInstantiation` in interface `InstantiationAwareBeanPostProcessor`
  Overrides:
    `postProcessAfterInstantiation` in class `InstantiationAwareBeanPostProcessorAdapter`
  Parameters:
    `bean` - The bean to process.
    `name` - The name of the bean.
  Returns:
    The bean after the transaction manager has been injected.
  Throws:
    `BeansException`

Copyright (c) 2005-2006 The Grails project