[jboss-user] [JBoss AOP] - JBOSS AOP example not working
chandra_88
do-not-reply at jboss.com
Thu Dec 6 01:28:37 EST 2007
Hi,
Iam using JBOSS 404 ejb3 configuration to try a AOP Example that is mentione din the user guide but it doesnt seem to work .
My AOP.xml
My Interceptor class
package com.jboss.aspect;
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.MethodInvocation;
import org.jboss.logging.Logger;
public class AspectTest {
private Logger myLog = Logger.getLogger("AspectTest");
public Object invoke(Invocation invocation) throws Throwable {
java.lang.reflect.Method m = ((MethodInvocation)invocation).getMethod();
System.out.println("Entering method " + m.getName());
try{
return invocation.invokeNext();
}
finally{
System.out.println("Exiting Method " + m.getName());
}
}
}
Now i have deployed the AOP and the servlet as a .aop and .war file in the JBoss deploy directory , the System.out.println messages are not getting printed .
Do i need to run annotatec and how do i do it
if i try java >java org.jboss.aop.ant.AnnotationC it gives me an error saying
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/MatchingTask
at java.lang.ClassLoader.defineClass1(Native Method)
Any help will be appreciated.
Thanks
Chandra
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110728#4110728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110728
More information about the jboss-user
mailing list