Oh, and in regard to AMF polling and your connected state, this channel issues poll requests over HTTP on an interval. If your server is unreachable, the next poll request that is sent will fail, triggering the channel to move to a disconnected state.
If you enable client logging (<mx:TraceTarget> and a debug player) you should be able to see log entries for the channel issuing poll requests and when one of these fails, an entry stating that the channel has stopped polling. Best, Seth ________________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Thursday, January 24, 2008 5:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LCDS Paging error and connection management in DataServices. Advice? Thanks. Do you know if the connected property works in amf-polling as well? As an experiment I tried to disconnect my wireless connection while the app was running and the connected property didn't change. However, using RTMP it works fine. Also, is there a way to distinguish a disconnect from when the server is down or has restarted? In those cases, it seems I need to for my users to relaunch the application rather than just try to reconnect to the channel. I would love to see some sample code (if there is any out there) from anyone who has handled all these connection/disconnection issues in DMS. It seems like there is a fair amount to try to keep track of with these type of connections vs a simple asynchronous call. Thanks, Kevin --- In flexcoders@yahoogroups.com, "Seth Hodgson" <[EMAIL PROTECTED]> wrote: > > Hi Kevin, > > DataService exposes a bindable 'connected' property that lets you know whether its underlying channel to the server is up or not. If it's not up, DataService will attempt to reconnect indefinitely. You should watch the 'connected' property and let the user know when they've lost connectivity, as well as when connectivity is regained. > > DataService also provides a disconnect() method that can be used to shut down the instance, and will also stop any further automatic reconnect attempts. > > Hope that helps, > Seth > ________________________________________ > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin > Sent: Thursday, January 24, 2008 9:07 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: LCDS Paging error and connection management in DataServices. Advice? > > I'll add to this post, how do you check the connected status if you > are using amf-polling?? > > If I turn off my internet connection while working, I get tons of > errors when trying to navigate the app since things are all of a > sudden not loading in via paging... > > I am not sure the best way to handle this. > > - Kevin > > --- In flexcoders@yahoogroups.com, "Kevin" <lists@> wrote: > > > > I am trying to handle a situation where my user are getting > > temporarily disconnected from my web app and then proceeding to > > continue enter info thinking that it is being saved simply because it > > is still working in actionscript. (of course nothing is getting > > persisted to the database at this point). This problem seems very > > unique to data management since we are not making explicit calls to > > the database and instead it is being handled by DataServices. > > > > I have tried to set up an Alert warning and a status indicator so that > > they know when then are connected again, however, sometimes I am > > getting the follow error when the web app is reconnected (see below). > > Admittedly this usually happen when there is a server restart > > (although is there a way to check for this?), but I am still wondering > > how best to manage my apps connection since I am not doing explicit > > asynchronous calls to the database? > > > > Thanks for the help. - Kevin > > > > > > > > [RPC Fault faultString="Pages for sequence id 209 have expired in > > destination relationships." faultCode="Server.Processing" > > faultDetail="null"] > > at > > > mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:2112] > > at > > > DataListRequestResponder/fault()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:6022] > > at > > > mx.rpc::AsyncRequest/fault()[E:\dev\flex\sdk\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] > > at > > > NetConnectionMessageResponder/statusHandler()[E:\dev\flex\sdk\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:531] > > at > > > mx.messaging::MessageResponder/status()[E:\dev\flex\sdk\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222] > > >