[Equinox Weaving] @Aspect ignored [message #634749] |
Fri, 22 October 2010 20:28  |
Eclipse User |
|
|
|
Got Equinox Weaving set up and it works in part (-Dorg.aspectj.weaver.showWeaveInfo=true and some testing shows that the Spring AnnotationTransactionAspect is applied). But it ignores a custom aspect I created. Any idea what I am doing wrong?
META-INF/aop.xml
<aspectj>
<weaver>
<include within="*"/>
</weaver>
<aspects>
<include within="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
<include within="test.TimedAdvice"/>
</aspects>
</aspectj>
test/TimedAdvice.java (in the same bundle):
package test;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Aspect
public class TimedAdvice {
private final Logger log = LoggerFactory.getLogger(getClass());
@Around("@annotation(org.springframework.transaction.annotation.Transactional)")
public void execute(ProceedingJoinPoint point) throws Throwable {
long t0 = System.currentTimeMillis();
point.proceed();
long duration = System.currentTimeMillis() - t0;
log.debug("Duration: {}", duration);
}
}
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03994 seconds