Class TransactionInterceptor

java.lang.Object
org.springframework.transaction.interceptor.TransactionAspectSupport
io.micronaut.spring.tx.annotation.TransactionInterceptor
All Implemented Interfaces:
io.micronaut.aop.Interceptor<Object,Object>, io.micronaut.aop.MethodInterceptor<Object,Object>, io.micronaut.core.order.Ordered, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

@InterceptorBean(org.springframework.transaction.annotation.Transactional.class) @Requires(missingBeans=org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration.class) public class TransactionInterceptor extends org.springframework.transaction.interceptor.TransactionAspectSupport implements io.micronaut.aop.MethodInterceptor<Object,Object>
Simple interceptor to for Transactional.
Since:
1.0
Author:
graemerocher
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport

    org.springframework.transaction.interceptor.TransactionAspectSupport.CoroutinesInvocationCallback, org.springframework.transaction.interceptor.TransactionAspectSupport.InvocationCallback, org.springframework.transaction.interceptor.TransactionAspectSupport.TransactionInfo
  • Field Summary

    Fields inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport

    logger

    Fields inherited from interface io.micronaut.aop.Interceptor

    ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransactionInterceptor(io.micronaut.context.BeanLocator beanLocator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    int
     
    final Object
    intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
     
    protected org.springframework.transaction.interceptor.TransactionAttribute
    resolveTransactionAttribute(io.micronaut.inject.ExecutableMethod<Object,Object> targetMethod, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, String transactionManagerName)
     

    Methods inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport

    cleanupTransactionInfo, clearTransactionManagerCache, commitTransactionAfterReturning, completeTransactionAfterThrowing, createTransactionIfNecessary, currentTransactionInfo, currentTransactionStatus, determineTransactionManager, getBeanFactory, getTransactionAttributeSource, getTransactionManager, getTransactionManagerBeanName, invokeWithinTransaction, methodIdentification, prepareTransactionInfo, setBeanFactory, setTransactionAttributes, setTransactionAttributeSource, setTransactionAttributeSources, setTransactionManager, setTransactionManagerBeanName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.aop.MethodInterceptor

    intercept
  • Constructor Details

    • TransactionInterceptor

      public TransactionInterceptor(io.micronaut.context.BeanLocator beanLocator)
      Parameters:
      beanLocator - The BeanLocator
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered
    • intercept

      public final Object intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
      Specified by:
      intercept in interface io.micronaut.aop.MethodInterceptor<Object,Object>
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class org.springframework.transaction.interceptor.TransactionAspectSupport
    • resolveTransactionAttribute

      protected org.springframework.transaction.interceptor.TransactionAttribute resolveTransactionAttribute(io.micronaut.inject.ExecutableMethod<Object,Object> targetMethod, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, String transactionManagerName)
      Parameters:
      targetMethod - The target method
      annotationMetadata - The annotation metadata
      transactionManagerName - The transaction manager
      Returns:
      The TransactionAttribute