[omniORB] server/orb shutdown question

Lee, Robert C. rc.lee at ngc.com
Fri Jul 18 12:00:06 BST 2003


Hello everyone,

How can I shutdown a server gracefully. I have a Corba object, say A,  in
one server and a bunch of other Corba objects in other servers on other
hosts which registers its object reference with the the Corba object "A."
"A" uses the object references to call these objects. So if I want to
shutdown a object (so "A" can't call it anyway), I want for the object to
unregister with "A". 

So what I did was to trap a SIGTERM signal which causes the server (which
creates/incarnates the Corba object on startup) to unregister the object
reference with "A". Then I want to exit. What the signal handler does is to
unregister, call orb->destory, and then exit. However, the exit call is
never reached. The call to orb->destory() never returns. 

This is what I see as output when my signal hander runs:

destorying ORB..
omniORB: Preparing to shutdown ORB.
omniORB: Destroying POA(RootPOA).
omniORB: Deactivating all POA(RootPOA)'s objects.
omniORB: Waiting for requests to complete on POA(RootPOA).
omniORB: Requests on POA(RootPOA) completed.
omniORB: Etherealising POA(RootPOA)'s objects.
omniORB: Removing root<0> (etherealising) from object table
omniORB: Stopping serving incoming endpoints.


But as I said the server does not exit because the call to exit is never
reached; the call to orb->destory does not return. What am I doing wrong? Do
I have to delete the servants or what?

Thanks for your help,
Robert Lee



More information about the omniORB-list mailing list