[omniORB] Proper way for orderly server process shutdown?

Wil_Evers@doosys.com Wil_Evers@doosys.com
Tue, 13 Jul 1999 07:57:59 GMT


David Riddoch (djr@uk.research.att.com) wrote :

> On Mon, 12 Jul 1999 Wil_Evers@doosys.com wrote:

> > By the way, there is a comment in CORBA.h saying one shouldn't call
> > boa->impl_shutdown() from an interface implementation.  I take it that
only
> > applies to boa->destroy()?

> 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.

Am I missing something?

- Wil