public void destroyJCRSession() { final AlterableContext requestContext = (AlterableContext) beanManager.getContext(RequestScoped.class); beanManager.getBeans(Session.class).stream().filter(bean -> bean != null).forEach(requestContext::destroy); }