W
whenshaw
Guest
In addition to Matt's point, if you are using an OpenEdge 11.4 or later Web application as the back end, your mobile application code can use the progress.data.Session object's ping() method to determine the status of the back end, including whether the AppServer is running. If ping() returns false, it will also provide a string constant that identifies the reason for the failure. If the AppServer is down, that reason will be progress.data.Session.APPSERVER_OFFLINE ("AppServer is not available"). You could call ping() just before calling your read method. An alternative is to have the Session object call ping automatically for you on a set interval, and subscribe to the Session object's offline event. You would use the Session.pingInterval property to start the automatic pinging, and also call Session.subscribe() to subscribe to the offline event (and you would want to subscribe to the online event, too). If you are using an 11.4 back end, one of the reasons the offline event will be fired is that the AppServer is down, and you handler will receive progress.data.Session.APPSERVER_OFFLINE as the offlineReason argument (2nd parameter). The 11.4 documentation covers ping(), pingInterval, and the offline event, but let me know if you have any questions about how to use them in your case. Unfortunately, OE prior to 11.4 didn't have support for telling a Mobile client app that the AppServer is down. I'm puzzled, though, that you are not receiving an error on your read call. I would expect you to receive an error of some sort if the data can't be retrieved. Regards, --Wayne
Continue reading...
Continue reading...