jsr345-experts@ejb-spec.java.net

[jsr345-experts] Re: [ejb-spec users] Re: Question regarding CDI Scope for @Stateless beans

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Fri, 16 Nov 2012 17:31:15 -0800

Hmmm... so far all scopes for the EJBs are defined in the CDI spec. So
it would be strange if the EJB spec define scope for one bean type...

my $.02

What do others think?

thanks,
-marina

Mark Struberg wrote:
> PS: please note that this does _not_ require to change any code or apply @javax.inject.Scope. This would purely be a textual clarification in the spec.
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
>
>> From: Mark Struberg <struberg_at_yahoo.de>
>> To: ejb-users <users_at_ejb-spec.java.net>
>> Cc:
>> Sent: Friday, November 16, 2012 6:02 PM
>> Subject: [ejb-spec users] Question regarding CDI Scope for @Stateless beans
>>
>> Dear EJB EG!
>>
>> We have a question regarding the scope which we should use for @Stateless beans
>> handling in CDI. Currently this is defined as being treated as @Dependent. But
>> this is obviously wrong and got only worded that way to prevent the CDI
>> containers from applying CDI NormalScoped proxies.
>>
>>
>> Please see the discussion so far on our CDI EG issue tracker:
>> https://issues.jboss.org/browse/CDI-278
>>
>> A possible solution would be to define javax.ejb.Stateless as non-normalscoped
>> CDI scope. CDI would *not* apply any client proxies itself that way but we would
>> be able to return javax.ejb.Stateless.class in Bean#getScope() for EJBs.
>>
>> We think this is a good solution but don't like to define this in the CDI
>> spec because this is clearly an EJB related question and we don't like to
>> cross-specify EJB behaviour in the CDI spec.
>>
>> Wdyt? Would that fit into your concept?
>>
>>
>> txs and LieGrue,
>> strub
>>
>>