Skip to content

Commit

Permalink
#19 Optimistic locking Aspect
Browse files Browse the repository at this point in the history
  • Loading branch information
spuliaiev-sfdc committed Jul 11, 2018
1 parent 77c27dd commit 64949c5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;

import java.lang.reflect.Method;
import java.util.Arrays;

@Aspect
@Component
public class OptimisticConcurrencyControlAspect {

private static final Logger LOGGER = LoggerFactory.getLogger(OptimisticConcurrencyControlAspect.class);
Expand All @@ -24,6 +27,9 @@ public Object retry(ProceedingJoinPoint pjp) throws Throwable {
return (retryAnnotation != null) ? proceed(pjp, retryAnnotation) : proceed(pjp);
}

// @Pointcut("execution(public * *(..))")// the pointcut expression
// private void anyOldTransfer() {}

private Object proceed(ProceedingJoinPoint pjp) throws Throwable {
return pjp.proceed();
}
Expand Down

0 comments on commit 64949c5

Please sign in to comment.