Search in sources :

Example 1 with ConversationImpl

use of org.jboss.weld.contexts.conversation.ConversationImpl in project core by weld.

the class AbstractConversationContext method associateRequestWithNewConversation.

protected void associateRequestWithNewConversation() {
    ManagedConversation conversation = new ConversationImpl(manager);
    lock(conversation);
    setRequestAttribute(getRequest(), CURRENT_CONVERSATION_ATTRIBUTE_NAME, conversation);
    // Set a temporary bean store, this will be attached at the end of the request if needed
    NamingScheme namingScheme = new ConversationNamingScheme(getNamingSchemePrefix(), "transient", beanIdentifierIndex);
    setBeanStore(createRequestBeanStore(namingScheme, getRequest()));
    setRequestAttribute(getRequest(), ConversationNamingScheme.PARAMETER_NAME, namingScheme);
}
Also used : ConversationNamingScheme(org.jboss.weld.contexts.beanstore.ConversationNamingScheme) NamingScheme(org.jboss.weld.contexts.beanstore.NamingScheme) ConversationNamingScheme(org.jboss.weld.contexts.beanstore.ConversationNamingScheme) ManagedConversation(org.jboss.weld.context.ManagedConversation) ConversationImpl(org.jboss.weld.contexts.conversation.ConversationImpl)

Aggregations

ManagedConversation (org.jboss.weld.context.ManagedConversation)1 ConversationNamingScheme (org.jboss.weld.contexts.beanstore.ConversationNamingScheme)1 NamingScheme (org.jboss.weld.contexts.beanstore.NamingScheme)1 ConversationImpl (org.jboss.weld.contexts.conversation.ConversationImpl)1