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

Kenneth Saks Kenneth.Saks at Sun.COM
Thu Aug 13 13:12:20 EDT 2009


On Aug 13, 2009, at 1:00 PM, Pete Muir wrote:

>
> 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).


1.  Is the Interceptor type in this signature a new kind of  
descriptor?  What information does
it hold?

2. interceptors should be a List instead of a Collection since it  
needs to
convey the ordering.    Does the CDI-specified interceptor metadata  
allow method-level
granularity for @AroundInvoke?  If so, a single ordered list of  
interceptor classes isn't
sufficient.

3. At what point in time will the CDI impl call registerInterceptors()  
for each EJB component?


> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev




More information about the weld-dev mailing list