[omniORB] How to detect death of a client?

Swayamjit Das swayam@krdl.org.sg
Tue, 10 Nov 1998 09:56:48 +0800


Michael Nikonov wrote:

> In my application, when client suddenly dies (for example, due to a
> crash or when user turns
> off his machine without shutting down the client application), server
> must be aware of
> this fact because it must free resources associated with that client
> (like memory buffers
> or database connection).
>

We face a similar problem in our application. The solution that we have, is
to implement a application level"Keep Alive" message using CORBA. The client
sends this message periodically to the server. There is
a thread on the server that monitors all the "Keep Alive" msgs. If a client
fails to send a "Keep Alive" message
by certain time, then the client is considered dead and the resources
corresponding to that client are cleaned up.

I guess this is a crude approach. Is there a smarter way of getting around
this problem. ?


Thanks

SDas.