[jboss-user] [JBoss AOP] - jboss aop in eclipse - can't make it work

Aram Hovsepyan do-not-reply at jboss.com
Tue Jun 22 05:03:55 EDT 2010


Aram Hovsepyan [http://community.jboss.org/people/aramhovsepyan] created the discussion

"jboss aop in eclipse - can't make it work"

To view the discussion, visit: http://community.jboss.org/message/549067#549067

--------------------------------------------------------------
Hi,

I've just started digging into the jboss AOP, however its been 2 days and I just can't make the most trivial helloworld work. The documentation I've found so far did not help. I'd appreciate a lot if someone would tell me what am I doing wrong. The application is exported to .war and placed in the deploy directory.
I've added -Djboss.aop.verbose=true to JAVA_OPTS and it doesn't produce anything.

Here is what i have:
- org.kuleuven.Test.java
- org.kuleuven.TestAspect.java
- WebContent/META-INF/jboss-aop.xml
+ some stuff that's not relevant

the jboss server is version 5.1 and has jboss.aop running.

In Test.java I have:
...
public void testing()
{
//aspect should execute here
System.out.println("testing");
}
...

The TestAspect.java:
public class TestAspect implements Interceptor {
public String getName() {
return "HelloWorldInterceptor";
}
public Object invoke(Invocation inv) throws Throwable {
System.out.println("Aspect interception");
return inv.invokeNext();
}
}
and the jboss-aop.xml:
<?xml version="1.0" encoding="UTF-8"?>
<aop xmlns="urn:jboss:aop-beans:1.0">
<aspect class="org.kuleuven.TestAspect" scope="PER_VM"/>
<bind pointcut="execution(public void org.kuleuven.Test->testing())">
<advice name="test" aspect="org.kuleuven.TestAspect"/>
   </bind>
</aop>

thnx a lot
 

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/549067#549067]

Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100622/55ba3725/attachment-0001.html 


More information about the jboss-user mailing list