The Flash Remoting application has many possible failure points. One of the more frequent failure points is the communication between client and server. Server-proofing involves testing the application in serverless environments to guarantee that the application will fail gracefully if the server is unavailable. There are many possible reasons for communication failure:
Whatever the reason, your application needs a reliable way to recover from the lack of a connection. In an HTML page, this is not a problem; the browser will force a timeout after a specified number of seconds waiting for a response. In a Flash movie, it is your responsibility to provide a fallback mechanism to handle the lack of a connection. You can do this in two ways:
The System.onStatus event should be assigned to a function in your application so that any failed remote calls will be handled gracefully: System.onStatus = function ( ) { getURL("http://www.flash-remoting.com/try_again.html","_blank"); }; This code displays an HTML error page to the user when a connection to Flash Remoting cannot be made. |