Class RepositoryConnectionMethodInterceptor
- java.lang.Object
-
- network.oxalis.ng.persistence.aop.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 Summary
Constructors Constructor Description RepositoryConnectionMethodInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectinvoke(org.aopalliance.intercept.MethodInvocation invocation)Starts a jdbc transaction if a transaction doesnt already exist.
-
-
-
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:
invokein interfaceorg.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.
-
-