3 Replies Latest reply on Jun 6, 2007 1:08 PM by bgrossi

    How can I end/destroy other conversations different from the

    bgrossi

      I need to force the end of some other seam's conversations in my application, based on a request parameter, but I can't do that..

      I try that code:

      String[] ids = ... //The ids of conversations to end
      if (ids!=null && ids.length>0) {
      ConversationEntries instance = ConversationEntries.instance();
      for (String id : ids) {
      ConversationEntry conversationEntry = instance.getConversationEntry(id);
      if (conversationEntry!=null && !conversationEntry.isCurrent()) {
      conversationEntry.end();
      conversationEntry.destroy();
      }
      }
      }


      But this cause only the last conversation to be destroied, and "Manager.instance().getCurrentConversationId()" returns that conversation's id (this can cause some unexpected behavior).

      I need to destroy some conversations because I known that it'll not be used anymore, and I known the ids..

      Can anyone help me?


      Bruno E. Grossi