[omniORB] Proper way for orderly server process shutdown?
David Riddoch
djr@uk.research.att.com
Tue, 13 Jul 1999 10:28:01 +0100 (GMT)
On Tue, 13 Jul 1999 Wil_Evers@doosys.com wrote:
> > It applies to both impl_shutdown() and destroy().
>
> > The best way to shut down the ORB in response to a method invocation is
> > two spawn a new thread to do the work. Thus the CORBA call can complete
> > and allow the shutdown to proceed.
>
> I'm confused now. The example code Sai-Lai submitted in this mailing list
> thread contains a call to boa->impl_shutdown() in a servant implementation,
> which, at least with Sai-Lai's patch, runs without any problems, as long as
> the method calling impl_shutdown() is declared as oneway. Furthermore,
> Sai-Lai wrote...
>
> > What BOA::destroy() (or impl_shutdown) does is to shutdown all incoming
> > socket. The server threads per connection should notice the socket state
> > and exit themselves.
>
> ...which seems to imply that calling impl_shutdown() in a servant
> implementation is a safe thing to do.
I am not 100% up to speed with this bit of the code. Therefore what
Sai-Lai says is the final word on the matter. Perhaps the documentation
hasn't yet caught up with the implementation.
I think my solution is probably the safest to use though, as it will work
whether or not you are allowed to call impl_shutdown() from a servant
implementation, and whether or not it is a one way call.
David