Why and when to perform this task
Use this task to create code for a CORBA server, shut down the server, and release the resources that it used.
To cause the server to shut down, add the following code to the main() function:
int main ( int argc, char *argv[] ) { . . . // Terminate the server cerr << "Server is shutting down." << endl; boaPtr->deactivate_impl ( implDef ); ::CORBA::release ( boaPtr ); ::CORBA::release ( orbPtr ); ::CORBA::release ( implDef ); ::CORBA::release ( implRep ); }
Results
This task adds code that shuts down a CORBA server and releases the resources that it used when the server's execute_request_loop() is forced to return. The loop returns when a shut down request is made by a separate server shut down program.