Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Equinox Weaving with @Aspect
Equinox Weaving with @Aspect [message #638060] Tue, 09 November 2010 19:23
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
I started using Equinox Weaving so I could get Spring's @Transactional annotations to function better (e.g. on objects not managed by Spring). This has been working great. Now I wanted to add my own advice like so:

	    <include within="*"/>
        <include within="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
        <aspect name="test.ui.TestAdvice"/>

package test.ui;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

public class TestAdvice {
    @Around("execution(public void")
    public void execute(ProceedingJoinPoint point) throws Throwable {
        // do stuff
        // do more stuff

package test.ui;

public class Foo {
    public void bar() {
        // whatever

Unfortunately the advice is never executed.

If I change the @Around annotation to refer to a bogus class (or even just to a class located in a different package than the advice class!) I get these warnings on startup:

[test-bundle-2] warning at test\ui\ no match for this type name: test.util.Bar [Xlint:invalidAbsoluteTypeName]
[test-bundle-3] warning at test\ui\ no match for this type name: test.util.Bar [Xlint:invalidAbsoluteTypeName]

test-bundle-2 and test-bundle-3 and separate bundles that are part of the same application but are supposed to be AOP-unaware.

What am I missing?
Previous Topic:Inheriting from Template Class
Next Topic:New to AspectJ
Goto Forum:

Current Time: Tue Oct 23 10:13:40 GMT 2018

Powered by FUDForum. Page generated in 0.01559 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top