@Override
    public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext) {
        if (isWebContainerSessions()) {
            Context ctx = CDI.current().getBeanManager().getContext(webScopeType);
            return ctx.get(contextual, creationalContext);
        } else {
            synchronized (contextual) {
                if (isViewScoped) {
                    return Beans.getReference(ViewScopeManager.class).createBean(contextual, creationalContext);
                } else {
                    return getBeanStorage(SecurityUtils.getSubject().getSession())
                            .createBean(contextual, creationalContext);
                }
            }
        }
    }
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