public static void addScopeSessionListeners(WebSecurityManager wsm) {
        if (!isWebContainerSessions(wsm)) {
            var dsm = getNativeSessionManager(wsm);
            Beans.getReference(ShiroSessionScopeExtension.class)
                    .addSessionListeners(dsm.getSessionListeners(), wsm);
        }
    }
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