[webbeans-dev] Re: Web Beans Context.get and scopes

Gavin King gavin at hibernate.org
Fri Nov 7 01:41:25 EST 2008


On Fri, Nov 7, 2008 at 1:23 AM, Nicklas Karlsson <nickarls at gmail.com> wrote:
> Hi,
>
>   Currently it appears to be possible to get a reference to a context
> from manager and call get with a bean of any scopetype and create=true
> and end up with the instance in that scope. Is this the desired behaviour?

Hmmm. Interesting point. I suppose we should add to the spec that Context
should throw an exception if the scope of the given bean does not match.

>  Bean instances created manually from Context.get also has no client
> proxy since it is applied at manager level but I understood from Pete
> that this should be the case(?)

Yes, that's correct. Context is not supposed to be called directly by the
application anyway.


> ---
> Nik
>



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