users@ejb-spec.java.net

[ejb-spec users] Question regarding CDI Scope for _at_Stateless beans

From: Mark Struberg <struberg_at_yahoo.de>
Date: Fri, 16 Nov 2012 17:02:56 +0000 (GMT)

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