Package org.grails.transaction
Class TransactionManagerPostProcessor
- java.lang.Object
-
- org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
-
- org.grails.transaction.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.PriorityOrderedInjects the platform transaction manager into beans that implementTransactionManagerAware.- Since:
- 0.4
-
-
Constructor Summary
Constructors Constructor Description TransactionManagerPostProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOrder()booleanpostProcessAfterInstantiation(java.lang.Object bean, java.lang.String name)Injects the platform transaction manager into the given bean if that bean implements theTransactionManagerAwareinterface.voidsetBeanFactory(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
-
-
-
-
Method Detail
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansExceptionGets the platform transaction manager from the bean factory if there is one.- Specified by:
setBeanFactoryin interfaceorg.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.BeansExceptionInjects the platform transaction manager into the given bean if that bean implements theTransactionManagerAwareinterface.- Specified by:
postProcessAfterInstantiationin interfaceorg.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:
getOrderin interfaceorg.springframework.core.Ordered
-
-