Well, it works similar to how @Dependent stateless session beans work. 
Unlike @RequestScoped there is no real CDI context just a special proxy 
that delegates to SPI.

Martin

Dne 4.9.2017 v 11:09 Emily Jiang napsal(a):
> Does this mean it functions as a Request scoped bean even though it is a 
> Dependent bean?
> 
> Many thanks,
> Emily
> ===========================
> Emily Jiang
> WebSphere Application Server, CDI & MicroProfile Development Lead
> 
> MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN
> Phone:  +44 (0)1962 816278  Internal: 246278
> 
> Email: [email protected]
> Lotus Notes: Emily Jiang/UK/IBM@IBMGB
> 
> 
> 
> 
> From: Martin Kouba <[email protected]>
> To: Emily Jiang <[email protected]>, Weld-Dev List 
> <[email protected]>
> Date: 04/09/2017 09:24
> Subject: Re: [weld-dev] Principal built-in bean
> Sent by: [email protected]
> ------------------------------------------------------------------------
> 
> 
> 
> It's @Dependent. But a special proxy is injected and SPI
> org.jboss.weld.security.spi.SecurityServices.getPrincipal() is invoked
> to obtain the current caller identity for every invocation of an
> injected reference.
> 
> Martin
> 
> Dne 1.9.2017 v 16:57 Emily Jiang napsal(a):
>  > A Java EE or embeddable EJB container must provide the following
>  > built-in beans, all of which
>  > have qualifier @Default:
>  >
>  > a bean with bean type javax.security.Principal, allowing injection of a
>  > Principal
>  > representing the current caller identity.
>  >
>  > The spec does not say the scope of this bean. In Weld, what is the scope
>  > for the Principal bean?
>  >
>  > --
>  > Thanks
>  > Emily
>  > =================
>  > Emily Jiang
>  > [email protected] <mailto:[email protected]>
>  >
>  >
>  > _______________________________________________
>  > weld-dev mailing list
>  > [email protected]
>  > 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_mailman_listinfo_weld-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=jt2y5_gH2oPaja8Vt6NzAZV-iEo6D2jiWeuVYs0H-1U&m=jIKn0UxNi92JGBmOv2ycs3JoHrlVZC6ARxh7qsqJzE8&s=7SXNuw9nF99r1RrRF97m4EBatYRmA9igLcjOExFx6ak&e=
>  >
> 
> -- 
> Martin Kouba
> Senior Software Engineer
> Red Hat, Czech Republic
> _______________________________________________
> weld-dev mailing list
> [email protected]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_mailman_listinfo_weld-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=jt2y5_gH2oPaja8Vt6NzAZV-iEo6D2jiWeuVYs0H-1U&m=jIKn0UxNi92JGBmOv2ycs3JoHrlVZC6ARxh7qsqJzE8&s=7SXNuw9nF99r1RrRF97m4EBatYRmA9igLcjOExFx6ak&e=
> 
> 
> 
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

-- 
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
_______________________________________________
weld-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-dev

Reply via email to