[omniORB] unbinding an object
Johan Cronje
jcronje at dsp.sun.ac.za
Tue Dec 2 23:10:53 GMT 2003
On Tuesday 02 December 2003 20:34, Clarke Brunt wrote:
> The naming service is just a standard CORBA service. Check what methods it
> has. We seem to have stuff that does something like
> root_context->unbind(name) (where name is the same name object that was
> bound earlier).
I know about that method, but the problem with that is, I'd have to write a
separate app (or client method) to achieve that; I'd like it to happen when my
server exits. Otherwise I'd have to keep track of when my server is down and
unregister it myself.
> >Also, is there a way to make the last statement (cout) in the following
> Add a \n to the end of it (otherwise doesn't flush the output).
That's not the problem - calling orb->run() blocks forever on my system;
so the only way I can get my servant to exit is via ^C (Ctrl-c). And then, of
course, the last statement isn't called. What I wanted to know is if there is
a way for a servant to exit by some other means that _does_ let the orb->run()
call finish and following statements execute.
A very ugly hack would be to raise an exception and insert any last commands
that needs to carry out (like unregistering the object name) into either the
exception handler or after all the exception handlers. But I'm pretty sure
there are more elegant solutions to the problem.
Thanks Anyway
Regards,
Johan
--
"There is beauty in simplicity" -- Johan Cronje
---------------------------------------------------------------
Johan Cronje
Digital Signal Processing / Telecommunications Group
Electrical and Electronic Engineering Department
University of Stellenbosch
http://www.dsp.sun.ac.za/~jcronje
---------------------------------------------------------------
GNUPG Key: http://www.dsp.sun.ac.za/~jcronje/jcronje.asc
More information about the omniORB-list
mailing list