[omniORB] How to shut my Corba Server application in another thread?
Duncan Grisby
dgrisby@uk.research.att.com
Tue, 13 Mar 2001 15:43:19 +0000
On Monday 12 March, "Len Holgate \(Mail List Account\)" wrote:
> 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() ?
That is expected. If you have shut down the ORB, you can't use it any
more. It might be nice if the CORBA spec had a function to wake up
threads blocked in orb->run() without shutting the ORB down, but it
doesn't. It's not hard to implement your own concurrency control to do
it yourself.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --