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:
- org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor, org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor
public class TransactionManagerPostProcessor
- extends org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
- implements org.springframework.beans.factory.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
Method Summary |
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 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 |
TransactionManagerPostProcessor
public TransactionManagerPostProcessor()
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
- Overrides:
postProcessAfterInstantiation
in class org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
- 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
Copyright (c) 2005-2006 The Grails project