2 Replies Latest reply on Dec 23, 2011 12:22 AM by Jason Porter

    Switching current conversation

    riboriori riboriori Newbie

      Hi all,
      I have 2 questions:
      1) Wich conversation is propagated? the current?

      2) If yes, say, in a certain moment, i have n long running conversations: can i manually decide how conversation make as current conversation in order to decide which one i propagate?

      Best regards

        • 1. Re: Switching current conversation
          riboriori riboriori Newbie

          I've found in WeldPhaseListener:

          HttpConversationContext conversationContext =instance().select(HttpConversationContext.class).get();
          HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();


          where instance():

          private static Instance<Context> instance() {
            return Container.instance().deploymentManager().instance().select(Context.class);

          Only a question: is there a chance to have more than one active conversation with weld?

          • 2. Re: Switching current conversation
            Jason Porter Master

            No, that's a CDI spec deal. You'd have to create your own Conversation implementation and use that.