if(manager == null)
{
throw new IllegalStateException("No " + WeldManager.class.getName() + " found in context");
}
ConversationManager2 conversationManager = Utils.getBeanReference(manager, ConversationManager2.class);
CDIConversationID id = context.get(CDIConversationID.class);
if(id == null)
{
id = new CDIConversationID(null); // when null creates a new empty conversation id.
}
if(!conversationManager.isContextActive())
{
conversationManager.setupContext();
}
conversationManager.setupConversation(id.getId());
}