Overview | Causes a server to stop accepting incoming request messages and informs the somorbd deamon that it is no longer active. |
Original class | CORBA module: BOA Class |
Exceptions | CORBA::SystemException |
Intended Usage
This method is intended to be used by every server application, to indicate that it no longer wishes to accept incoming request messages from remote clients, prior to server termination (whether normal or abnormal). It should only be invoked if the server has previously successfully called BOA::impl_is_ready.
The method informs the somorbd daemon that the server is no longer active, and that subsequent requests to locate that logical server should cause a new instance of the server to be automatically activated. It also prevents any new request messages from being received by the server; clients issuing such requests will receive SystemExceptions indicating a communications failure. Any requests received by the server prior to calling BOA::deactivate_impl that have not yet been serviced (by a call to BOA::execute_request_loop or BOA::execute_next_request) will be deleted; no response will be sent to the clients that sent them.
This method is part of the CORBA specification.
Syntax
virtual void deactivate_impl ( CORBA::ImplementationDef_ptr impldef);
Parameters
Example
#include "corba.h" void main(int argc, char* argv[]) { /* Initialize the server's ImplementationDef, ORB, and BOA: */ CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository; /* assume dummyServer is already registered in the implementation repository */ CORBA::ImplementationDef_ptr imp = implrep->find_impldef_by_alias ("dummyServer"); /* Assume op-parm is initialized. For workstation initialize to "DSOM" */ char * op-parm; /* Assume bp-parm is initialized. For workstation initialize to "DSOM_BOA" */ char * bp-parm; static CORBA::ORB_ptr op = CORBA::ORB_init(argc, argv, op-parm); static CORBA::BOA_ptr bp = op->BOA_init(argc, argv, bp-parm); bp->impl_is_ready(imp); ... bp->deactivate_impl(imp); ... }