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

xinhua do-not-reply at jboss.com
Tue Apr 24 12:23:38 EDT 2007


hi, CptnKirk

the app is running on JBossAS 4.0.5 GA with ejb3 container

here is my complete codes:


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


  | import static java.lang.annotation.ElementType.*;
  | import static java.lang.annotation.RetentionPolicy.RUNTIME;
  | import java.lang.annotation.*;
  | import javax.interceptor.Interceptors;
  | 
  | @Target(METHOD)
  | @Retention(RUNTIME)
  | @Interceptors(PrintoutInterceptor.class)
  | public @interface Printout {
  | }
  | 
i changed the import like this :

  | ....
  | import org.jboss.seam.annotations.Interceptors;
  | @Target(METHOD)
  | @Retention(RUNTIME)
  | @Interceptors(PrintoutInterceptor.class)
  | public @interface Printout {
  | }
  | 
  | 

it still doest work :...(

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

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



More information about the jboss-user mailing list