Shutting down the server and releasing resources used

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.

Related tasks
Creating the CORBA server main code (server.cpp)



Searchable topic ID:   tcor_pgms5h
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/tasks/tcor_pgms5h.html

Library | Support | Terms of Use | Feedback