0 Replies Latest reply on Jul 26, 2007 5:21 AM by Melanie Ntolo

    Seam Interceptor with javaBean

    Melanie Ntolo Newbie

      Hi,

      I'm having an issue with Seam Interceptor. I'm fairly new to Seam and was wondering if anyone could help.

      I read in the seam Documentation that it is possible to use Seam Interceptor with javaBean, not only EJB3.

      I can't get it working. My @AroundInvoke method is called on a stateful Session Bean but not on the JavaBean class.
      What am I doing wrong?


      @Name( "TPZAdminDomainValidationInterceptor" )
      @Scope( ScopeType.CONVERSATION )
      @Interceptor( /*type = InterceptorType.CLIENT , stateless = true*/ )
      public class TPZAdminDomainValidationInterceptor
       extends TPZEntityController
      {
       @AroundInvoke
       public Object validateNewDomain( InvocationContext ctx ) throws Exception
       {
       ...
       return ctx.proceed();
      
       }
      }
      
      @Stateful
      @Name( "TPZAddDomainAction" )
      @Scope( ScopeType.CONVERSATION )
      public class TPZAddDomainAction
       extends TPZConversationEntityController
       implements TPZIAddDomainAction
      {
      
       @End
       @Interceptors ( TPZAdminDomainValidationInterceptor.class )
       public String processAddDomain()
       throws TPZRuntimeException, TPZApplicationException
       {
       ...
      }
      }
      
      
      
      @Name( "TPZAddDomainAction" )
      @Scope( ScopeType.CONVERSATION )
      public class TPZAddDomainAction
       extends TPZConversationEntityController
       implements TPZIAddDomainAction
      {
      
       @End
       @Interceptors ( TPZAdminDomainValidationInterceptor.class )
       public String processAddDomain()
       throws TPZRuntimeException, TPZApplicationException
       {
       ...
      }
      }