public static void resumeConversation(ExternalContext externalContext) { ServerConversationContext conversationContext = new ServerConversationContext( externalContext.getSessionMap() ); /*Context conversationContext = Init.instance().isClientSideConversations() ? (Context) new ClientConversationContext() : (Context) new ServerConversationContext( externalContext.getSessionMap() );*/ Contexts.conversationContext.set(conversationContext); Contexts.businessProcessContext.set( new BusinessProcessContext() ); conversationContext.unflush(); }
public static void resumeConversation(HttpServletRequest request) { ServerConversationContext conversationContext = new ServerConversationContext( new ServletRequestSessionMap(request) ); Contexts.conversationContext.set(conversationContext); Contexts.businessProcessContext.set( new BusinessProcessContext() ); conversationContext.unflush(); } /**
static Map getConversationCache() { Map convCache = new HashMap(); String convId = findConversationId(); if (convId == null) return convCache; Context conversationContext = new ServerConversationContext(sessionMap(), convId); for (String name : conversationContext.getNames() ) { Object value = conversationContext.get(name); convCache.put(name, value); } return convCache; }
/** * Destroy a conversation context that is not currently bound to the request, called * due to a timeout. * * @param session the current session, to which both current and destroyed conversation belong * @param conversationId the conversation id of the conversation to be destroyed */ static void destroyConversationContext(Map<String, Object> session, String conversationId) { Context current = getConversationContext(); ServerConversationContext temp = new ServerConversationContext(session, conversationId); conversationContext.set(temp); try { destroy(temp); if ( !Session.instance().isInvalid() ) //its also unnecessary during a session timeout { temp.clear(); temp.flush(); } } finally { conversationContext.set(current); } }
ServerConversationContext conversationContext = new ServerConversationContext( externalContext.getSessionMap() ); Contexts.conversationContext.set(conversationContext); if (conversationContextFlushed) conversationContext.unflush();