ConnectionLostException

YosYos Member Jose FernandezOrganization: University of Malaga (Spain)Project: Comparision between Ice VS Corba
Hi,

I'm using a client with wifi connection to internet, and sometime this connection is lost during brief intervals of time.

In that moment Ice in the client raise an exception ConnectionLostException, I have used a tick counter to measure the miliseconds between the invocation and the throwing of exception and shows me a value between 3000 an 4000 ms.

My question is:

Is posible set a property in the client to increase this interval???

I want to get that the minimal lost of connection from my computer were invisible to ICE. It would be possible if i can increase this interval to 20 seconds.


thanks

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    No, there's no way to specify such a timeout. However, the Ice runtime should always retry the invocation upon getting an Ice::ConnectionLostException if it's safe to retry the operation without breaking at-most-once semantics.

    In your case, I suspect the Ice runtime doesn't automatically retry the operation because it's not safe to do so (the retry would break at-most-once semantics). If you want to force the retry to occur, you need to mark the operation as "idempotent" in the Slice definition of your interface.

    This way, if the invocation fails with an Ice::ConnectionLostException, the Ice runtime will retry it by establishing a new connection and sending the request again. Be aware however that the operation might be sent twice (if the connection was lost shortly after the server received the request but before it could send the response).

    For more information on this, see this section in the Ice manual.

    Cheers,
    Benoit.

    Cheers,
    Benoit.
Sign In or Register to comment.