JBoss Community

How to apply JBoss AOP on a Jersey implementation?

created by Mert Emin Kalender in JBoss AOP - View the full discussion

I am trying to apply aspect oriented programming concepts on a Java server implementation. I created a project on Eclipse EE, and developed a simple REST API server via Jersey. Then, I searched for an aspect oriented programming framework that can be used standalone and found JBoss AOP.

I added all jars under jboss-aop-2.1.8.GA/lib to the build path and class path, and created a simple TestInterceptor class doing nothing but printing out a dumb text. Then under WebContent/META-INF/ I put the followingjboss-aop.xml

<aop>
<bind pointcut="execution(* *->*(..))">
<interceptor class="com.rest...TestInterceptor"/>
</bind>
</aop>

I added the following to the run arguments

-javaagent:/.../workspace/com.rest.aspect.todo/WebContent/WEB-INF/lib/jboss/jboss-aop.jar -Djboss.aop.path="/.../workspace/com.rest.aspect.todo/WebContent/META-INF/jboss-aop.xml"

 

I get the errors that displayed here: http://pastebin.com/TPM1e2pj

What would be missing or wrong in what I have done so far?

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community