2 Replies Latest reply on Oct 16, 2007 3:55 AM by Joe weiss

    Problem getting ManagedBean out of Conversation

    Joe weiss Newbie


      i´m trying to get acces to my managed bean via:

      MyBean myBean = (MyBean ) server.getManagedBeanValue("#{myBean}");

      When i use scopetype SESSION, APPLICATION or EVENT for my bean it works, but when i have CONVERSATION it returns null;

      fyi: i´m sure that my conversation is long running, as for the next request it still has the same id.

      Do you have any idea, what this could be or where i could check?


        • 1. Re: Problem getting ManagedBean out of Conversation
          Stan Silvert Master

          Hi Jo,

          We haven't started looking at Seam support yet. There are a couple of interns building a demo app with Seam/JSFUnit, but it sounds like you are a lilttle further along right now.

          I took a quick look at the Seam code, and it looks like the Seam contexts are held in threadlocals which are flushed at the end of the request. So for JSFUnit, we will need to come up with a way to preserve that state a little longer (just like we did with FacesContext).

          If you can send me a simple Seam/JSFUnit app that demonstrates the problem I'll see if I can resolve this quickly. Thanks for reporting it.

          I'm stan at jboss dot com.


          • 2. Re: Problem getting ManagedBean out of Conversation
            Joe weiss Newbie

            hey Stan,

            thanks for your response.

            i switched to event-context which is ok in this case. So i´m not worrying at this time for conversation context.

            if i hit this problem again or find some free time;), i´ll go again into it.

            Thanks for now,