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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransactionManagerPostProcessor
public TransactionManagerPostProcessor()
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-2009 The Grails project