1 Reply Latest reply on May 17, 2008 4:05 PM by cron

    How to get conversationList in Filter

    cron

      I want to get conversation list by filter. The mission of this filter is to retrieve the pre-load long run conversation, and then check if this conversation's entity bean has changed or not, if changed, restore this conversation and back to the pre-load page.


      I code the filter as follows,


      @Startup
      @Scope(ScopeType.APPLICATION)
      @Name(myFilter")
      @BypassInterceptors
      @Filter(around="org.jboss.seam.servlet.SeamFilter")
      public class MyFilter extends AbstractFilter{
              Lifecycle.beginCall();
      
              try {
                  ConversationList conversations = (ConversationList)
                      Component.getInstance(ConversationList.class);
                  
                  for (ConversationEntry entry: conversations.getConversationEntryList() ) {
                      log.debug("Description: "+entry.getDescription());
                      log.debug("Id: "+entry.getId());
                      log.debug("StartDatetime: "+entry.getStartDatetime());
                  }
              }catch (java.lang.IllegalStateException ex) {
                  ex.printStackTrace();
              }
              finally {
                  Lifecycle.endCall();
              }
      }
      



      but the conversations.getConversationEntryList() is a empty list.
      So my question is: how to get the conversation list in the filter, are there other way to solve my biz logic flow ?


      thanks in advance.

        • 1. Re: How to get conversationList in Filter
          cron

          I mean my solution to back to pre-loaded page, steps as follows,


          1. get the conversations from filter


          2. get conversation list or conversation stack from current context


          3. take out SFSB from one long running conversation from the conversation list.


          4. take the entity bean which is a properties of this SFSB


          5. check if this entity bean changed or not, if changed, then


          6. back to the pre-loaded page, re-activate the old long running conversation.



          however, I stopped in the first step, and cannot get the conversions in filter.


          Any ideas ?


          Thanks you all.