3 Replies Latest reply on May 20, 2010 12:30 PM by simonkent

    Async question

    simonkent

      Hello,


      I'm having a question about asynchronous method calls in seam, if anybody can help me.
      Here's the setup :
      - i have a long running conversation that makes, at a certain point, a call to an async method
      - everything works well, the call is processed as it should, etc.


      My problem is : when async call finishes, I would like to notify in some way, seam components in the long running conversation that spawned the async call. Is this possible ?
      If not, how would you go if you need to glue together conversation data and the event of ending an async call ?


      Also, please note that I can't rely on the polling solution, because I need to process my async result, even if client closed the browser window (so the whole thing must take place server side)


      Kind regards,
      Andrei

        • 1. Re: Async question
          amitev

          I would pass the conversation object that should be notified as method parameter but if the user closes his/her browser then the conversation data becomes useless.

          • 2. Re: Async question
            raphaufrj

            Simon,


            i'm interested to know which better way in this case... If you find out it, share for us.

            • 3. Re: Async question
              simonkent

              Hello Adrian,


              Thanks for your response... This is the way I'm currently doing, but this looks a bit like a hack to me, so I was interested to find out if there is a better way for this, or a standard approach.
              Even if the user closes browser window, the conversation will not timeout right away. The timeout for my async call is anyway lower than conversation timeout, so this case should not represent a problem (at least for me)


              Kind regards