[webbeans-dev] Creating instances of managed beans (including EJBs) in EE6 (was Re: non-contextual managed bean creation)

Pete Muir pmuir at redhat.com
Thu Aug 13 13:00:47 EDT 2009


On 13 Aug 2009, at 17:03, Kenneth Saks wrote:

>>> Let's add a web beans provided interceptor that the EJB container
>>> will register after any
>>> EJB-style interceptors.  That can handle all interceptors that are
>>> specified via
>>> CDI-style metadata.
>>
>> I was just talking with Carlo about how to do this. Since we are now
>> doing such deep integration, I would prefer to switch to using an SPI
>> to specify the interceptors to apply to a session bean. Of course,  
>> the
>> EJB container could choose to use an interceptor to attach them
>> (essentially moving the built in SPI to the container). I guess such
>> an SPI would look like [1]:
>>
>> interface EjbServices {
>>
>>   ...
>>
>>   void registerInterceptors(EjbDescriptor<?> descriptor,
>> Collection<Interceptor<?>> interceptors);
>> }
>>
>> This would completely remove the Web Beans built in EJB interceptor
>> (more flexible for integrators).
>
> Does this represent
>
> a) the CDI impl's system-level interceptor
>
> or
>
> b) application-level interceptors that are specified via CDI- 
> specific metadata
>
> Or are you saying there is no longer a need for a) ?
>
> It's an important distinction since a) would need to be registered  
> before *any*
> application-level interceptors, whereas b) would be registered after  
> interceptors
> specified via the EJB interceptor metadata.

It represents (b), and with it, we would no longer need (a).



More information about the weld-dev mailing list