1 Reply Latest reply on Aug 8, 2009 10:02 PM by nickarls

    EE 6 and interceptors

    asookazian

      This is not directly related to Web Beans per se but I'm wondering why the EE 6 EG did not add a @BeforeInvoke and @AfterInvoke similar to what is available in Spring AOP.  I'm guessing it's because a simple @AroundInvoke is good enough in most cases.



      Interception: Custom behaviour can be inserted before or after method invocations against any interface or class. This is similar to around advice in AspectJ terminology.

      http://www.theserverside.com/tt/articles/article.tss?l=SpringFramework


      So what if you need more fine-grained control over when the interceptor is to be invoked?


      And what are the interception options for Web Beans that are not EJB3 components?

        • 1. Re: EE 6 and interceptors
          nickarls

          Arbi Sookazian wrote on Aug 08, 2009 01:33:

          So what if you need more fine-grained control over when the interceptor is to be invoked?


          Can't you do


            doWhateverBefore();
            invocationContext.proceed();
            doWhateverAfter();
          



          in the interceptor or did I miss something?




          Arbi Sookazian wrote on Aug 08, 2009 01:33:


          And what are the interception options for Web Beans that are not EJB3 components?


          Similar.