[omniORB] unbinding an object

Duncan Grisby duncan at grisby.org
Fri Dec 5 17:16:55 GMT 2003


On Tuesday 2 December, Johan Cronje wrote:

> Is it necessary to unbind an object reference from the naming service?

Not necessary, no.

> I ask because, at the moment, I can't see an easy way to do this (by "easy" 
> I mean in my server app), and the omniORB manual doesn't say anything about
> it. I would think that unbinding a name would be a good way to tell a client
> that an object is no more.

Unbinding a name is one way to show an object no longer exists.
However, most objects you bind into the naming service tend to be
"persistent", in the sense that they are always expected to exist (not
necessarily persistent in a POA sense), so you might as well leave
obsolete entries in the naming service and let clients catch the
exceptions when they try to contact the object.

> Also, is there a way to make the last statement (cout) in the following code
> execute?
> 
> try
> {
>   ... //some code
>   orb->run();
>   cout << "Finished";
> }

Call orb->shutdown() from another thread.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list