[omniORB] Is there any way for the corba server to be aware of
the death of a client?
Martin Trappel
0xCDCDCDCD at gmx.at
Fri Jan 9 15:57:19 GMT 2009
Li, Jun Jie wrote:
> Hi Guys
>
> We have a client-server application implemented on OminiORB. The server will keep some resource for each client
> Normally, if the client exits gracefully, we can use deRegister to inform the server to release the resource for this client.
> But if any client is killed or aborted, Is there any way for the server to be aware of its death?
> One way might be the server monitor the clients idle time and release it if time is out, I'm wondering if there is any native way at OminiORB level to inform the server if this happens?
>
CORBA in general does not provide for such a mechanism. Generally your
client *could* be dead (not running) for a while and the come back alive
without the server noticing.
Also, as CORBA does not require a network connection to be available
while the client does not call the server, there is no way for any ORB
to monitor its clients via that way.
The two easiest alternatives are imho:
a) Having a client idle timeout in the server as you propose
b) Having the client (additionally) provide a callback function for the
server to determine if it's alive/reachable. (However, if there are no
other callbacks, this first additional callback might discover
connection problems *from* the server *to* the client, so having the
server provide a ClientAlive(client_id) function for the clients to
reset the idle timeout may be a better solution if you have no other
callbacks.)
br,
Martin
More information about the omniORB-list
mailing list