Let me say firstly that I have posted this in the Adobe Cairngorm forum but got 
no replies so hoping someone here can help me (I'll update the forum thread 
when I get an answer).

--

Hi,
 
I'm using Cairngorm for my flex apps which have a lot of database/server 
interaction.

Occasionally my host is slow and doesn't respond in time.  I'd like to retry 
these failed remote service calls a few times before alerting the user that 
there really is a problem.
 
Are there any conventions for doing this?
 
I'm thinking of adding a retry counter somewhere - maybe the Model or 
ServiceLocator? - and then dispatching a new Event in the Command fault handler.

public function fault(event:Object):void {
     if(retryCount < retryMax) {
          new MyServiceEvent...
     }else{
          Alert.show...
}

I'm wondering whether I'll run into issues generating another event in the 
fault handler?  This must have been solved before! - but I've read through the 
Cairngorm docs, searched the forums and can't find any mention of it.  All 
Command Fault Handler examples I've found either do nothing or generate an 
Alert.
 
I'm also having trouble simulating the timeout if anyone has any suggestions? - 
I'm using Zend PHP server side.
 
 
cheers

Reply via email to