<T> void addOmniViewScoped(@Observes @WithAnnotations(org.omnifaces.cdi.ViewScoped.class) ProcessAnnotatedType<T> pat) {
        pat.setAnnotatedType(new AnnotatedTypeWrapper<>(pat.getAnnotatedType(), true,
                Set.of(ShiroOmniViewScopedAnnotated.class.getDeclaredAnnotations()[0],
                        ShiroSecureAnnotated.class.getDeclaredAnnotations()[0]),
                Set.of(OmniViewScopedAnnotated.class.getDeclaredAnnotations()[0])));
    }
intercept session destroy session listeners and destroy the beans

@param sessionListeners
@param sm
support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroSessionScopeExtension.java