1 Reply Latest reply on Dec 29, 2009 12:19 PM by blabno

    Conversation complexity

    jigneshmpatel

      I am using hibernate entity in EVENT scope. Now when I have to outject object I have to use following things together to display content on facelet.


      @Out private BuySellRent buysellrent;
      and inside the method
      Contexts.getConversationContext().set(buysellrent, buysellrent);


      Why is it so... As per seam documenation only @Out will work for short running conversations.


      On the other side when I use object which is in scope of CONVERSATION then I don't need to use set the object in converstation context inside method.


      Can anybody explain me why I need to mention at 2 places for outjecting an object which is in EVENT scope.

        • 1. Re: Conversation complexity
          blabno

          Your description is incomplete. I understand you have component A of EVENT scope outjecting one of it's attributes (entity). From the second part of your description I guess you have some redirection going on. That would explain why entity outjected to EVENT scope is not seen on rendered page (yes, entities are CONVERSATION scoped, but outjected attribute is scoped the same as component from which it is being outjected). To survive redirection, we use CONVERSATION scope. Even if it is short-running and ends with request, it still spans over redirections.