Class TransactionalDaoInterceptor

  • All Implemented Interfaces:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.InitializingBean

    public class TransactionalDaoInterceptor
    extends java.lang.Object
    implements org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.InitializingBean
    Utility class that ensures that a NodeDaoService has been registered with the current transaction.

    It is designed to act as a postInterceptor on the NodeDaoService's TransactionProxyFactoryBean.

    Author:
    Derek Hulley
    • Constructor Detail

      • TransactionalDaoInterceptor

        public TransactionalDaoInterceptor()
    • Method Detail

      • setDaoService

        public void setDaoService​(TransactionalDao daoService)
        Parameters:
        daoService - the NodeDaoService to register
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Checks that required values have been injected
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • invoke

        public java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Throws:
        java.lang.Throwable