[cdi-dev] LifeCycle Event Callbacks and Interceptors

Pete Muir pmuir at redhat.com
Thu Jun 16 15:06:22 EDT 2011


Sorry Adam, I don't really know what you mean.

Can you explain for me?

On 15 Jun 2011, at 17:28, Adam Bien wrote:

> HI Pete.
> On 01.06.2011, at 14:19, Pete Muir wrote:
> 
>>> From 7.2 of the CDI spec:
>> 
>> "Invocation of lifecycle callbacks by the container are not business method invocations, but are intercepted by intercept- ors for lifecycle callbacks."
> 
> 
> 
>> 
>> and 
>> 
>> "If, and only if, an invocation is a business method invocation it passes through method interceptors and decorators"
>> 
>> So the CDI spec is fairly clear that around invoke interceptors are not called for lifecycle callbacks IMO. If you want this clarified, please open a CDI issue + provide a patch/pull req for suggested changes (as I see it, it's quite clear so I wouldn't know how to improve it ;-).
> 
> but in EJB 3 lifecycle callbacks like e.g. @PostConstruct are defined.  IMO CDI should also propagate this callbacks to the application.
>> 
>> On 30 May 2011, at 23:21, Jens Schumann wrote:
>> 
>>> Hi all!
>>> 
>>> Recently I have noticed that OWB does not apply (class/method)
>>> interceptors to lifecycle event callback methods. I 've chatted with Mark
>>> and he referred me to the list. He tried to remember his research on this
>>> topic and made the point that class interceptors should probably be
>>> applied. However he has the feeling that pure method interceptors may not
>>> be applied for lifecycle event callback methods since those methods are no
>>> business methods.
>>> 
>>> It seems that neither the CDI spec nor the interceptor spec covers the
>>> topic for all variations. After reading the interceptor spec again
>>> (chapter "Interceptors for LifeCycle Event Callbacks") I would follow
>>> Marks assertions.
>>> 
>>> What do you think? Is there anything missing within the CDI spec (and OWB
>>> of course)?
>>> 
>>> Jens
>>> 
>>> 
>>> _______________________________________________
>>> cdi-dev mailing list
>>> cdi-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>> 
>> 
>> _______________________________________________
>> cdi-dev mailing list
>> cdi-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/cdi-dev
> 
> 




More information about the cdi-dev mailing list