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 <[email protected]> schrieb am Mo, 30.11.2009: > Von: Gurkan Erdogdu <[email protected]> > Betreff: Re: [jira] Created: (OWB-182) Even if @PreDestroy is used in an > Interceptor, it doesn't need an InvoicationContext parameter > An: [email protected] > 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) <[email protected]> > To: [email protected] > 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
