Skip navigation
betheflexcoder
Currently Being Moderated

dataservice call fault error after session timeout does not get trapped in the fault handler

Jan 31, 2012 10:30 AM

Hi,

 

My data service call after the session time out for about 30 mins, does not get trapped into the fault handler. It pops up a Flash player error on the AIR simulator. I have some code to handle for session timeout error in the faulthandler. My server returns an exception for session timeout. My server log shows that it returns the exception, but it does not return to fault handler, instead throws a fault error on the UI in form of popup.  I am using RTMP channel with below configuration.

 

 

<channel-definition id="mobility-rtmp"

      class="mx.messaging.channels.RTMPChannel">

      <endpoint url="rtmp://{server.name}:@flex.rtmp.port@"

        class="flex.messaging.endpoints.RTMPEndpoint"/>

      <properties>

        <idle-timeout-minutes>20</idle-timeout-minutes>

      </properties>

    </channel-definition>

 


    <flex-client>

        <timeout-minutes>5</timeout-minutes>

    </flex-client>

 

Please let me know how I can handle this.





Thanks,

Swathi.

 
Replies
  • Currently Being Moderated
    Jan 31, 2012 11:48 PM   in reply to betheflexcoder

    Hi

     

    Can you post the code you are using to register the faultHandler? Just to confirm, you need to register the faultHandler at the service level like this:

     

    userService.addEventListener("fault", faultHandler);

     

    Regards,

     

    Ashish Vashisht

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 8, 2012 5:57 AM   in reply to betheflexcoder

    Hi

     

    Sorry for the delayed response - I was out of office for the last week.

     

    Where you have instantiated your DataService (customdataservice variable), you should add an event handler for the fault event like this:

     

    customdataservice.addEventListener("fault", faultHandler);

     

    where faultHandler is the function you want called on a fault happening.

     

    For more information, see here:

    http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc 3ff6d0ea77859461172e0811f00f7045b-7fb0Update.html

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/ data/DataService.html#eventSummary

    http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WS3 a1a89e415cd1e5d-d5245eb1221394e36f-8000Update.html

     

    Regards,

     

    Ashish Vashisht

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points