@Override
    public <T> T get(Contextual<T> contextual) {
        if (isWebContainerSessions()) {
            Context ctx = CDI.current().getBeanManager().getContext(webScopeType);
            return ctx.get(contextual);
        } else {
            if (isViewScoped) {
                return Beans.getReference(ViewScopeManager.class).getBean(contextual);
            } else {
                return getBeanStorage(SecurityUtils.getSubject().getSession()).getBean(contextual);
            }
        }
    }
If web environment, delegate to SessionScoped,
otherwise use Shiro sessions to store session beans
support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroScopeContext.java