2 Replies Latest reply on Nov 17, 2008 4:31 AM by Chua Khoon Yong

    SFSB Asynchronous Request Return (?)

    Chua Khoon Yong Novice

      hi all,


      Not sure if the title is correct for the query below.  Here we go,


      Suppose the user click on a request on a web page, and it is received by a SFSB (by Seam), then we format some request by JMS to an external system.  The external system may take some minutes to process the request, so we make the request asynchronous, and the user can continue to perform other tasks.  But then, how do we inform the results back to the web user?


      One way is for the web page to poll the result, via rich:poll, to the SFSB.  At the same time, we can also receive the results from external system, via web service or JMS.  But how to transfer the result to the correct SFSB instance?


      I try to find some way to retrieve the SFSB from Component.getinstance, but couldn't find any method to locate the correct instance.


      I am using latest jboss seam 2.1SP1, richfaces 3.2.2, portal 2.7.0 and portalbridge 1.0.0b4


      Thank you.

        • 1. Re: SFSB Asynchronous Request Return (?)
          Ben Catherall Newbie

          Your SFSB will have to query your external service layer.


          Perhaps external service puts all incoming messages in a database (in memory or not...), and SFSB queries this database

          • 2. Re: SFSB Asynchronous Request Return (?)
            Chua Khoon Yong Novice

            hi Ben,


            Thanks, DB is one way to interface with SFSB on the results and would be a good working solution when the results should be kept for later usage.


            There are some cases (trivial) when it may not be necessary to keep in DB, for example, the result is the price of the selected car and the web page is showing the last 10 queries of the prices.


            Not sure if the following can work, haven't test yet:



            client --(return result via JMS)---  a MDB and application scope that keep the results in memory (by lists, etc)


            The SFSB can query the MDB and application scope class.


            Basically the SFSB should query a singleton, not sure if that MDB and application scope class can be a singleton.


            Thanks.