@Override public Object handler(final ProceedingJoinPoint point, final HmilyTransactionContext context) throws Throwable { if (HmilyActionEnum.TRYING.getCode() == context.getAction()) { MethodSignature signature = (MethodSignature) point.getSignature(); Method method = signature.getMethod(); Class<?> clazz = point.getTarget().getClass(); Object[] args = point.getArgs(); final Hmily hmily = method.getAnnotation(Hmily.class); HmilyInvocation confirmInvocation = null; String confirmMethodName = hmily.confirmMethod(); String cancelMethodName = hmily.cancelMethod(); if (StringUtils.isNoneBlank(confirmMethodName)) { confirmInvocation = new HmilyInvocation(clazz, confirmMethodName, method.getParameterTypes(), args); } HmilyInvocation cancelInvocation = null; if (StringUtils.isNoneBlank(cancelMethodName)) { cancelInvocation = new HmilyInvocation(clazz, cancelMethodName, method.getParameterTypes(), args); } final HmilyParticipant hmilyParticipant = new HmilyParticipant(context.getTransId(), confirmInvocation, cancelInvocation); hmilyTransactionExecutor.registerByNested(context.getTransId(), hmilyParticipant); } return point.proceed(); }
final HmilyParticipant hmilyParticipant = buildParticipant(hmily, method, args, hmilyTransactionContext); if (hmilyTransactionContext.getRole() == HmilyRoleEnum.INLINE.getCode()) { hmilyTransactionExecutor.registerByNested(hmilyTransactionContext.getTransId(), hmilyParticipant); } else {
final HmilyParticipant hmilyParticipant = buildParticipant(hmilyTransactionContext, hmily, method, clazz, arguments, args); if (hmilyTransactionContext.getRole() == HmilyRoleEnum.INLINE.getCode()) { hmilyTransactionExecutor.registerByNested(hmilyTransactionContext.getTransId(), hmilyParticipant); } else {
final HmilyParticipant hmilyParticipant = buildParticipant(hmilyTransactionContext, hmily, method, clazz, arguments, args); if (hmilyTransactionContext.getRole() == HmilyRoleEnum.INLINE.getCode()) { hmilyTransactionExecutor.registerByNested(hmilyTransactionContext.getTransId(), hmilyParticipant); } else {