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: emijiang(a)uk.ibm.com
Lotus Notes: Emily Jiang/UK/IBM@IBMGB
From: Martin Kouba <mkouba(a)redhat.com>
To: Emily Jiang <emijiang6(a)googlemail.com>, Weld-Dev List
<weld-dev(a)lists.jboss.org>
Date: 04/09/2017 09:24
Subject: Re: [weld-dev] Principal built-in bean
Sent by: weld-dev-bounces(a)lists.jboss.org
------------------------------------------------------------------------
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
> ejiang(a)apache.org <mailto:ejiang@apache.org>
>
>
> _______________________________________________
> weld-dev mailing list
> weld-dev(a)lists.jboss.org
>
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_mail...
>
--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
_______________________________________________
weld-dev mailing list
weld-dev(a)lists.jboss.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_mail...
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