0 Replies Latest reply on Nov 9, 2009 5:30 AM by manzu786

    How to synchronize  a servce call

    manzu786

      Hi friends ,

       

      I am doing a project using adobe air. It is a client server application where server is in java.

      We are using remoting  to access server side business.

       

      I have a main class and a helper class.Service is called in a function (say "Search()") in this helper class which is called from the main class.

       

      As usual we have created Remoting object in the helper class and handles result in a resulthandler function which is registered to handle result event in this class.

       

      But we are facing a problem as this is an asynchronous call. As soon as the function in the remoting object is called , control is returned to the calling function in the main class where this function expects a result( may be boolean success  or false) from the service call to execute next line. But it gets wrong value as the service call is asynchronous.

       

      How to handle this situation. Any frame work or design pattern to solve this problem

       

      With regards

      Manu