[jboss-user] [JBoss Seam] - Interceptor Question

xinhua do-not-reply at jboss.com
Tue Apr 24 11:39:11 EDT 2007


Hi all, 
I have a simple Annotation like following:

  | @Target(METHOD)
  | @Retention(RUNTIME)
  | @Interceptors(PrintoutInterceptor.class)
  | public @interface Printout {
  | }
  | 

and the Interceptor class:

  | public class PrintoutInterceptor {
  | 
  |     @AroundInvoke
  |     public void printOut(InvocationContext invocation) throws Exception {
  | 	System.out.println("Method "+invocation.getMethod()+" is called");
  |         invocation.proceed();
  |     }
  | }

And then i tried to put this annotation on a method, 

  | ....
  | @Printout
  | public String register(.....)
  | .....
  | 

BUT, 
the interceptor doesnot work :(
can anyone help?
Thanks !!


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040227#4040227

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040227



More information about the jboss-user mailing list