@Around("execution(@org.apache.servicecomb.saga.omega.transaction.annotations.Compensable * *(..)) && @annotation(compensable)") Object advise(ProceedingJoinPoint joinPoint, Compensable compensable) throws Throwable { Method method = ((MethodSignature) joinPoint.getSignature()).getMethod(); String localTxId = context.localTxId(); context.newLocalTxId(); LOG.debug("Updated context {} for compensable method {} ", context, method.toString()); int retries = compensable.retries(); RecoveryPolicy recoveryPolicy = RecoveryPolicyFactory.getRecoveryPolicy(retries); try { return recoveryPolicy.apply(joinPoint, compensable, interceptor, context, localTxId, retries); } finally { context.setLocalTxId(localTxId); LOG.debug("Restored context back to {}", context); } } }