0 Replies Latest reply on Jan 14, 2010 2:26 PM by Nikola Racic

    Getting Natural Conversation ID

    Nikola Racic Newbie

      Hi all,


      I am using this method to store my Natural Conversation ID in the database (currently I only dump it to the console) in order to track user's conversation (when conversation expires I know how long user hold conversation).


      Method:


           @Observer("org.jboss.seam.postDestroyContext.SESSION")
           public void destroy() {
                long currentTime = System.currentTimeMillis();
                ConversationEntries conversationEntries = ConversationEntries.getInstance();
                if (conversationEntries != null) {
                     List<ConversationEntry> entries = new ArrayList<ConversationEntry>(conversationEntries.getConversationEntries());
                     for (ConversationEntry conversationEntry : entries) {
                          long delta = currentTime - conversationEntry.getLastRequestTime();
                          if (delta > conversationEntry.getTimeout()) {
                               System.out.println(conversationEntry.getId());
                          }
                     }
                }
           }
      
      



      But each time I get Seam's synthetic ID instead of Natural Conversation ID. Obviously, this is wrong way to retrieve Natural Conversation ID, but how can I do it?