openwebbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [jira] Created: (OWB-182) Even if @PreDestroy is used in an Interceptor, it doesn't need an InvoicationContext parameter
Date Thu, 07 Jan 2010 14:04:12 GMT
On Mon, Nov 30, 2009 at 4:14 PM, Mark Struberg <struberg@yahoo.de> 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 ?


-- 
Eric Covener
covener@gmail.com

Mime
View raw message