HttpSession session = request.getSession();
Object ctxMgr = null;
ctxMgr = session
.getAttribute(ConversationConstants.CONVERSATION_CONTEXT_MANAGER_KEY);
if (ctxMgr == null) {
ConversationContextManager newCtxMgr = new DefaultConversationContextManager();
newCtxMgr.setContextFactory(this.conversationContextFactory);
newCtxMgr.setMaxInstances(this.maxInstances);
newCtxMgr.setMonitoringFrequency(this.monitoringFrequency);
ctxMgr = newCtxMgr;
session.setAttribute(
ConversationConstants.CONVERSATION_CONTEXT_MANAGER_KEY,
ctxMgr);
}