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

    Problem getting ManagedBean out of Conversation

    joewww

      Hi,

      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?

      Thanks,
      Jo





        • 1. Re: Problem getting ManagedBean out of Conversation
          ssilvert

          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.

          Stan



          • 2. Re: Problem getting ManagedBean out of Conversation
            joewww

            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,

            Joe