Class RepositoryConnectionMethodInterceptor

  • All Implemented Interfaces:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

    public class RepositoryConnectionMethodInterceptor
    extends Object
    implements org.aopalliance.intercept.MethodInterceptor
    Looks for all @Repository annotations and makes a database connection available to the methods within the repository.

    User: andy Date: 8/13/12 Time: 2:19 PM

    • Constructor Detail

      • RepositoryConnectionMethodInterceptor

        public RepositoryConnectionMethodInterceptor()
    • Method Detail

      • invoke

        public Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                      throws Throwable
        Starts a jdbc transaction if a transaction doesnt already exist. Joins the transaction if one exists
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Parameters:
        invocation - the method invocation joinpoint
        Returns:
        the result of the call to Joinpoint.proceed(), might be intercepted by the interceptor.
        Throws:
        Throwable - if the interceptors or the target-object throws an exception.