[webbeans-dev] Re: Contextual/Non-Contextual EJBs

Gavin King gavin at hibernate.org
Mon Mar 16 13:27:28 EDT 2009


There are two things here:

* the actual bean class instance
* the EJB local object

The "scope" of an EJB in 299 is really the scope of the local object reference.

On Mon, Mar 16, 2009 at 1:07 PM, Pete Muir <pmuir at redhat.com> wrote:
> I've been working through in my head how this works, and AFAICT:
>
> * SFSBs may contextual or not-contextual
> * SLSBs and singletons should always non-contextual
>
> otherwise there is an ambiguity here
>
> * SLSBs can be allocated from a pool, and are constructed once and reused
> and so one which has undergone non-contexutal injection might be reused as a
> contextual bean
> * singletons are singleton, so again we have the same dilemma (whether they
> undergo contextual or non-contextual injection depends on what they are
> first requested for)
>
> Am I missing something? If not, then I think the spec should be explicit
> regarding this.
>
> Thanks :-)
>
> --
> Pete Muir
> http://www.seamframework.org
> http://in.relation.to/Bloggers/Pete
>
>



-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org



More information about the weld-dev mailing list