openwebbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: [jira] Created: (OWB-182) Even if @PreDestroy is used in an Interceptor, it doesn't need an InvoicationContext parameter
Date Mon, 30 Nov 2009 21:14:02 GMT
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*.


LieGrue,
strub

--- Gurkan Erdogdu <gurkanerdogdu@yahoo.com> schrieb am Mo, 30.11.2009:

> Von: Gurkan Erdogdu <gurkanerdogdu@yahoo.com>
> Betreff: Re: [jira] Created: (OWB-182) Even if @PreDestroy is used in an Interceptor,
it doesn't need an InvoicationContext parameter
> An: openwebbeans-dev@incubator.apache.org
> Datum: Montag, 30. November 2009, 18:24
> If you look at Interceptors
> specification, you can see that if you have @PreDestroy in
> interceptor class, it must take "InvocationContext" as a
> parameter. I think that our old impl. was correct. Seems
> that TCK tests are wrong!
> 
> 
> --Gurkan
> 
> 
> 
> ________________________________
> From: Mark Struberg (JIRA) <jira@apache.org>
> To: openwebbeans-dev@incubator.apache.org
> Sent: Mon, November 30, 2009 1:33:20 AM
> Subject: [jira] Created: (OWB-182) Even if @PreDestroy is
> used in an Interceptor, it doesn't need an
> InvoicationContext parameter
> 
> Even if @PreDestroy is used in an Interceptor, it doesn't
> need an InvoicationContext parameter
> ----------------------------------------------------------------------------------------------
> 
>              
>    Key: OWB-182
>              
>    URL: https://issues.apache.org/jira/browse/OWB-182
>          
>    Project: OpenWebBeans
>           Issue Type: Bug
>     Affects Versions: M3
>             Reporter: Mark
> Struberg
>             Assignee: Mark
> Struberg
>              Fix
> For: M4
> 
> 
> thus we must disable the check in
> WebBeansUtils#configureInterceptorMethods
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue
> online.
> 
> 
>       

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.

http://mail.yahoo.com 

Mime
View raw message