[weld-dev] JSF + CDI: @Named diff behaviour than @ManagedBean

Raphael Lacerda lacerdaph at gmail.com
Mon Dec 20 19:23:20 EST 2010


is the SessionScoped annotation from javax.enterprise.context ?

On Mon, Dec 20, 2010 at 10:05 PM, Sebastian E. Ovide <
sebastian.ovide at gmail.com> wrote:

> Hi All,
>
> I have just started a new project using the maven  archetype
> weld-jsf-jee-minimal
>
> I have a Bean which has a property:
>
>     @Inject @TodoInotherway private TodoSrv todoService;
>
> If I annotate the bean with @ManagedBean the injection fails
> and todoService will be always null.. If I annotate the Bean with @Named,
> the property is injected correctly but the Bean is instantiated several
> times for each request even if it is annotated as @SessionScoped and
> therefore all it's properties are recreated... (with @ManageBean it saves
> the properties for the whole session)
>
> Is it a bug ?
>
> any ideas ?
>
>
>
> --
> Sebastian E. Ovide
>
>
>
>
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
>



-- 
Raphael Lacerda
(61) - 8148-6737

raphael.lacerda at caelum.com.br
Caelum Brasília - (61) 3039-4222
Caelum | Ensino e Inovação
http://www.caelum.com.br/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20101220/c08e6a37/attachment.html 


More information about the weld-dev mailing list