final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager.getBeans(
BoundSessionContext.class, BoundLiteral.INSTANCE));
CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
BoundSessionContext.class, ctx);
sessionContext.invalidate();
sessionContext.deactivate();
sessionContext.dissociate(sessionContexts.get());
final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager.getBeans(
BoundRequestContext.class, BoundLiteral.INSTANCE));