[omniORB] checking for server

bjorn rohde jensen bjensen@fastmail.fm
Thu Jun 27 22:41:01 2002


Hi Warren,

 You pretty much have to use an object reference to determine,
if it actually refers to anything. One can invoke non_existent()
on object references, but that will usually also mean contacting
the server. Object existence is sort of a tricky thing in CORBA,
since objects can be revived after having died, become reachable
after having been unreachable and so forth.
 It is pretty much up to you to decide, when a client should
consider an object gone, and if that is permanent. If non_existent()
returns true or you get a CORBA::OBJECT_NOT_EXIST from an invocation,
you should be able to conclude, that the object is gone.
 Why not keep the server running all the time? There is not much
harm in having an idle server hanging around. You could have the
server rebind its object reference in the name service on start up
and have it respawn it immediately after a crash. If a client gets
a stale reference, it can just wait a bit and look up a new one,
assuming
that the server host and network is up;)

Yours sincerely,

Bjorn