[weld-dev] Principal built-in bean

Martin Kouba mkouba at redhat.com
Mon Sep 4 04:24:03 EDT 2017


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 at apache.org <mailto:ejiang at apache.org>
> 
> 
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
> 

-- 
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic


More information about the weld-dev mailing list