Delay in retrieving data from flex LCDS service

88 views Asked by At

We have used remote object to retrieve data from java webservice. On initial load we are creating 4 remote objects and hiting the sevice 'myService'. At java end the function called from remoteObj1 excuted first and then second ,third and fourth. but result event for all the 4 remote objects are dispatched only after the java function of 4th remote object is executed.

We want that if first function is executed first then result event for that remote object should be dispatched first .It should not wait for 4th function to execute.

Any suggestions?

1

There are 1 answers

0
Florian Salihovic On

The easiest way would be chaining event handlers. Wait until the result handler from the first RemoteObject is invoked, then make the second call and so on.

Remember: the AVM is non-blocking and async and the programing model is event driven. So, it's different to synchronous "naive" Java code.