[omniORB] How to shut my Corba Server application in another thread?

Len Holgate (Mail List Account) Mail-lists@dial.pipex.com
Mon, 12 Mar 2001 23:28:36 -0000


> That is the correct way to shut down the ORB from within an operation
> implementation.

Cool.

I have a new problem now though... Since the server can now shut down
cleanly, I thought I would clean up on my way out and unbind the naming
contexts that I bound on the way in. Unfortunately I get exceptions thrown
or an omniORB assertion going off when I try and unbind after orb->run() has
returned due to the server shutting down. Is this expected? Am I really
expected to unbind any objects that I've registered with the naming service
in response to the method call to shut down (ie before the call to
orb->shutdown(0)?) rather than being able to use a "smart pointer" style
approach inside my server main()  ?

> The CORBA spec says that the ORB should throw CORBA::BAD_INV_ORDER if
> you try that. Unfortunately, that requires Current support which
> omniORB 3 doesn't have. omniORB 4 will correctly throw the exception.


Sounds much better than just hanging :)