5 Replies Latest reply on May 12, 2009 6:04 AM by Michael Borbor

    Cancel remoteobject transaction

    BlueVeinz

      Hello,

       

      I'm wondering if it's possible to cancel a remotobject's transaction.

       

      This is the case:

      A user may upload articles to my backend database. But while this is uploading it must be possible to disconnect this transaction. (If the transaction takes too long for example it must be possible to cancel this).

       

      I did some research but couldn't find it yet.

       

       

      Here's some code.

       

      My delegator:

       

                  var token:AsyncToken=this.service.saveArticle(articleVO);
                  token.resultHandler=responder.result;
                  token.faultHandler=responder.fault;
                  token.addResponder(responder);

       

      My Service:

                      var channel:AMFChannel=new AMFChannel("my-amf", "http://localhost:8080/.../messagebroker/amf");
                      var channelSet:ChannelSet=new ChannelSet();

                      channelSet.addChannel(channel);

                      articleService.channelSet=channelSet;

       

               <mx:RemoteObject id="articleService"               
                           destination="articleService"/>

       

      I think there are different solutions. Call the remoteobject's disconnect function, the channelset's disconnect function or something with the asynctoken. But I didn't figure it out yet. Can someone help me plz?

       

      thx