Pedidos @Tansactional y @Aspect

Me gustaría ejecutar mi código justo antes@Transactional Se inicia la transacción.

@Aspect
@Order(Ordered.HIGHEST_PRECEDENCE)
//@Order(Ordered.LOWEST_PRECEDENCE)
public class SynchronizerAspect {

  @Pointcut("execution(public * xxx.xxx.services.*.*(..))")
  private void anyServiceOperation() {
  }

  @Around("anyServiceOperation()")
public Object synchronizerAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
    System.out.println("Synchronizing : " + joinPoint.getSignature().getName());
return joinPoint.proceed();
  }

Cuando llamo a un método de servicio marcado como @Transactional siempre tengo mi código de aspecto ejecutado dentro de la transacción:

[INFO] INFO: FETCH created: Fri Oct 30 15:43:11 UTC 2015 duration: 0 connection: 40 statement: 999 resultset: 0
[INFO] paĹş 30, 2015 3:43:11 PM com.mysql.jdbc.log.Slf4JLogger logInfo
[INFO] INFO: QUERY created: Fri Oct 30 15:43:11 UTC 2015 duration: 1 connection: 40 statement: 14 resultset: 15 message: SELECT @@session.tx_isolation
[INFO] paĹş 30, 2015 3:43:11 PM com.mysql.jdbc.log.Slf4JLogger logInfo
[INFO] INFO: FETCH created: Fri Oct 30 15:43:11 UTC 2015 duration: 3 connection: 40 statement: 14 resultset: 15
[INFO] paĹş 30, 2015 3:43:11 PM com.mysql.jdbc.log.Slf4JLogger logInfo
[INFO] INFO: QUERY created: Fri Oct 30 15:43:11 UTC 2015 duration: 1 connection: 40 statement: 999 resultset: 0 message: SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
[INFO] paĹş 30, 2015 3:43:11 PM com.mysql.jdbc.log.Slf4JLogger logInfo
[INFO] INFO: FETCH created: Fri Oct 30 15:43:11 UTC 2015 duration: 0 connection: 40 statement: 999 resultset: 0
[INFO] paĹş 30, 2015 3:43:11 PM com.mysql.jdbc.log.Slf4JLogger logInfo
[INFO] INFO: QUERY created: Fri Oct 30 15:43:11 UTC 2015 duration: 0 connection: 40 statement: 15 resultset: 16 message: SELECT 1
[INFO] paĹş 30, 2015 3:43:11 PM com.mysql.jdbc.log.Slf4JLogger logInfo
[INFO] INFO: FETCH created: Fri Oct 30 15:43:11 UTC 2015 duration: 3 connection: 40 statement: 15 resultset: 16
[INFO] Synchronizing : getCompany

Yo también puse@EnableTransactionManagement(order = 500)

¿Hay algo que deba hacer para que funcione?

Además, uso Aspectj-Maven-Plugin: 1.7 para tejer aspectos en el momento de la compilación.

¿Es tan inteligente y también usa @Ordering?

No importa cómo configuré los registros de @Order aspectj-maven-plugin, muestra que mi @Aspect fue agregado antes que @Transactional

[INFO] Join point 'method-execution(boolean xxx.xxx.services.LicenseServiceImpl.checkLicenseFile(int, int))' in Type 'xxx.xxx.services.LicenseServiceImpl' (LicenseServiceImpl.java:261) advised by around advice from 'xxx.xxx.aop.SynchronizerAspect' (SynchronizerAspect.java:29)
[INFO] Join point 'method-execution(boolean xxx.xxx.services.LicenseServiceImpl.checkLicenseFile(int, int))' in Type 'xxx.xxx.services.LicenseServiceImpl' (LicenseServiceImpl.java:261) advised by around advice from 'org.springframework.transaction.aspectj.AnnotationTransactionAspect' (spring-aspects-4.2.2.RELEASE.jar!AbstractTransactionAspect.class:66(from AbstractTransactionAspect.aj))

Respuestas a la pregunta(1)

Su respuesta a la pregunta