5 Replies Latest reply on Jul 18, 2008 7:13 PM by gjeudy

    Stateful and nested

    srpantano

      I'm using a Stateful EJB instance and other stateless instances in a conversation, and when I start a nested conversation the new instances is created, it's ok! But, is possible that nested continues using the new instances of stateless and the same stateful of outer????

        • 1. Re: Stateful and nested
          gjeudy

          Yes, it's possible whatever was created in scope of the outer conversation is still accessible in the nested conversation but is in read-only state.

          • 2. Re: Stateful and nested
            srpantano

            but how access it??

            • 3. Re: Stateful and nested
              gjeudy

              I'm sure there's a programmatic way to access your beans in the outer conversation but you can do instead:


              @In 
              private MyClass myBean;



              Seam will do a priority search through the seam contexts from smallest to largest so if it doesn't find your bean in the current nested conversation, it will search in the parent conversation and may find it here.


              I suggest you use the Seam debug page to display conversations and beans, it certainly helped me alot.

              • 4. Re: Stateful and nested
                srpantano

                My major problem is that I send by action an object (entity) to a nested conversation, then I can not read their relationships, imagine that this is because it detached, how to solve it the easy way?

                • 5. Re: Stateful and nested
                  gjeudy

                  Without you giving more details its very hard to advise. Also what are you trying to achieve by using a nested conversation ?