Search in sources :

Example 1 with NonexistentConversationException

use of javax.enterprise.context.NonexistentConversationException in project wicket by apache.

the class ConversationPropagator method activateConversationIfNeeded.

private void activateConversationIfNeeded(RequestCycle cycle, IRequestHandler handler, String cid) {
    Conversation current = getConversation(cycle);
    if (current != null || !activateForHandler(handler)) {
        return;
    }
    logger.debug("Activating conversation {}", cid);
    try {
        container.activateConversationalContext(cycle, cid);
        fireOnAfterConversationStarted(cycle);
    } catch (NonexistentConversationException e) {
        logger.info("Unable to restore conversation with id {}", cid, e.getMessage());
        logger.debug("Unable to restore conversation", e);
        fireOnAfterConversationStarted(cycle);
        throw new ConversationExpiredException(e, cid, getPage(handler), handler);
    }
    cycle.setMetaData(CONVERSATION_STARTED_KEY, true);
}
Also used : NonexistentConversationException(javax.enterprise.context.NonexistentConversationException) Conversation(javax.enterprise.context.Conversation)

Aggregations

Conversation (javax.enterprise.context.Conversation)1 NonexistentConversationException (javax.enterprise.context.NonexistentConversationException)1