No. EJB Interceptor specification defines Lifecycle callback methods as follows
If in Interceptor class void <METHOD> (InvocationContext) If in bean class void <METHOD>() Thks; --Gurkan 2010/1/7 Eric Covener <[email protected]> > On Mon, Nov 30, 2009 at 4:14 PM, Mark Struberg <[email protected]> wrote: > > I think the current discussion between Gavin and Marius shows that this > question is not that easy to answer :) > > > > In fact I thought about this since yesterday and also came to the > conclusion that there are 2 completely different lifecycles ment with > @PreDestroy and @PreDestroy(InvocationContext) on an Interceptor class. The > first will get called before the interceptor instance itself will be freed, > the 2nd will get called for each and every destruction of an intercepted > bean. > > > > The problem I also see is that the EE spec currently forbids having 2 > methods being annotated with PreDestroy and @PostConstruct. > > > > It should be ok to allow exactly 1 of each kind for an @Interceptor, but > that is not covered by the EE spec. > > > > But anyhow, over all the thinking about that stuff, I forgot to fix the > unit test in webbeans-impl *shameonme*. > > Resurrecting an old thread. > > WebBeansUtil.checkCommonAnnotationCriterias() expects @PostConstruct > in an Interceptor class to have a void return type, but shouldn't it > look exactly like the @AroundInvoke in such a case (return Object for > ic.proceed(), throw Exception, etc)? > > e.g. > http://people.apache.org/~covener/patches/owb-lifcycle_interceptors.diff<http://people.apache.org/%7Ecovener/patches/owb-lifcycle_interceptors.diff>? > > > -- > Eric Covener > [email protected] > -- Gurkan Erdogdu http://gurkanerdogdu.blogspot.com
